-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Composer require doctrine/doctrine-bundle=~1.12.0 #9382
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We also use "doctrine/doctrine-bundle": "~1.11.0",
in our cloud, so I approve this PR.
@maxlawton could you please rebase to latest 3.2
branch?
Fixes exception when running bin/console, encountered when Mautic is installed as a library (and the lock file is thus ignored): In InputDefinition.php line 232: [Symfony\Component\Console\Exception\LogicException] An option named "connection" already exists. Exception trace: at /var/www/vendor/symfony/console/Input/InputDefinition.php:232 Symfony\Component\Console\Input\InputDefinition->addOption() at /var/www/vendor/symfony/console/Command/Command.php:406 Symfony\Component\Console\Command\Command->addOption() at /var/www/vendor/doctrine/doctrine-bundle/Command/Proxy/RunSqlDoctrineCommand.php:24 Doctrine\Bundle\DoctrineBundle\Command\Proxy\RunSqlDoctrineCommand->configure() at /var/www/vendor/symfony/console/Command/Command.php:77 Symfony\Component\Console\Command\Command->__construct() at /var/www/vendor/doctrine/dbal/lib/Doctrine/DBAL/Tools/Console/Command/RunSqlCommand.php:36 Doctrine\DBAL\Tools\Console\Command\RunSqlCommand->__construct() at /var/www/html/var/cache/prod/ContainerH108zlf/getDoctrine_QuerySqlCommandService.php:8 require() at /var/www/html/var/cache/prod/ContainerH108zlf/appProdProjectContainer.php:6117 ContainerH108zlf\appProdProjectContainer->load() at /var/www/html/var/cache/prod/ContainerH108zlf/getConsole_CommandLoaderService.php:77 ContainerH108zlf\appProdProjectContainer->{closure}() at /var/www/vendor/symfony/dependency-injection/ServiceLocator.php:64 Symfony\Component\DependencyInjection\ServiceLocator->get() at /var/www/vendor/symfony/console/CommandLoader/ContainerCommandLoader.php:46 Symfony\Component\Console\CommandLoader\ContainerCommandLoader->get() at /var/www/vendor/symfony/console/Application.php:523 Symfony\Component\Console\Application->has() at /var/www/vendor/symfony/console/Application.php:715 Symfony\Component\Console\Application->all() at /var/www/vendor/symfony/framework-bundle/Console/Application.php:122 Symfony\Bundle\FrameworkBundle\Console\Application->all() at /var/www/vendor/symfony/console/Descriptor/ApplicationDescription.php:102 Symfony\Component\Console\Descriptor\ApplicationDescription->inspectApplication() at /var/www/vendor/symfony/console/Descriptor/ApplicationDescription.php:75 Symfony\Component\Console\Descriptor\ApplicationDescription->getCommands() at /var/www/vendor/symfony/console/Descriptor/TextDescriptor.php:194 Symfony\Component\Console\Descriptor\TextDescriptor->describeApplication() at /var/www/vendor/symfony/console/Descriptor/Descriptor.php:55 Symfony\Component\Console\Descriptor\Descriptor->describe() at /var/www/vendor/symfony/console/Helper/DescriptorHelper.php:67 Symfony\Component\Console\Helper\DescriptorHelper->describe() at /var/www/vendor/symfony/console/Command/ListCommand.php:75 Symfony\Component\Console\Command\ListCommand->execute() at /var/www/vendor/symfony/console/Command/Command.php:255 Symfony\Component\Console\Command\Command->run() at /var/www/vendor/symfony/console/Application.php:1010 Symfony\Component\Console\Application->doRunCommand() at /var/www/vendor/symfony/framework-bundle/Console/Application.php:86 Symfony\Bundle\FrameworkBundle\Console\Application->doRunCommand() at /var/www/vendor/symfony/console/Application.php:255 Symfony\Component\Console\Application->doRun() at /var/www/vendor/symfony/framework-bundle/Console/Application.php:74 Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at /var/www/vendor/symfony/console/Application.php:148 Symfony\Component\Console\Application->run() at /var/www/html/bin/console:43
b795313
to
1de8b08
Compare
@escopecz Did you mean you use I've rebased onto 3.2, updated the |
My bad. I read the diff wrong. I don't see a reason why not to bump to the latest version. The diff looks like nothing should break. https://github.com/doctrine/DoctrineBundle/releases/tag/1.12.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Description:
Fixes exception when running
bin/console
due to compatibility issue between doctrine/doctrine-bundle and doctrine/dbal: doctrine/DoctrineBundle#1168 .With doctrine/dbal being an inherited requirement, the version constraint is such that the incompatible version is installed. The solution is to either add an explicit restriction of the doctrine/dbal version to a release that pre-dates this bug; or, to upgrade to the newer doctrine/doctrine-bundle within the 1.x line, which still retains compatibility with Mautic's other requirements (e.g. symfony/* at ~3.4.0).
NOTE
Upon further testing of this with a clean, standalone copy of Mautic @ 3.2, I realize the issue will not be present when installing with the distributed
composer.lock
file present, as the version of doctrine/dbal specified there in (v2.10.1) does not contain theconnection
option in theRunSqlCommand
. I encountered this issue when requiring Mautic as a dependency of another Composer project having its own top-levelcomposer.json
to allow for the management of private internal plugins as packages without patching Mautic's composer file. Thus, this PR is addressing an issue that is unlikely to affect standard Mautic installations.Steps to reproduce the issue:
composer install
withoutcomposer.lock
present, which will install doctrine/doctrine-bundle at 1.11.2bin/console
with or without any subcommand specifiedSteps to test this PR:
composer install
, updating doctrine/doctrine-bundle to 1.12.11bin/console