collectiveaccess / pawtucket2

Pawtucket Improved
GNU General Public License v3.0
82 stars 75 forks source link

Composer error when installing or branching to dev/php8 #101

Closed poplarmedia closed 4 months ago

poplarmedia commented 6 months ago

The following error occurs when branching to dev/php8 from current master. I reverted to develop for now. With develop I am able to connect to a Providence dev/php8 instance which is running without issue on same server.

Automatic installation of the required vendor libraries failed: Library installation failed: Installing dependencies from lock file (including require-dev); Verifying lock file contents can be installed on current platform.; Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. It is recommended that you runcomposer updateorcomposer update .; - Required package "caseyamcl/phpoaipmh" is not present in the lock file.; - Required package "collectiveaccess/service-wrapper" is not present in the lock file.; - Required package "dompdf/dompdf" is not present in the lock file.; - Required package "easyrdf/easyrdf" is not present in the lock file.; - Required package "elasticsearch/elasticsearch" is not present in the lock file.; - Required package "ezyang/htmlpurifier" is not present in the lock file.; - Required package "guzzlehttp/guzzle" is not present in the lock file.; - Required package "guzzlehttp/psr7" is not present in the lock file.; - Required package "james-heinrich/getid3" is not present in the lock file.; - Required package "joshralph/password-policy" is not present in the lock file.; - Required package "knplabs/github-api" is not present in the lock file.; - Required package "laminas/laminas-stdlib" is not present in the lock file.; - Required package "laminas/laminas-escaper" is not present in the lock file.; - Required package "league/climate" is not present in the lock file.; - Required package "league/flysystem-aws-s3-v3" is not present in the lock file.; - Required package "league/flysystem-cached-adapter" is not present in the lock file.; - Required package "league/flysystem-webdav" is not present in the lock file.; - Required package "league/flysystem-ziparchive" is not present in the lock file.; - Required package "magento/zendframework1" is not present in the lock file.; - Required package "maximebf/debugbar" is not present in the lock file.; - Required package "monolog/monolog" is not present in the lock file.; - Required package "opis/json-schema" is not present in the lock file.; - Required package "pear/file_marc" is not present in the lock file.; - Required package "phpoffice/phppresentation" is not present in the lock file.; - Required package "phpoffice/phpspreadsheet" is not present in the lock file.; - Required package "phpoffice/phpword" is not present in the lock file.; - Required package "phpunit/phpunit" is not present in the lock file.; - Required package "srmklive/flysystem-dropbox-v2" is not present in the lock file.; - Required package "webonyx/graphql-php" is not present in the lock file.; - Required package "zendframework/zend-stdlib" is not present in the lock file.; - Required package "ankitpokhrel/tus-php" is not present in the lock file.; - Required package "tedivm/stash" is not present in the lock file.; - Required package "firebase/php-jwt" is not present in the lock file.; - Required package "softonic/graphql-client" is not present in the lock file.; - Required package "whikloj/bagittools" is not present in the lock file.; - Required package "voku/stop-words" is not present in the lock file.; - Required package "tecnickcom/tc-lib-barcode" is not present in the lock file.; - Required package "symfony/process" is not present in the lock file.; - Required package "deeplcom/deepl-php" is not present in the lock file.; - Required package "google/cloud-translate" is not present in the lock file.; - Required package "phpmailer/phpmailer" is not present in the lock file.; This usually happens when composer files are incorrectly merged or the composer.json file is manually edited.; Read more about correctly resolving merge conflicts https://getcomposer.org/doc/articles/resolving-merge-conflicts.md; and prefer using the "require" command over editing the composer.json file directly https://getcomposer.org/doc/03-cli.md#require-r

collectiveaccess commented 6 months ago

Please remove the lock file and vendor libs and run composer again.

poplarmedia commented 6 months ago

When I tried to branch back to 'dev/php8' from 'develop' I got this error in terminal: error: The following untracked working tree files would be overwritten by checkout: composer.lock

I deleted the file, ran the command again: git checkout dev/php8

I was able to access Pawtucket with out issue. No deletion of vendor libs required.

Is this because it was an upgrade from master--which prompted the error above vs. upgrade from develop? I recall a similar fail happened on a clean install last week, but did not document the details. I just reverted to develop and then upgraded to dev/php8 as a second try.

collectiveaccess commented 4 months ago

The lock file is not in Git; when you switch branches composer.json changes but not the lock file which are now out of sync. I believe that's the issue. If the problem persists try deleting the lock file and clearing out vendor after switching branches, then run composer up