NotionCommotion Posted May 28, 2022 Share Posted May 28, 2022 Trying to install a package but received a version error: composer require --dev alice Using version ^2.10 for hautelook/alice-bundle ./composer.json has been updated Running composer update hautelook/alice-bundle Loading composer repositories with package information Updating dependencies Your requirements could not be resolved to an installable set of packages. Problem 1 - Root composer.json requires hautelook/alice-bundle ^2.10 -> satisfiable by hautelook/alice-bundle[2.10.0]. - hautelook/alice-bundle 2.10.0 requires doctrine/persistence ^2.2 -> found doctrine/persistence[2.2.0, ..., 2.5.3] but the package is fixed to 3.0.2 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command. Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions. You can also try re-running composer require with an explicit version constraint, e.g. "composer require hautelook/alice-bundle:*" to figure out if any version is installable, or "composer require hautelook/alice-bundle:^2.1" if you know which you need. Installation failed, reverting ./composer.json and ./composer.lock to their original content. An issue has been created and a pull request fixing the issue has been made. The fix just changed composer.json "doctrine/persistence": "^2.2", to "doctrine/persistence": "^2.2 || ^3.0" What are my options to use this package before the github and composer package is updated? Ideally, I would like to instruct composer to allow hautelook/alice-bundle to use 3.0 either by adding some argument when I call composer on the command line or by manually editing composer.json as applicable. Is this possible? If this is not possible, I suppose my next best choice is to downgrade doctrine/persistence from 3.02 to 2.2, however, doctrine/persistence is not in my composer.json file and only in my composer.lock file which I suspect I shouldn't be manually editing it. Guess my third choice would be to clone it from github, make the changes, and then modify my composer file to use a local copy. Maybe there are other approaches? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/314853-workarounds-when-composer-has-issues/ Share on other sites More sharing options...
NotionCommotion Posted May 28, 2022 Author Share Posted May 28, 2022 Ended up forking the git repo, adding it as a repository in composer.json, and manually adding 'hautelook/alice-bundle": "2.10" to require.dev. Quote Link to comment https://forums.phpfreaks.com/topic/314853-workarounds-when-composer-has-issues/#findComment-1596772 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.