Open fliespl opened 3 months ago
The reproducer does not work for me:
$ bin/console -vvv
In ConfigureDependencyFactoryPass.php line 27:
[RuntimeException]
DoctrineMigrationsBundle requires DoctrineBundle to be enabled.
Exception trace:
at /tmp/doctrine-error/vendor/doctrine/doctrine-migrations-bundle/DependencyInjection/CompilerPass/ConfigureDependencyFactoryPass.php:27
Doctrine\Bundle\MigrationsBundle\DependencyInjection\CompilerPass\ConfigureDependencyFactoryPass->process() at /tmp/doctrine-error/vendor/symfony/dependency-injection/Compiler/Compiler.php:73
Symfony\Component\DependencyInjection\Compiler\Compiler->compile() at /tmp/doctrine-error/vendor/symfony/dependency-injection/ContainerBuilder.php:752
Symfony\Component\DependencyInjection\ContainerBuilder->compile() at /tmp/doctrine-error/vendor/symfony/http-kernel/Kernel.php:495
Symfony\Component\HttpKernel\Kernel->initializeContainer() at /tmp/doctrine-error/vendor/symfony/http-kernel/Kernel.php:740
Symfony\Component\HttpKernel\Kernel->preBoot() at /tmp/doctrine-error/vendor/symfony/http-kernel/Kernel.php:120
Symfony\Component\HttpKernel\Kernel->boot() at /tmp/doctrine-error/vendor/symfony/framework-bundle/Console/Application.php:177
Symfony\Bundle\FrameworkBundle\Console\Application->registerCommands() at /tmp/doctrine-error/vendor/symfony/framework-bundle/Console/Application.php:69
Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at /tmp/doctrine-error/vendor/symfony/console/Application.php:167
Symfony\Component\Console\Application->run() at /tmp/doctrine-error/vendor/symfony/runtime/Runner/Symfony/ConsoleApplicationRunner.php:49
Symfony\Component\Runtime\Runner\Symfony\ConsoleApplicationRunner->run() at /tmp/doctrine-error/vendor/autoload_runtime.php:29
require_once() at /tmp/doctrine-error/bin/console:15
@greg0ire sorry about that - 3 files were left uncommited. Fixed in repo
Bug Report
Summary
My summary is not gonna be precise, that's why I have prepared a repro in github.
Basically using combination of mentioned above items, we can get into situation where parser mistakenly thinks it must not fill parameters (or skips some of them).
I have narrowed it down to regexp which searches query for parameters that it misses one of them in such conditions.
Current behaviour
Some parameters are not added due to parser missing resolution of one of the parameters due to apostrophe.
SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens
How to reproduce
Created symfony app (https://github.com/fliespl/doctrine-error) with minimal repo. Consists of two commands:
Expected behaviour
I would expect parser to correctly handled escaped literal strings with apostrophe.