ssossossosso

Forums

Covering OroCRM topics, including community updates and company announcements.  Subscribe

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

  • Creator
    Topic
  • #16806

    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
  • #16814
    Yevhen Shyshkin
    Yevhen Shyshkin
    Oro Core

    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.

    #16816

    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?

    #16819
    Yevhen Shyshkin
    Yevhen Shyshkin
    Oro Core

    > 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.

    #16828

    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)

You must be logged in to reply to this topic.