-
Notifications
You must be signed in to change notification settings - Fork 11k
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
Cannot install doctrine/dbal with recent Laravel Installations #49403
Comments
I'd almost close this as a "won't fix". To actually fix this transparently in the The reason you're getting this error is that the initial install is bringing in |
Think this got fixed because I can run this fine now. |
Not fixed. |
Attempting to resolve this over here #49438 For anyone landing here, you will need to run the following to install DBAL: composer require doctrine/dbal carbonphp/carbon-doctrine-types |
That method seemed better, so I modified the description at the beginning. |
We've fixed this as best we can in #49438 Again, anyone dropping by with this issue, please run: composer require doctrine/dbal carbonphp/carbon-doctrine-types |
Laravel Version
10.37.3 / probably all versions
PHP Version
8.3.0 / probably all versions
Database Driver & Version
N/A
Description
Dependency resolution with
composer require doctrine/dbal
fails in a recently Laravel installation.(This may not be caused by Laravel itself)
Here is a summary of the failures:
composer create-project laravel/laravel
composer require doctrine/dbal
Previously this did not occur. This issue now occurs due to the following changes in
nesbot/carbon
.briannesbitt/Carbon@4d06802#diff-d2ab9925cad7eac58e0ff4cc0d251a937ecf49e4b6bf57f8b95aab76648a9d34
In short, Laravel applications installed after November 28, 2023, when the above changes were published, will not be able to install
doctrine/dbal
in the normal way.For now, the workaround would be:
UPDATED: 2023-12-20 12:09 JST
Fixed since a better procedure was mentioned in the comments.
Manually add{ "require": { "doctrine/dbal":"^3.5.1" } }
tocomposer.json
.Run
composer require doctrine/dbal carbonphp/carbon-doctrine-types
Runcomposer update
Here
carbonphp/carbon-doctrine-types
will be DOWNGRADED to 2doctrine/dbal
is installed without any problems.This is not a problem with Laravel, but given that special installation steps are required and packages may be downgraded during this process, some countermeasures may be necessary.
(But I don't know your package dependency policy, so I don't have any ideas, sorry)
Steps To Reproduce
The text was updated successfully, but these errors were encountered: