OroPlatform Forums

Covering OroPlatform topics, including community updates and company announcements.

Forums Forums OroPlatform OroPlatform – Programming Questions Adding 3rd party bundle – Oro installation error

This topic contains 4 replies, has 2 voices, and was last updated by  andytnumiko 8 years, 1 month ago.

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

  • Creator
    Topic
  • #34081

    andytnumiko
    Participant

    Hi

    While I understand that Oro picks up custom bundles via the bundles.yml files instead of AppKernel, when I add 3rd party bundle via composer (https://packagist.org/packages/lionware/symfony-session-timeout), it isn’t picked up unless I put it in AppKernel (the bundle is basically just an event listener – I don’t see how that would be recognised otherwise?).

    That works, but the problem is when we deploy the code and run a fresh oro:install:

    PHP Fatal error: Class 'Lionware\SymfonySessionTimeoutBundle\LionwareSymfonySessionTimeoutBundle' not found in /var/www/.../app/AppKernel.php on line 12

    Is there a way around this?

    thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • Author
    Replies
  • #34082

    Yevhen Shyshkin
    Participant

    Hello.

    > While I understand that Oro picks up custom bundles via the bundles.yml files instead of AppKernel
    Correct.

    > it isn’t picked up unless I put it in AppKernel
    This is really weird – any external bundle can be handled this way, here is example. Please, check if file name and path to bundles.yml is correct, and you bundle really was plugged in by OroPlatform. And, please, make sure that you refreshed application cache.

    Also you can debug bundle collection mechanism – probably, you can find some clues there.

    > PHP Fatal error: Class ‘Lionware\SymfonySessionTimeoutBundle\LionwareSymfonySessionTimeoutBundle’ not found in /var/www/…/app/AppKernel.php on line 12
    Such error might appear if application for some can’t load this class. Please, check if this bundle is registered in autoloader and is this file really allowed to read.

    #34083

    andytnumiko
    Participant

    Hi, it’s a 3rd party bundle that’s in vendor/, therefore I didn’t try to create a bundles.yml for it.

    But assuming I don’t need that, in theory the autoloader should be able to find it without any other configuration?

    #34084

    Yevhen Shyshkin
    Participant

    > Hi, it’s a 3rd party bundle that’s in vendor/, therefore I didn’t try to create a bundles.yml for it.
    You should add it in any bundles.yml file – e.g. in your bundle.

    > But assuming I don’t need that, in theory the autoloader should be able to find it without any other configuration?
    It depends on how you installed it. If you added it via composer – it should be fine, but if just copied the code – autoloader will not be aware about it. To refresh autoloader configuration you can run php composer.phar dump-autoload command in application root directory.

    #34085

    andytnumiko
    Participant

    I think our problems were composer-related in the end.

    Thanks for your help.

Viewing 4 replies - 1 through 4 (of 4 total)

The forum ‘OroPlatform – Programming Questions’ is closed to new topics and replies.

Back to top