简体   繁体   中英

How to downgrade symfony/console, can't install composer package?

i need to use this package mrjgreen/db-sync , i'm using laravel version 5.8 . When i try to install it on my project through composer, it returns the following error :

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Conclusion: don't install mrjgreen/db-sync v3.3.0
    - Conclusion: remove symfony/console v4.4.3
    - Installation request for mrjgreen/db-sync ^3.3 -> satisfiable by mrjgreen/db-sync[v3.3.0, v3.x-dev].
    - Conclusion: don't install symfony/console v4.4.3

I tried to remove symfony/console , but it gives me this message :

"symfony/console is not required in your composer.json and has not been removed"

and it won't remove it. Any idea of how can i solve this?. Or a similar package that it's compatible with this laravel version. (i need to sync two tables but using a where parameter). Thanks in advance.

The last release of the package you are using was in May 2017 (two and a half years ago at the time of writing). It was built against specific versions of the symfony packages, and since you are now using a younger version of Laravel with different dependencies (which also uses symfony), you are getting a conflict of libraries.

There's no easy solution for you other than find another library to do what you need, fork the library you are trying to use and build your own against the modern dependencies (which should be straight forward if it has a full set of tests), or build your own.

I had this issue as well. I removed laravel/valet and laravel/installer, then installed again and it worked.

composer global remove laravel/valet

Then

composer global remove laravel/installer

Then

composer global require laravel/installer

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM