skip to Main Content

I’m trying to update my yii2-basic app version because of what I think is its incompatibility with my new XAMPP (PHP 7.4.1).

This is how I did it:

composer self-update
composer global require "fxp/composer-asset-plugin:^1.4.1" --no-plugins
composer require "yiisoft/yii2:~2.0.14" --update-with-dependencies

This is how it shows in command window:

./composer.json has been updated
The "extra.asset-installer-paths" option is deprecated, use the "config.fxp-asset.installer-paths" option
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
- Conclusion: remove phpunit/phpunit 5.7.x-dev
- Conclusion: remove sebastian/recursion-context 3.0.x-dev
- Installation request for phpunit/phpunit (locked at 5.7.x-dev) -> satisfiable by phpunit/phpunit[5.7.x-dev].
- Conclusion: don't install sebastian/recursion-context 3.0.x-dev
- phpunit/phpunit 5.7.x-dev requires sebastian/object-enumerator ~2.0 -> satisfiable by sebastian/object-enumerator[2.0.0, 2.0.1, 2.0.x-dev].
- sebastian/object-enumerator 2.0.0 requires sebastian/recursion-context ~2.0 -> satisfiable by sebastian/recursion-context[2.0.0, 2.0.x-dev].
- sebastian/object-enumerator 2.0.1 requires sebastian/recursion-context ~2.0 -> satisfiable by sebastian/recursion-context[2.0.0, 2.0.x-dev].
- sebastian/object-enumerator 2.0.x-dev requires sebastian/recursion-context ^2.0 -> satisfiable by sebastian/recursion-context[2.0.0, 2.0.x-dev].
- Can only install one of: sebastian/recursion-context[2.0.0, 3.0.x-dev].
- Can only install one of: sebastian/recursion-context[2.0.x-dev, 3.0.x-dev].
- Installation request for sebastian/recursion-context (locked at 3.0.x-dev) -> satisfiable by sebastian/recursion-context[3.0.x-dev].


Installation failed, reverting ./composer.json to its original content.

I tried these lines too but none of them worked:

composer require "yiisoft/yii2:2.0.14" --update-with-dependencies
composer require "yiisoft/yii2:~2.0.14"

2

Answers


  1. Chosen as BEST ANSWER

    I found the solution.

    I update the yii2 app by editing composer.json file, then running composer update on my command line.

    Then somehow it worked.


  2. Simply update your composer.json like this:

    ....
        "require": {
            "php": ">=5.6.0",
            "yiisoft/yii2": "~2.0.14",
    ....
    
        "require-dev": {
            "codeception/codeception": "*",
    

    We change the version of Yii2 minimum at 2.0.14 and yii2-codeception directly to codeception.

    And don’t forget to update you bower and npm asset config to newer composer configuration. Newer configuration looks like this.

    
        "config": {
            "vendor-dir": "vendor",
            "process-timeout": 1800,
            "fxp-asset":{
                "installer-paths": {
                    "npm-asset-library": "_protected/vendor/npm",
                    "bower-asset-library": "_protected/vendor/bower"
                }
            }
        },
    

    and delete “asset-installer-paths” in “extra” parameter.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search