Closed bscheshirwork closed 6 years ago
Update your packages via composer to get latest dependent extensions.
Folks this is purely a problem of invalid / outdated versions of extensions and their dependencies on your application environment. So you need to fix your composer version dependencies and run composer update
to ensure you have the updated/right version.
Basically CROSS CHECK YOUR INSTALLED EXTENSION VERSION WITH THE VERSION ON THIS GITHUB REPO including all dependencies i.e. yii2-export
, yii2-krajee-base
, yii2-grid
etc.
@kartik-v If run only
$ php composer.phar require kartik-v/yii2-export "@dev"
the dependences of
"require": {
"kartik-v/yii2-dynagrid": ">=1.4.5",
"kartik-v/yii2-dialog": "~1.0",
"kartik-v/yii2-mpdf": "~1.0",
"phpoffice/phpspreadsheet": "~1.0"
},
will not resolved correctly (if we have stable version of your common package?)
@prabowomurti @hanprat run
composer update
to resolve this problem
I am confused. I don't think that running the composer update
is the best way to solve the issue, since we have commit the composer.lock file to git and wants every machine uses the exact same of environment (https://stackoverflow.com/questions/12896780/should-composer-lock-be-committed-to-version-control#comment31082402_12896850). What is your other suggestion?
We just installed other package with composer require other/package
and the issue shows up. How is it possible? Thank you for the explanation.
If you are manually managing extension versions and locking them - you need to cross check what versions of extensions you have set and ensure that you have the dependencies to these extensions of the right versions.
For example, yii2-export latest version requires the latest updated version of dependencies like yii2-grid and yii2-krajee-base to be also installed and updated. If you are not updating those to the latest as well you would have issues/errors like mentioned. Running a composer update ensures these checks are done automatically.
@prabowomurti
since we have commit the composer.lock file to git and wants every machine uses the exact same of environment
So, we already have a new composer.lock
after install new package.
Of course we can update only yii2-grid
and yii2-krajee-base
like this:
composer update kartik-v/yii2-grid -vvv
composer update kartik-v/yii2-krajee-base -vvv
What a reason because composer install
not update it automatically?
I think this happens becouse we can't have a tag of yii2-export
and we have unstable @dev
composer require kartik-v/yii2-export "@dev"
I think In next release @kartik-v will change a minor version of each package in chain and composer will work correctly
Prerequisites
master
branch of yii2-export.Steps to reproduce the issue
add