pomm-project / pomm-bundle Goto Github PK
View Code? Open in Web Editor NEWPomm2 bundle for Symfony
Pomm2 bundle for Symfony
the ContainerModelLayerPooler
is not able to create a new client because the serviceMap
is not initialize with an empty array.
An error is thrown by the array_key_exists
function, it expects an array as second parameter, null is given here : https://github.com/pomm-project/pomm-bundle/blob/master/sources/lib/Model/ContainerModelLayerPooler.php#L47
Hi,
Pomm-bundle is still not stable?
also hide the wiki please if not used
Probably due to the last PR, I have an inexplicable error:
[Semantical Error] The annotation "@\Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter" in method AppBundle\Controller\IndexController::getSession2Action() does not exist, or could not be auto-loaded.
This error appear only with the third annotation. Remove its, the two others doesn’t produce error.
https://github.com/pomm-project/pomm-bundle/blob/master/tests/src/AppBundle/Controller/IndexController.php#L87
https://travis-ci.org/pomm-project/pomm-bundle/builds/221641797
Hi,
I start to use Pomm2 with Symfony3 and I have a question about "relations" in form.
I have 2 tables "book" and "author". In the book form I can choose one author in a list.
With Doctrine, I add the following lines :
$builder->add('authors', EntityType::class, array( 'class' => 'AppBundle:Author', 'choice_label' => 'fullname', ));
The same thing exists in Pomm ?
Thanks
Because the property serviceMap
can be null the function array_key_exists
raise a warning in class ContainerModelLayerPooler
.
We are using PommBundle 2.3.0
After the last updates I get the following error in production environment in Symfony:
[Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException]
The service "data.collector.time" has a dependency on a non-existent parameter "data_collector.time.class". Did you mean one of these: "data_collector.templates", "data_collector.security.class"?
I get it only for production. Dev Environment works as expected. Adding the following line to parameters.php (in my case) seems to fix it:
'data_collector.time.class' => 'Symfony\Component\HttpKernel\DataCollector\TimeDataCollector'
(just a temorary fix).
For the pomm-project/cli tool.
See the discussion in doctrine/DoctrineBundle#366 for more details, as the reason is the same than for Doctrine connections
When running in prod environment, I get this error message
Fatal error: Uncaught exception 'Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException' with message 'The service "pomm.controller.profiler" has a dependency on a non-existent service "profiler"
Could it be that the service pomm.controller.profiler
should reference @profiler
as an optional argument in pomm-bundle/sources/lib/Resources/config/services.yml
?
pomm.controller.profiler:
class: "PommProject\\SymfonyBridge\\Controller\\PommProfilerController"
arguments: ['@router', '@?profiler', '@twig', '@pomm']
I don't know if this would be the right solution, I am just getting started with symfony.
It would be nice to have the same functionnality as Doctrine in the profiler. the goal is to be able to copy / paste the query to test it.
/**
* @ParamConverter(options={"model": "Test"})
*/
$configuration->getOptions()
in EntityParamConverter.php#L51 is always empty.
Session's clients need to access the connection to shutdown properly. If the connectin is closed by the bundle, the session fails at shutting down the client holder.
PHPUnit 4.7.3 by Sebastian Bergmann and contributors.
.
Time: 842 ms, Memory: 32.25Mb
OK (1 test, 3 assertions)
PHP Warning: pg_connection_status(): 1153 is not a valid PostgreSQL link resource.
Hi all,
I'm trying to use Pomm in a Symfony project (for testing purpose), but I'm stuck right at the beginning of my journey as I'm not able to install the Bundle...
[symfony] : 2.7.3
Running :
$ composer require pomm-project/pomm-bundle 2.0.*@dev
Output me the following :
Problem 1
- Installation request for pomm-project/pomm-bundle 2.0.*@dev -> satisfiable by pomm-project/pomm-bundle[2.0.x-dev].
- pomm-project/pomm-bundle 2.0.x-dev requires pomm-project/foundation 2.0.*@dev -> no matching package found.
I believe this may be caused by my minimum-stability value : stable
(which is the default value), but I do not want to change it.
Anybody has an idea of what I am doing wrong ?
Create
Hello,
I have a problem with a test application I made with Pomm and Symfony Rest Edition (https://github.com/gimler/symfony-rest-edition)
The small test app worked a week ago, but yesterday I had a problem.
Apache Log:
[Mon Apr 13 21:18:22.181242 2015] [:error] [pid 13610] [client 127.0.0.1:57946] PHP Fatal error: Declaration of PommProject\\PommBundle\\Request\\ParamConverter\\EntityParamConverter::apply() must be compatible with Sensio\\Bundle\\FrameworkExtraBundle\\Request\\ParamConverter\\ParamConverterInterface::apply(Symfony\\Component\\HttpFoundation\\Request $request, Sensio\\Bundle\\FrameworkExtraBundle\\Configuration\\ConfigurationInterface $configuration) in /www/blog-backend/vendor/pomm-project/pomm-bundle/sources/lib/Request/ParamConverter/EntityParamConverter.php on line 12
[Mon Apr 13 21:18:22.181328 2015] [:error] [pid 13610] [client 127.0.0.1:57946] PHP Stack trace:
[Mon Apr 13 21:18:22.181361 2015] [:error] [pid 13610] [client 127.0.0.1:57946] PHP 1. {main}() /www/blog-backend/web/app_dev.php:0
[Mon Apr 13 21:18:22.181377 2015] [:error] [pid 13610] [client 127.0.0.1:57946] PHP 2. Symfony\\Component\\HttpKernel\\Kernel->handle() /www/blog-backend/web/app_dev.php:25
[Mon Apr 13 21:18:22.181394 2015] [:error] [pid 13610] [client 127.0.0.1:57946] PHP 3. Symfony\\Component\\HttpKernel\\DependencyInjection\\ContainerAwareHttpKernel->handle() /www/blog-backend/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:186
[Mon Apr 13 21:18:22.181410 2015] [:error] [pid 13610] [client 127.0.0.1:57946] PHP 4. Symfony\\Component\\HttpKernel\\HttpKernel->handle() /www/blog-backend/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/ContainerAwareHttpKernel.php:64
[Mon Apr 13 21:18:22.181424 2015] [:error] [pid 13610] [client 127.0.0.1:57946] PHP 5. Symfony\\Component\\HttpKernel\\HttpKernel->handleRaw() /www/blog-backend/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:66
[Mon Apr 13 21:18:22.181437 2015] [:error] [pid 13610] [client 127.0.0.1:57946] PHP 6. Symfony\\Component\\EventDispatcher\\Debug\\TraceableEventDispatcher->dispatch() /www/blog-backend/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:138
[Mon Apr 13 21:18:22.181450 2015] [:error] [pid 13610] [client 127.0.0.1:57946] PHP 7. Symfony\\Component\\EventDispatcher\\Debug\\TraceableEventDispatcher->preProcess() /www/blog-backend/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcher.php:107
[Mon Apr 13 21:18:22.181463 2015] [:error] [pid 13610] [client 127.0.0.1:57946] PHP 8. Symfony\\Component\\EventDispatcher\\ContainerAwareEventDispatcher->getListeners() /www/blog-backend/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcher.php:215
[Mon Apr 13 21:18:22.181475 2015] [:error] [pid 13610] [client 127.0.0.1:57946] PHP 9. Symfony\\Component\\EventDispatcher\\ContainerAwareEventDispatcher->lazyLoad() /www/blog-backend/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/ContainerAwareEventDispatcher.php:128
[Mon Apr 13 21:18:22.181488 2015] [:error] [pid 13610] [client 127.0.0.1:57946] PHP 10. Symfony\\Component\\DependencyInjection\\Container->get() /www/blog-backend/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/ContainerAwareEventDispatcher.php:188
[Mon Apr 13 21:18:22.181501 2015] [:error] [pid 13610] [client 127.0.0.1:57946] PHP 11. appDevDebugProjectContainer->getSensioFrameworkExtra_Converter_ListenerService() /www/blog-backend/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container.php:326
[Mon Apr 13 21:18:22.181513 2015] [:error] [pid 13610] [client 127.0.0.1:57946] PHP 12. Symfony\\Component\\DependencyInjection\\Container->get() /www/blog-backend/app/cache/dev/appDevDebugProjectContainer.php:3209
[Mon Apr 13 21:18:22.181526 2015] [:error] [pid 13610] [client 127.0.0.1:57946] PHP 13. appDevDebugProjectContainer->getSensioFrameworkExtra_Converter_ManagerService() /www/blog-backend/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container.php:326
[Mon Apr 13 21:18:22.181546 2015] [:error] [pid 13610] [client 127.0.0.1:57946] PHP 14. Symfony\\Component\\DependencyInjection\\Container->get() /www/blog-backend/app/cache/dev/appDevDebugProjectContainer.php:3226
[Mon Apr 13 21:18:22.181566 2015] [:error] [pid 13610] [client 127.0.0.1:57946] PHP 15. appDevDebugProjectContainer->getPomm_Converter_EntityService() /www/blog-backend/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container.php:326
[Mon Apr 13 21:18:22.181577 2015] [:error] [pid 13610] [client 127.0.0.1:57946] PHP 16. spl_autoload_call() /www/blog-backend/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container.php:2763
[Mon Apr 13 21:18:22.181589 2015] [:error] [pid 13610] [client 127.0.0.1:57946] PHP 17. Composer\\Autoload\\ClassLoader->loadClass() /www/blog-backend/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container.php:0
[Mon Apr 13 21:18:22.181600 2015] [:error] [pid 13610] [client 127.0.0.1:57946] PHP 18. Composer\\Autoload\\includeFile() /www/blog-backend/vendor/composer/ClassLoader.php:301
[Mon Apr 13 21:18:22.181610 2015] [:error] [pid 13610] [client 127.0.0.1:57946] PHP 19. include() /www/blog-backend/vendor/composer/ClassLoader.php:412
[Mon Apr 13 21:18:22.230477 2015] [:error] [pid 13610] [client 127.0.0.1:57946] PHP Fatal error: Uncaught exception 'Symfony\\Component\\Debug\\Exception\\FatalErrorException' with message 'Compile Error: Declaration of PommProject\\PommBundle\\Request\\ParamConverter\\EntityParamConverter::apply() must be compatible with Sensio\\Bundle\\FrameworkExtraBundle\\Request\\ParamConverter\\ParamConverterInterface::apply(Symfony\\Component\\HttpFoundation\\Request $request, Sensio\\Bundle\\FrameworkExtraBundle\\Configuration\\ConfigurationInterface $configuration)' in /www/blog-backend/vendor/pomm-project/pomm-bundle/sources/lib/Request/ParamConverter/EntityParamConverter.php:12\nStack trace:\n#0 /www/blog-backend/vendor/composer/ClassLoader.php(412): ()\n#1 /www/blog-backend/vendor/composer/ClassLoader.php(301): Composer\\Autoload\\includeFile()\n#2 /www/blog-backend/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container.php(0): Composer\\Autoload\\ClassLoader->loadClass()\n#3 /www/blog-backend/vendor/symfony/symfony/src/Symf in /www/blog-backend/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container.php on line 296
[Mon Apr 13 21:18:22.230505 2015] [:error] [pid 13610] [client 127.0.0.1:57946] PHP Stack trace:
[Mon Apr 13 21:18:22.230516 2015] [:error] [pid 13610] [client 127.0.0.1:57946] PHP 1. {main}() /www/blog-backend/web/app_dev.php:0
[Mon Apr 13 21:18:22.230528 2015] [:error] [pid 13610] [client 127.0.0.1:57946] PHP 2. Symfony\\Component\\HttpKernel\\Kernel->handle() /www/blog-backend/web/app_dev.php:25
[Mon Apr 13 21:18:22.230541 2015] [:error] [pid 13610] [client 127.0.0.1:57946] PHP 3. Symfony\\Component\\HttpKernel\\DependencyInjection\\ContainerAwareHttpKernel->handle() /www/blog-backend/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:186
[Mon Apr 13 21:18:22.230554 2015] [:error] [pid 13610] [client 127.0.0.1:57946] PHP 4. Symfony\\Component\\HttpKernel\\HttpKernel->handle() /www/blog-backend/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/ContainerAwareHttpKernel.php:64
[Mon Apr 13 21:18:22.230566 2015] [:error] [pid 13610] [client 127.0.0.1:57946] PHP 5. Symfony\\Component\\HttpKernel\\HttpKernel->handleRaw() /www/blog-backend/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:66
[Mon Apr 13 21:18:22.230579 2015] [:error] [pid 13610] [client 127.0.0.1:57946] PHP 6. Symfony\\Component\\EventDispatcher\\Debug\\TraceableEventDispatcher->dispatch() /www/blog-backend/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:138
[Mon Apr 13 21:18:22.230599 2015] [:error] [pid 13610] [client 127.0.0.1:57946] PHP 7. Symfony\\Component\\EventDispatcher\\Debug\\TraceableEventDispatcher->preProcess() /www/blog-backend/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcher.php:107
[Mon Apr 13 21:18:22.230653 2015] [:error] [pid 13610] [client 127.0.0.1:57946] PHP 8. Symfony\\Component\\EventDispatcher\\ContainerAwareEventDispatcher->getListeners() /www/blog-backend/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcher.php:215
[Mon Apr 13 21:18:22.230668 2015] [:error] [pid 13610] [client 127.0.0.1:57946] PHP 9. Symfony\\Component\\EventDispatcher\\ContainerAwareEventDispatcher->lazyLoad() /www/blog-backend/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/ContainerAwareEventDispatcher.php:128
[Mon Apr 13 21:18:22.230681 2015] [:error] [pid 13610] [client 127.0.0.1:57946] PHP 10. Symfony\\Component\\DependencyInjection\\Container->get() /www/blog-backend/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/ContainerAwareEventDispatcher.php:188
[Mon Apr 13 21:18:22.230693 2015] [:error] [pid 13610] [client 127.0.0.1:57946] PHP 11. appDevDebugProjectContainer->getSensioFrameworkExtra_Converter_ListenerService() /www/blog-backend/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container.php:326
[Mon Apr 13 21:18:22.230706 2015] [:error] [pid 13610] [client 127.0.0.1:57946] PHP 12. Symfony\\Component\\DependencyInjection\\Container->get() /www/blog-backend/app/cache/dev/appDevDebugProjectContainer.php:3209
[Mon Apr 13 21:18:22.230718 2015] [:error] [pid 13610] [client 127.0.0.1:57946] PHP 13. appDevDebugProjectContainer->getSensioFrameworkExtra_Converter_ManagerService() /www/blog-backend/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container.php:326
[Mon Apr 13 21:18:22.230730 2015] [:error] [pid 13610] [client 127.0.0.1:57946] PHP 14. Symfony\\Component\\DependencyInjection\\Container->get() /www/blog-backend/app/cache/dev/appDevDebugProjectContainer.php:3226
[Mon Apr 13 21:18:22.230742 2015] [:error] [pid 13610] [client 127.0.0.1:57946] PHP 15. appDevDebugProjectContainer->getPomm_Converter_EntityService() /www/blog-backend/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container.php:326
[Mon Apr 13 21:18:22.230753 2015] [:error] [pid 13610] [client 127.0.0.1:57946] PHP 16. spl_autoload_call() /www/blog-backend/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container.php:2763
[Mon Apr 13 21:18:22.230765 2015] [:error] [pid 13610] [client 127.0.0.1:57946] PHP 17. Composer\\Autoload\\ClassLoader->loadClass() /www/blog-backend/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container.php:0
[Mon Apr 13 21:18:22.230776 2015] [:error] [pid 13610] [client 127.0.0.1:57946] PHP 18. Composer\\Autoload\\includeFile() /www/blog-backend/vendor/composer/ClassLoader.php:301
[Mon Apr 13 21:18:22.230786 2015] [:error] [pid 13610] [client 127.0.0.1:57946] PHP 19. include() /www/blog-backend/vendor/composer/ClassLoader.php:412
Symfony app/log/dev.log:
[2015-04-13 21:18:22] request.INFO: Matched route "get_posts" (parameters: "_controller": "Bolbo\BlogBundle\Controller\PostController::getPostsAction", "_format": "null", "_route": "get_posts") [] []
[2015-04-13 21:18:22] security.INFO: Populated SecurityContext with an anonymous Token [] []
[2015-04-13 21:18:22] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\DebugHandlersListener::configure". [] []
[2015-04-13 21:18:22] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\ProfilerListener::onKernelRequest". [] []
[2015-04-13 21:18:22] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\DumpListener::configure". [] []
[2015-04-13 21:18:22] event.DEBUG: Notified event "kernel.request" to listener "FOS\RestBundle\EventListener\MimeTypeListener::onKernelRequest". [] []
[2015-04-13 21:18:22] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\FragmentListener::onKernelRequest". [] []
[2015-04-13 21:18:22] event.DEBUG: Notified event "kernel.request" to listener "FOS\RestBundle\EventListener\FormatListener::onKernelRequest". [] []
[2015-04-13 21:18:22] event.DEBUG: Notified event "kernel.request" to listener "FOS\RestBundle\EventListener\VersionListener::onKernelRequest". [] []
[2015-04-13 21:18:22] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\RouterListener::onKernelRequest". [] []
[2015-04-13 21:18:22] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\LocaleListener::onKernelRequest". [] []
[2015-04-13 21:18:22] event.DEBUG: Notified event "kernel.request" to listener "FOS\RestBundle\EventListener\BodyListener::onKernelRequest". [] []
[2015-04-13 21:18:22] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\TranslatorListener::onKernelRequest". [] []
[2015-04-13 21:18:22] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Component\Security\Http\Firewall::onKernelRequest". [] []
[2015-04-13 21:18:22] event.DEBUG: Notified event "kernel.request" to listener "Nelmio\ApiDocBundle\EventListener\RequestListener::onKernelRequest". [] []
[2015-04-13 21:18:22] php.EMERGENCY: Fatal Compile Error: Declaration of PommProject\PommBundle\Request\ParamConverter\EntityParamConverter::apply() must be compatible with Sensio\Bundle\FrameworkExtraBundle\Request\ParamConverter\ParamConverterInterface::apply(Symfony\Component\HttpFoundation\Request $request, Sensio\Bundle\FrameworkExtraBundle\Configuration\ConfigurationInterface $configuration) {"type":1,"file":"/www/blog-backend/vendor/pomm-project/pomm-bundle/sources/lib/Request/ParamConverter/EntityParamConverter.php","line":12,"level":22527,"stack":[{"file":"/www/blog-backend/vendor/composer/ClassLoader.php","line":412,"include_filename":"/www/blog-backend/vendor/pomm-project/pomm-bundle/sources/lib/Request/ParamConverter/EntityParamConverter.php","args":[]},{"function":"Composer\\Autoload\\includeFile","file":"/www/blog-backend/vendor/composer/ClassLoader.php","line":301,"args":[]},{"function":"loadClass","type":"->","class":"Composer\\Autoload\\ClassLoader","file":"/www/blog-backend/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container.php","line":0,"args":[]},{"function":"spl_autoload_call","file":"/www/blog-backend/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container.php","line":2763,"args":[]},{"function":"getPomm_Converter_EntityService","type":"->","class":"appDevDebugProjectContainer","file":"/www/blog-backend/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container.php","line":326,"args":[]},{"function":"get","type":"->","class":"Symfony\\Component\\DependencyInjection\\Container","file":"/www/blog-backend/app/cache/dev/appDevDebugProjectContainer.php","line":3226,"args":[]},{"function":"getSensioFrameworkExtra_Converter_ManagerService","type":"->","class":"appDevDebugProjectContainer","file":"/www/blog-backend/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container.php","line":326,"args":[]},{"function":"get","type":"->","class":"Symfony\\Component\\DependencyInjection\\Container","file":"/www/blog-backend/app/cache/dev/appDevDebugProjectContainer.php","line":3209,"args":[]},{"function":"getSensioFrameworkExtra_Converter_ListenerService","type":"->","class":"appDevDebugProjectContainer","file":"/www/blog-backend/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container.php","line":326,"args":[]},{"function":"get","type":"->","class":"Symfony\\Component\\DependencyInjection\\Container","file":"/www/blog-backend/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/ContainerAwareEventDispatcher.php","line":188,"args":[]},{"function":"lazyLoad","type":"->","class":"Symfony\\Component\\EventDispatcher\\ContainerAwareEventDispatcher","file":"/www/blog-backend/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/ContainerAwareEventDispatcher.php","line":128,"args":[]},{"function":"getListeners","type":"->","class":"Symfony\\Component\\EventDispatcher\\ContainerAwareEventDispatcher","file":"/www/blog-backend/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcher.php","line":215,"args":[]},{"function":"preProcess","type":"->","class":"Symfony\\Component\\EventDispatcher\\Debug\\TraceableEventDispatcher","file":"/www/blog-backend/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcher.php","line":107,"args":[]},{"function":"dispatch","type":"->","class":"Symfony\\Component\\EventDispatcher\\Debug\\TraceableEventDispatcher","file":"/www/blog-backend/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php","line":138,"args":[]},{"function":"handleRaw","type":"->","class":"Symfony\\Component\\HttpKernel\\HttpKernel","file":"/www/blog-backend/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php","line":66,"args":[]},{"function":"handle","type":"->","class":"Symfony\\Component\\HttpKernel\\HttpKernel","file":"/www/blog-backend/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/ContainerAwareHttpKernel.php","line":64,"args":[]},{"function":"handle","type":"->","class":"Symfony\\Component\\HttpKernel\\DependencyInjection\\ContainerAwareHttpKernel","file":"/www/blog-backend/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php","line":186,"args":[]},{"function":"handle","type":"->","class":"Symfony\\Component\\HttpKernel\\Kernel","file":"/www/blog-backend/web/app_dev.php","line":25,"args":[]},{"function":"{main}","file":"/www/blog-backend/web/app_dev.php","line":0,"args":[]}]} []
[2015-04-13 21:18:22] request.CRITICAL: Uncaught PHP Exception Symfony\Component\Debug\Exception\FatalErrorException: "Compile Error: Declaration of PommProject\PommBundle\Request\ParamConverter\EntityParamConverter::apply() must be compatible with Sensio\Bundle\FrameworkExtraBundle\Request\ParamConverter\ParamConverterInterface::apply(Symfony\Component\HttpFoundation\Request $request, Sensio\Bundle\FrameworkExtraBundle\Configuration\ConfigurationInterface $configuration)" at /www/blog-backend/vendor/pomm-project/pomm-bundle/sources/lib/Request/ParamConverter/EntityParamConverter.php line 12 {"exception":"[object] (Symfony\\Component\\Debug\\Exception\\FatalErrorException(code: 0): Compile Error: Declaration of PommProject\\PommBundle\\Request\\ParamConverter\\EntityParamConverter::apply() must be compatible with Sensio\\Bundle\\FrameworkExtraBundle\\Request\\ParamConverter\\ParamConverterInterface::apply(Symfony\\Component\\HttpFoundation\\Request $request, Sensio\\Bundle\\FrameworkExtraBundle\\Configuration\\ConfigurationInterface $configuration) at /www/blog-backend/vendor/pomm-project/pomm-bundle/sources/lib/Request/ParamConverter/EntityParamConverter.php:12)"} []
[2015-04-13 21:18:22] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\DebugHandlersListener::configure". [] []
[2015-04-13 21:18:22] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\ProfilerListener::onKernelRequest". [] []
[2015-04-13 21:18:22] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\DumpListener::configure". [] []
[2015-04-13 21:18:22] event.DEBUG: Notified event "kernel.request" to listener "FOS\RestBundle\EventListener\MimeTypeListener::onKernelRequest". [] []
[2015-04-13 21:18:22] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\FragmentListener::onKernelRequest". [] []
[2015-04-13 21:18:22] event.DEBUG: Notified event "kernel.request" to listener "FOS\RestBundle\EventListener\FormatListener::onKernelRequest". [] []
[2015-04-13 21:18:22] event.DEBUG: Notified event "kernel.request" to listener "FOS\RestBundle\EventListener\VersionListener::onKernelRequest". [] []
[2015-04-13 21:18:22] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\RouterListener::onKernelRequest". [] []
[2015-04-13 21:18:22] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\LocaleListener::onKernelRequest". [] []
[2015-04-13 21:18:22] event.DEBUG: Notified event "kernel.request" to listener "FOS\RestBundle\EventListener\BodyListener::onKernelRequest". [] []
[2015-04-13 21:18:22] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\TranslatorListener::onKernelRequest". [] []
[2015-04-13 21:18:22] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Component\Security\Http\Firewall::onKernelRequest". [] []
[2015-04-13 21:18:22] event.DEBUG: Notified event "kernel.request" to listener "Nelmio\ApiDocBundle\EventListener\RequestListener::onKernelRequest". [] []
[2015-04-13 21:18:22] event.DEBUG: Notified event "kernel.exception" to listener "Symfony\Component\EventDispatcher\Debug\WrappedListener::__invoke". [] []
[2015-04-13 21:18:22] event.DEBUG: Notified event "kernel.exception" to listener "Symfony\Component\EventDispatcher\Debug\WrappedListener::__invoke". [] []
[2015-04-13 21:18:22] event.DEBUG: Notified event "kernel.exception" to listener "Symfony\Component\EventDispatcher\Debug\WrappedListener::__invoke". [] []
[2015-04-13 21:18:22] event.DEBUG: Notified event "kernel.exception" to listener "Symfony\Component\EventDispatcher\Debug\WrappedListener::__invoke". [] []
[2015-04-13 21:18:22] event.DEBUG: Notified event "kernel.finish_request" to listener "Symfony\Component\HttpKernel\EventListener\LocaleListener::onKernelFinishRequest". [] []
[2015-04-13 21:18:22] event.DEBUG: Notified event "kernel.finish_request" to listener "Symfony\Component\HttpKernel\EventListener\TranslatorListener::onKernelFinishRequest". [] []
[2015-04-13 21:18:22] event.DEBUG: Notified event "kernel.finish_request" to listener "Symfony\Component\HttpKernel\EventListener\RouterListener::onKernelFinishRequest". [] []
[2015-04-13 21:18:22] event.DEBUG: Notified event "kernel.finish_request" to listener "Symfony\Component\Security\Http\Firewall::onKernelFinishRequest". [] []
[2015-04-13 21:18:22] request.CRITICAL: Exception thrown when handling an exception (Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException: Circular reference detected for service "sensio_framework_extra.converter.listener", path: "sensio_framework_extra.converter.listener -> sensio_framework_extra.converter.manager -> pomm.converter.entity". at /www/blog-backend/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container.php line 296) {"exception":"[object] (Symfony\\Component\\DependencyInjection\\Exception\\ServiceCircularReferenceException(code: 0): Circular reference detected for service \"sensio_framework_extra.converter.listener\", path: \"sensio_framework_extra.converter.listener -> sensio_framework_extra.converter.manager -> pomm.converter.entity\". at /www/blog-backend/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container.php:296)"} []
[2015-04-13 21:18:22] php.EMERGENCY: Uncaught Exception: Circular reference detected for service "sensio_framework_extra.converter.listener", path: "sensio_framework_extra.converter.listener -> sensio_framework_extra.converter.manager -> pomm.converter.entity". {"type":1,"file":"/www/blog-backend/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container.php","line":296,"level":22527,"stack":[{"file":"/www/blog-backend/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/ContainerAwareEventDispatcher.php","line":188,"function":"get","class":"Symfony\\Component\\DependencyInjection\\Container","type":"->","args":["sensio_framework_extra.converter.listener"]},{"file":"/www/blog-backend/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/ContainerAwareEventDispatcher.php","line":128,"function":"lazyLoad","class":"Symfony\\Component\\EventDispatcher\\ContainerAwareEventDispatcher","type":"->","args":["kernel.controller"]},{"file":"/www/blog-backend/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcher.php","line":215,"function":"getListeners","class":"Symfony\\Component\\EventDispatcher\\ContainerAwareEventDispatcher","type":"->","args":["kernel.controller"]},{"file":"/www/blog-backend/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcher.php","line":107,"function":"preProcess","class":"Symfony\\Component\\EventDispatcher\\Debug\\TraceableEventDispatcher","type":"->","args":["kernel.controller"]},{"file":"/www/blog-backend/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php","line":138,"function":"dispatch","class":"Symfony\\Component\\EventDispatcher\\Debug\\TraceableEventDispatcher","type":"->","args":["kernel.controller","[object] (Symfony\\Component\\HttpKernel\\Event\\FilterControllerEvent: {})"]},{"file":"/www/blog-backend/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php","line":66,"function":"handleRaw","class":"Symfony\\Component\\HttpKernel\\HttpKernel","type":"->","args":["[object] (Symfony\\Component\\HttpFoundation\\Request: {\"attributes\":{},\"request\":{},\"query\":{},\"server\":{},\"files\":{},\"cookies\":{},\"headers\":{}})",2]},{"file":"/www/blog-backend/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/ContainerAwareHttpKernel.php","line":64,"function":"handle","class":"Symfony\\Component\\HttpKernel\\HttpKernel","type":"->","args":["[object] (Symfony\\Component\\HttpFoundation\\Request: {\"attributes\":{},\"request\":{},\"query\":{},\"server\":{},\"files\":{},\"cookies\":{},\"headers\":{}})",2,true]},{"file":"/www/blog-backend/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/ExceptionListener.php","line":58,"function":"handle","class":"Symfony\\Component\\HttpKernel\\DependencyInjection\\ContainerAwareHttpKernel","type":"->","args":["[object] (Symfony\\Component\\HttpFoundation\\Request: {\"attributes\":{},\"request\":{},\"query\":{},\"server\":{},\"files\":{},\"cookies\":{},\"headers\":{}})",2,true]},{"function":"onKernelException","class":"Symfony\\Component\\HttpKernel\\EventListener\\ExceptionListener","type":"->","args":["[object] (Symfony\\Component\\HttpKernel\\Event\\GetResponseForExceptionEvent: {})","kernel.exception","[object] (Symfony\\Component\\HttpKernel\\Debug\\TraceableEventDispatcher: {})"]},{"file":"/www/blog-backend/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Debug/WrappedListener.php","line":61,"function":"call_user_func","args":[["[object] (Symfony\\Component\\HttpKernel\\EventListener\\ExceptionListener: {})","onKernelException"],"[object] (Symfony\\Component\\HttpKernel\\Event\\GetResponseForExceptionEvent: {})","kernel.exception","[object] (Symfony\\Component\\HttpKernel\\Debug\\TraceableEventDispatcher: {})"]},{"function":"__invoke","class":"Symfony\\Component\\EventDispatcher\\Debug\\WrappedListener","type":"->","args":["[object] (Symfony\\Component\\HttpKernel\\Event\\GetResponseForExceptionEvent: {})","kernel.exception","[object] (Symfony\\Component\\EventDispatcher\\ContainerAwareEventDispatcher: {})"]},{"file":"/www/blog-backend/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventDispatcher.php","line":164,"function":"call_user_func","args":["[object] (Symfony\\Component\\EventDispatcher\\Debug\\WrappedListener: {})","[object] (Symfony\\Component\\HttpKernel\\Event\\GetResponseForExceptionEvent: {})","kernel.exception","[object] (Symfony\\Component\\EventDispatcher\\ContainerAwareEventDispatcher: {})"]},{"file":"/www/blog-backend/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventDispatcher.php","line":53,"function":"doDispatch","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->","args":[["[object] (Symfony\\Component\\EventDispatcher\\Debug\\WrappedListener: {})","[object] (Symfony\\Component\\EventDispatcher\\Debug\\WrappedListener: {})","[object] (Symfony\\Component\\EventDispatcher\\Debug\\WrappedListener: {})","[object] (Symfony\\Component\\EventDispatcher\\Debug\\WrappedListener: {})"],"kernel.exception","[object] (Symfony\\Component\\HttpKernel\\Event\\GetResponseForExceptionEvent: {})"]},{"file":"/www/blog-backend/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/ContainerAwareEventDispatcher.php","line":167,"function":"dispatch","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->","args":["kernel.exception","[object] (Symfony\\Component\\HttpKernel\\Event\\GetResponseForExceptionEvent: {})"]},{"file":"/www/blog-backend/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcher.php","line":112,"function":"dispatch","class":"Symfony\\Component\\EventDispatcher\\ContainerAwareEventDispatcher","type":"->","args":["kernel.exception","[object] (Symfony\\Component\\HttpKernel\\Event\\GetResponseForExceptionEvent: {})"]},{"file":"/www/blog-backend/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php","line":222,"function":"dispatch","class":"Symfony\\Component\\EventDispatcher\\Debug\\TraceableEventDispatcher","type":"->","args":["kernel.exception","[object] (Symfony\\Component\\HttpKernel\\Event\\GetResponseForExceptionEvent: {})"]},{"file":"/www/blog-backend/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php","line":99,"function":"handleException","class":"Symfony\\Component\\HttpKernel\\HttpKernel","type":"->","args":["[object] (Symfony\\Component\\Debug\\Exception\\FatalErrorException(code: 0): Compile Error: Declaration of PommProject\\PommBundle\\Request\\ParamConverter\\EntityParamConverter::apply() must be compatible with Sensio\\Bundle\\FrameworkExtraBundle\\Request\\ParamConverter\\ParamConverterInterface::apply(Symfony\\Component\\HttpFoundation\\Request $request, Sensio\\Bundle\\FrameworkExtraBundle\\Configuration\\ConfigurationInterface $configuration) at /www/blog-backend/vendor/pomm-project/pomm-bundle/sources/lib/Request/ParamConverter/EntityParamConverter.php:12)","[object] (Symfony\\Component\\HttpFoundation\\Request: {\"attributes\":{},\"request\":{},\"query\":{},\"server\":{},\"files\":{},\"cookies\":{},\"headers\":{}})",1]},{"function":"terminateWithException","class":"Symfony\\Component\\HttpKernel\\HttpKernel","type":"->","args":["[object] (Symfony\\Component\\Debug\\Exception\\FatalErrorException(code: 0): Compile Error: Declaration of PommProject\\PommBundle\\Request\\ParamConverter\\EntityParamConverter::apply() must be compatible with Sensio\\Bundle\\FrameworkExtraBundle\\Request\\ParamConverter\\ParamConverterInterface::apply(Symfony\\Component\\HttpFoundation\\Request $request, Sensio\\Bundle\\FrameworkExtraBundle\\Configuration\\ConfigurationInterface $configuration) at /www/blog-backend/vendor/pomm-project/pomm-bundle/sources/lib/Request/ParamConverter/EntityParamConverter.php:12)"]},{"file":"/www/blog-backend/vendor/symfony/symfony/src/Symfony/Component/Debug/ErrorHandler.php","line":475,"function":"call_user_func","args":[["[object] (Symfony\\Component\\HttpKernel\\DependencyInjection\\ContainerAwareHttpKernel: {})","terminateWithException"],"[object] (Symfony\\Component\\Debug\\Exception\\FatalErrorException(code: 0): Compile Error: Declaration of PommProject\\PommBundle\\Request\\ParamConverter\\EntityParamConverter::apply() must be compatible with Sensio\\Bundle\\FrameworkExtraBundle\\Request\\ParamConverter\\ParamConverterInterface::apply(Symfony\\Component\\HttpFoundation\\Request $request, Sensio\\Bundle\\FrameworkExtraBundle\\Configuration\\ConfigurationInterface $configuration) at /www/blog-backend/vendor/pomm-project/pomm-bundle/sources/lib/Request/ParamConverter/EntityParamConverter.php:12)"]},{"file":"/www/blog-backend/vendor/symfony/symfony/src/Symfony/Component/Debug/ErrorHandler.php","line":527,"function":"handleException","class":"Symfony\\Component\\Debug\\ErrorHandler","type":"->","args":["[object] (Symfony\\Component\\Debug\\Exception\\FatalErrorException(code: 0): Compile Error: Declaration of PommProject\\PommBundle\\Request\\ParamConverter\\EntityParamConverter::apply() must be compatible with Sensio\\Bundle\\FrameworkExtraBundle\\Request\\ParamConverter\\ParamConverterInterface::apply(Symfony\\Component\\HttpFoundation\\Request $request, Sensio\\Bundle\\FrameworkExtraBundle\\Configuration\\ConfigurationInterface $configuration) at /www/blog-backend/vendor/pomm-project/pomm-bundle/sources/lib/Request/ParamConverter/EntityParamConverter.php:12)",{"type":64,"message":"Declaration of PommProject\\PommBundle\\Request\\ParamConverter\\EntityParamConverter::apply() must be compatible with Sensio\\Bundle\\FrameworkExtraBundle\\Request\\ParamConverter\\ParamConverterInterface::apply(Symfony\\Component\\HttpFoundation\\Request $request, Sensio\\Bundle\\FrameworkExtraBundle\\Configuration\\ConfigurationInterface $configuration)","file":"/www/blog-backend/vendor/pomm-project/pomm-bundle/sources/lib/Request/ParamConverter/EntityParamConverter.php","line":12}]},{"function":"handleFatalError","class":"Symfony\\Component\\Debug\\ErrorHandler","type":"::","args":[]}]} []
App source: https://github.com/bolbo/blog-backend
Do you have a idea?
Thanks
Add profiler support.
With the new organisation folder and services
Hi,
I use pomm-bundle in a Symfony 4.4 project. Since the 2.3 version of POMM, I have the following notice:
User Deprecated: The PommProject\SymfonyBridge\PropertyInfo\Extractor\PommExtractor class is deprecated since version 2.3 and will be removed in 3.0. Use the PommProject\SymfonyBridge\PropertyInfo\Extractor\TypeExtractor class instead.
So I have upgraded pomm-bundle to version 3.0, but I still have this notice message.
Could you please give me an explanation ? Have I missed something and is there a way to avoid these notices ?
Thank you
Pomm generates model, structure and other files to directory structure Connectionalias\Schema. If I have only one connection to DB, which I believe is very common scenario, I think that there could be something like "default connction" which will ommit this in namespace and in path. In result there will be only src/AppBundle/Model/ instead of src/AppBundle/Model/Mydb/PublicSchema/.
The pomm symfony bridge has been updated with a controller + view to perform EXPLAIN on statements from the profiler. The changes have been commited in a explain
branch to ovoid breaking PommBundle.
where in github is this http://www.pomm-project.org/documentation/sandbox2 ? i wanted to make a typo fix yet i couldn't find it
you will be granted
-> you will be greeted
The trusted_proxies
configuration key has been deprecated from Sf 3.3. It makes commands like cache:clear
to throw an exception because this key is present in Pomm config.yml
file.
Hi,
Just to let you know what error message I got after updating pomm through composer :
- Removing pomm-project/foundation (2.0-beta-1)
- Installing pomm-project/foundation (2.0.0-beta.2)
Loading from cache
- Removing pomm-project/model-manager (2.0-beta-1)
- Installing pomm-project/model-manager (2.0.0-beta.2)
Loading from cache
- Updating pomm-project/cli (dev-master d3f8eda => 2.0.0-beta.2)
Checking out edf5b8b50bff102522988ce39eceaff89d1b309f
- Updating pomm-project/pomm-symfony-bridge dev-master (e034648 => ca32a31)
Checking out ca32a31c3790362410a5195583cfc7147e1f261c
- Updating pomm-project/pomm-bundle dev-master (1a7b1df => 53233a5)
Checking out 53233a5ace1a27921c79cfccf7f622daf855a8f7
[Symfony\Component\Config\Definition\Exception\InvalidConfigurationException]
Unrecognized option "web_profiler" under "pomm"
After commenting the following lines in app/config/config_dev.yml, everything was back to normal.
pomm:
web_profiler: true
Hope it helps.
Hi,
well, my real problem with Pomm2 is the following one. I have the following controller:
<?php
namespace WpBundle\Controller\Frontend;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use WpBundle\Controller\Api\FrontendController;
class TestimonialsController extends FrontendController
{
public function indexAction() {
$pomm = $this->get('pomm')['caraus'];
$testimonials = $pomm->getModel('WpBundle\Model\Testimonial\Testimonial')
->findAll();
return $this->render('WpBundle:frontend/testimonials:index.html.smarty', $this->mergeLayout(
array(
'testimonials' => $testimonials,
),
'testimonials'
));
}
}
And I get the error:
No pooler registered for type 'model'. Poolers available: {prepared_query, query_manager, converter, observer, inspector, listener}.
500 Internal Server Error - FoundationException
I used the standard configuration from the quick setup tutorial:
routing.php:
<?php
use Symfony\Component\Routing\RouteCollection;
$collection = new RouteCollection();
$collection->addCollection(
$loader->import('@PommBundle/Resources/config/routing.yml')
);
$collection->addCollection(
$loader->import('@WpBundle/Resources/config/routing.php')
);
return $collection;
config.php:
// Pomm Configuration
$container->loadFromExtension('pomm', array(
'configuration' => array(
'caraus' => array(
'dsn' => 'pgsql://%database.user%:%database.password%@%database.host%:%database.port%/%database.name%',
),
),
'logger' => array(
'service' => '@logger',
),
));
The model is generated. I found out, that all poolers that are listed in the error message (prepared_query, query_manager, converter, observer, inspector, listener) are in the Foundation bundle, and the model pooler is in the model-manager bundle. So I suppose that the pooler isn't loaded somehow (sorry for the my terminology; I just try to explain as I can). Similar code without Symfony, with getModel works as expected. If I use getInspector instead of getModel the loading goes further throwing other exceptions, but I suppose it isn't the way it should work.
It is the reason I can't work with Pomm2 now
I updated pomm-bundle to version 2.3.0 and it is impossible for me to use the new session_builder
.
My service definition is not yet registered in the container builder when the PommExtension
try to use it here
Hello @chanmix51
Following this PR : pomm-project/Foundation#130, Foundation and ModelManager are now compabibles with php >= 8.0
Now, I try to use pomm-bundle on php>=8.0
https://packagist.org/packages/pomm-project/pomm-bundle#3.0.0 Pomm Bundle requires ModelManager 2.0 which is the previous version < php8
Is it possible to make Pomm Bundle use ModelManager dev-master / 2.1.x-dev so the bundle could be compatible with php >= 8.0 ?
Thanks
Add the according composer.json file with the minimum dependencies need for the bundle to work with a full stack Sf2.
Here is my problem, I created a table with a field having an ENUM type. When I try to insert my object into a database via the insertOne method of the model manager. I have to create my own converter but what should I put in it?
Here is an example of the created type:
CREATE TYPE my_type AS ENUM ('type1', 'type2' type3 ');
Hey,
I'm writing currently user authentication. I saw that there was a PommUserProvider for Pomm1, but I haven't found something like this for Pomm2. Should I implement it and make a pull request? I would also write a short wiki page with a description how it could be used. Another idea, since I will write a User class, I could also create a separate bundle for that (something like FosUserBundle for Pomm2, I don't use FosUserBundle since it has some restrictions I don't like.
Regards
Eugene
Hi,
I get an error when I try to generate model files.
I use Symfony 2.6.1
and pomm-project/pomm-bundle dev-master (5f0adcd).
I followed the set up instructions shown on https://github.com/pomm-project/pomm-bundle
However when I type:
app/console pomm:generate:relation-all -d src -a 'MyBundle\Model' db mydatabase
I get this error message:
[PommProject\Cli\Exception\CliException]
Could not load configuration '/var/www/monsite/.pomm_cli_bootstrap.php'.
As far as I understand the pomm configuration is in config.yml
pomm:
configuration:
my_db1:
dsn: 'pgsql://myuser:mypassword@localhost:5433/mydatabase'
logger:
service: '@logger'
so there is no need to create a .pomm_cli_bootstrap.php file, isn't it?
Thanks.
ps) I got this problem yesterday and posted a msg on mailing list.
I have just seen Grégoire has updated github page since then by adding:
Even though the CLI interfaces with the Symfony console utility, it still needs to find a file named .pomm_cli_bootstrap.php in the project root directory.
Hi,
Following #52, I have an another question about Pomm and Symfony Form.
Doctrine have a UniqueEntityValidator, I don't find a similar thing in Pomm.
I create a gist https://gist.github.com/Hadrien45/154f981ba3daf8149435aaebcb48d9c4 to solve my problem. However, I'm not an expert in Symfony and Pomm, so I don't know if it a "good way" to do that.
Thanks
Hi,
For a project i use your bundle.
It's perfect for generate entity with a existing database.
But i have a noob question ahah:
In my controller
$catalogues = $this->get('pomm')['my_db1'] ->getModel('\AppBundle\Entity\MyDb1\PublicSchema\CatalogueModel') ->findAll() ; return $this->render('SiteBundle:Default:homePage.html.twig',array('catalogues'=>$catalogues));
But in my view (twig)
How to access the variable ??
{% for catalogue in catalogues %} {{dump(catalogue)}} --> value inside {% endfor %}
Result dump
Catalogue {#1132 ▼ #container: array:13 [▼ "ID" => 8 "Code" => "MATIÈRE PREMIÈRE" "Actif" => true "DateAjout" => DateTime {#1212 ▶} "Index" => 0 "PriseCommande" => false "Description" => "" "Couleur" => "Green" "CouleurText" => "#000000" "Tarif" => null "WebActif" => false "WebTitre" => null "WebDescription" => null ] -status: 1 }
catalogue.ID (not working) catalogue.container.ID (not working)
Other question :
If my entity relation :
in catalogue, WebActif --> relation with other table
How to access Webactif because the dump returns only an ID, do I have to create my own method?
Sorry for my english.... -_-
Hello,
I've been using Pomm for a while, and there is only one thing that really itch me: the need to load models by using the Session.
In services you have to inject a session, most often the default one @pomm.default_session
and then:
/**
* @var $my_model MyModel
*/
$my_model = $session->getSession('default')->getModel(MyModel::class);
$my_model->findThings();
$my_model->doSomethingElse();
You can work without it, or some IDE provides external plugins that deal with similar cases (to setup for every project you're using pomm with).
I've played a little with Symfony Flex autowiring and have been able to inject Model classes with the default session directly in services requiring them by declaring the following rule in my services.yaml
:
_instanceof:
PommProject\ModelManager\Model\Model:
public: true
calls:
- [initialize, ['@pomm.default_session']]
and modifying the initialize
method a little to prevent an error :
public function initialize(Session $session)
{
// ...
if (!$converter_holder->hasConverterName($this->flexible_entity_class)) {
$converter_holder
->registerConverter(
$this->flexible_entity_class,
new PgEntity(
$this->flexible_entity_class,
$this->getStructure()
),
[
$this->getStructure()->getRelation(),
$this->flexible_entity_class,
]
);
}
}
It works, with this i can directly autowire my models via constructor. Less code, i have my type hinting.
But, but i'm curious. What do i lose by not using the session to load my model ?
For my project, i create a normalizer for the Symfony serializer.
It improves serializer performance and use Pomm logic for FlexibleEntity instances.
https://gist.github.com/SebLours/2b6cb67ce3f99c35d146
Did you think, it can be add to the bundle ?
Since the twig_extensions package is abandonned, \Twig_Extension should no longer be used in ProfilerExtension.
I'm trying to install the PommBundle (latest version).
Here is my config:
pomm:
configuration:
redshift:
dsn: 'pgsql://%redshift.username%:%redshift.password%@%redshift.host%:5439/%redshift.database%'
logger:
service: '@logger'
When running the following command I get an exception:
php console pomm:generate:relation-all -d src/ -a 'PublicationBundle\Model' redshift client
[Symfony\Component\Debug\Exception\ContextErrorException]
Catchable Fatal Error: Argument 1 passed to PommProject\ModelManager\Generator\BaseGenerator::__construct() must be an instance of PommProject\ModelManager\Session,
instance of PommProject\Foundation\Session given, called in vendor/pomm-project/cli/sources/lib/Command/GenerateForRelation.php on line 76 and defined
Is there something to configure for the class:session_builder
? This config is in the Configuration class, but I don't find the expected value.
Hi, I have a problem since I put version 2.4. My models declarent as Symfony services like that :
App\Infrastructure\Model\ProductModel:
public: true
tags: [pomm.model]
I have an error when used my model : An alias can not reference itself, got a circular reference on ProductModel
I tried to delete tags: [pomm.model]
but a new error has occured :
ProductModel is not registered against the session
Hi,
I'm working on some API with stripped symfony distribution. Currently I've removed Twig Bundle, as I don't need this, but pomm-bundle requires it to work. Is it possible to make twig.loader dependency conditional, and set this only if Twig is used?
After adding "pomm-project/pomm-bundle": "2.0.*@dev"
to composer.json, composer update
worked fine. But running the application (in dev environment) throws this exception:
ClassNotFoundException in appDevDebugProjectContainer.php line 1915:
Attempted to load class "DatabaseDataCollector" from namespace
"PommProject\SymfonyBridge".
Did you forget a "use" statement for another namespace?
Requiring "pomm-project/pomm-symfony-bridge": "~2.0@dev"
solved the problem.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.