Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SF2.7 / SF2.8 + Propel1 / Bad propel init on first call after clear:cache #356

Open
lionelbzv opened this issue Aug 13, 2015 · 4 comments
Open

Comments

@lionelbzv
Copy link

Env:

        "symfony/symfony": "2.7.*" or "2.8.*",
        "propel/propel-bundle": "1.4.*",

The first time I call a page or a SF command line after having clear the cache, I've got this error:

  [PropelException]                                                                      
  No connection information in your runtime configuration file for datasource [default]  


Exception trace:
 () at /var/www/project.test.2.8/vendor/propel/propel1/runtime/lib/Propel.php:583
 Propel::getMasterConnection() at /var/www/project.test.2.8/vendor/propel/propel1/runtime/lib/Propel.php:561
 Propel::getConnection() at /var/www/project.test.2.8/vendor/propel/propel-bundle/Propel/PropelBundle/Security/Acl/MutableAclProvider.php:55
 Propel\PropelBundle\Security\Acl\MutableAclProvider->__construct() at /var/www/project.test.2.8/app/cache/dev/appDevDebugProjectContainer.php:2368
 appDevDebugProjectContainer->getSecurity_Acl_ProviderService() at /var/www/project.test.2.8/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container.php:312
 Symfony\Component\DependencyInjection\Container->get() at /var/www/project.test.2.8/app/cache/dev/appDevDebugProjectContainer.php:2310
 appDevDebugProjectContainer->getSecurity_Access_DecisionManagerService() at /var/www/project.test.2.8/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container.php:312
 Symfony\Component\DependencyInjection\Container->get() at /var/www/project.test.2.8/app/cache/dev/appDevDebugProjectContainer.php:2420
 appDevDebugProjectContainer->getSecurity_AuthorizationCheckerService() at /var/www/project.test.2.8/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container.php:312
 Symfony\Component\DependencyInjection\Container->get() at /var/www/project.test.2.8/app/cache/dev/appDevDebugProjectContainer.php:3562
 appDevDebugProjectContainer->getTwigService() at /var/www/project.test.2.8/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container.php:312
 Symfony\Component\DependencyInjection\Container->get() at /var/www/project.test.2.8/app/cache/dev/appDevDebugProjectContainer.php:571
 appDevDebugProjectContainer->getCacheWarmerService() at /var/www/project.test.2.8/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container.php:312
 Symfony\Component\DependencyInjection\Container->get() at /var/www/project.test.2.8/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:523
 Symfony\Component\HttpKernel\Kernel->initializeContainer() at /var/www/project.test.2.8/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:133
 Symfony\Component\HttpKernel\Kernel->boot() at /var/www/project.test.2.8/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:70
 Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at /var/www/project.test.2.8/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:123
 Symfony\Component\Console\Application->run() at /var/www/project.test.2.8/app/console:29

If I recall the page or the command line, it works fine.

Someone have ideas?
Thanks.

@lionelbzv lionelbzv changed the title propel1 w. sf2.7 composer:update error Propel1/SF2.7 Bad propel init on first call after clear:cache Nov 3, 2015
@karasq
Copy link

karasq commented Dec 15, 2015

PropelBundle initializes configuration in boot method in PropelBundle.php which seems to be too late in some scenerio. I ran into the same problem when I use propel query in constructor of service that is passed to twig as global variable. Check this out for more details: http://stackoverflow.com/questions/34298976/does-symfony-2-8-load-bundles-and-services-in-correct-order-during-warmup

@lionelbzv
Copy link
Author

thanks for theses explanations, but as say ryan, "In short: this looks like a quirk of Propel to me, but someone who knows more about Propel might know a way to forcefully "boot" it. Propel is special because of the static context it uses."

So, anybody in the Propel core team have advices about this "boot" issue?

@lionelbzv
Copy link
Author

Same problem w. a fresh new project in SF2.8, any help welcome.

@lionelbzv lionelbzv changed the title Propel1/SF2.7 Bad propel init on first call after clear:cache SF2.7 / SF2.8 + Propel1 / Bad propel init on first call after clear:cache Jan 22, 2016
@havvg havvg added this to the 1.5 - Symfony 2.8 LTS support milestone Jan 22, 2016
@havvg
Copy link
Member

havvg commented Jan 23, 2016

Can you provide an installation with the problem? A PR on https://github.com/havvg/symfony-propel-edition would be awesome :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants