Composer package installed through php v7.1 but not php v7.2 - php

In my Homestead development environment, I've tried to install a composer package called ralouphie/getallheaders through php v7.1; it's done successfully. But when I am trying through php v7.2, it does not install that package; rather it creates the directory ralouphie/getallheaders without its contents.
Now, I have no idea why the package is not being installed through 7.2.
Update: When I ran this command: php7.1 $(which composer) require ralouphie/getallheaders -vvv, the output became as follows:
Reading ./composer.json
Loading config file /home/vagrant/.composer/config.json
Loading config file /home/vagrant/.composer/auth.json
Loading config file ./composer.json
Checked CA file /etc/ssl/certs/ca-certificates.crt: valid
Executing command (/home/vagrant/code/Anonymous/experiment): git branch --no-color --no-abbrev -v
Executing command (/home/vagrant/code/Anonymous/experiment): git describe --exact-match --tags
Executing command (CWD): git --version
Executing command (/home/vagrant/code/Anonymous/experiment): git log --pretty="%H" -n1 HEAD --no-show-signature
Executing command (/home/vagrant/code/Anonymous/experiment): hg branch
Executing command (/home/vagrant/code/Anonymous/experiment): fossil branch list
Executing command (/home/vagrant/code/Anonymous/experiment): fossil tag list
Executing command (/home/vagrant/code/Anonymous/experiment): svn info --xml
Reading /home/vagrant/.composer/composer.json
Loading config file /home/vagrant/.composer/config.json
Loading config file /home/vagrant/.composer/auth.json
Loading config file /home/vagrant/.composer/composer.json
Loading config file /home/vagrant/.composer/auth.json
Reading /home/vagrant/.composer/auth.json
Reading /home/vagrant/.composer/vendor/composer/installed.json
Loading plugin Hirak\Prestissimo\Plugin
Downloading https://repo.packagist.org/packages.json
Writing /home/vagrant/.composer/cache/repo/https---repo.packagist.org/packages.json into cache
1/11: http://repo.packagist.org/p/provider-latest$786c0a2de55894abbbe78d38ea8a7f8cb144a479657680c03f961f1424c8527b.json
2/11: http://repo.packagist.org/p/provider-2020-07$259946c1fbf2884ae74748db78723bde9e9ad15cdc6fb66c882d9c5a8d6b69e3.json
3/11: http://repo.packagist.org/p/provider-2014$4eccda8fcda875865caa21e02f44b68b04aabe8703dca0c33f97e3b2c875cc23.json
4/11: http://repo.packagist.org/p/provider-2019-10$0118bd0f4425f85122390c20789ca8974db07de59f318a7a32716c3b3b1fdb3c.json
5/11: http://repo.packagist.org/p/provider-2020-01$fff123ed297a9c51717b3620cc2df64a95f192d9cb2d2533505ba0333580fdb7.json
6/11: http://repo.packagist.org/p/provider-2015$336d1044409cd7cb78fa08dddb2cf8039f0ffd10e3bd3a4491ce878218a0043c.json
7/11: http://repo.packagist.org/p/provider-2016$48bce800c9590d0bddd9e52be42323c696cda4a25e598c6ffad96a2a8b394646.json
8/11: http://repo.packagist.org/p/provider-2020-04$bdd0ca73a9bde9a9eece92e985192223507ac0e0e61df1ef487eae3c16d78e1d.json
9/11: http://repo.packagist.org/p/provider-2017$91b0c72ad31434857805c37425563a5be8f6fad00c79100aed72317106e91a8d.json
10/11: http://repo.packagist.org/p/provider-2018$e848f828f037d4c7a59ef9f5c57bb4145552f2a65809b32933ba25cb6a221820.json
11/11: http://repo.packagist.org/p/provider-2019$177ae87a95a123b7b2b325c44f5efb94b2fbaeaba33239fffe010cec94f4c743.json
Finished: success: 11, skipped: 0, failure: 0, total: 11
Running 1.10.10 (2020-08-03 11:35:19) with PHP 7.1.33-16+ubuntu18.04.1+deb.sury.org+1 on Linux / 4.15.0-64-generic
Writing /home/vagrant/.composer/cache/repo/https---repo.packagist.org/packages.json into cache
Reading /home/vagrant/.composer/cache/repo/https---repo.packagist.org/p-provider-2013.json from cache
Writing /home/vagrant/.composer/cache/repo/https---repo.packagist.org/p-provider-2014.json into cache
Writing /home/vagrant/.composer/cache/repo/https---repo.packagist.org/p-provider-2015.json into cache
Writing /home/vagrant/.composer/cache/repo/https---repo.packagist.org/p-provider-2016.json into cache
Writing /home/vagrant/.composer/cache/repo/https---repo.packagist.org/p-provider-2017.json into cache
Writing /home/vagrant/.composer/cache/repo/https---repo.packagist.org/p-provider-2018.json into cache
Writing /home/vagrant/.composer/cache/repo/https---repo.packagist.org/p-provider-2019.json into cache
Writing /home/vagrant/.composer/cache/repo/https---repo.packagist.org/p-provider-2019-10.json into cache
Writing /home/vagrant/.composer/cache/repo/https---repo.packagist.org/p-provider-2020-01.json into cache
Writing /home/vagrant/.composer/cache/repo/https---repo.packagist.org/p-provider-2020-04.json into cache
^BWriting /home/vagrant/.composer/cache/repo/https---repo.packagist.org/p-provider-2020-07.json into cache
Reading /home/vagrant/.composer/cache/repo/https---repo.packagist.org/p-provider-archived.json from cache
Writing /home/vagrant/.composer/cache/repo/https---repo.packagist.org/p-provider-latest.json into cache
Reading /home/vagrant/.composer/cache/repo/https---repo.packagist.org/provider-ralouphie$getallheaders.json from cache
Using version ^3.0 for ralouphie/getallheaders
./composer.json has been updated
Reading ./composer.json
Loading config file /home/vagrant/.composer/config.json
Loading config file /home/vagrant/.composer/auth.json
Loading config file ./composer.json
Executing command (/home/vagrant/code/Anonymous/experiment): git branch --no-color --no-abbrev -v
Executing command (/home/vagrant/code/Anonymous/experiment): git describe --exact-match --tags
Executing command (/home/vagrant/code/Anonymous/experiment): git log --pretty="%H" -n1 HEAD --no-show-signature
Executing command (/home/vagrant/code/Anonymous/experiment): hg branch
Executing command (/home/vagrant/code/Anonymous/experiment): fossil branch list
Executing command (/home/vagrant/code/Anonymous/experiment): fossil tag list
Executing command (/home/vagrant/code/Anonymous/experiment): svn info --xml
Reading /home/vagrant/.composer/composer.json
Loading config file /home/vagrant/.composer/config.json
Loading config file /home/vagrant/.composer/auth.json
Loading config file /home/vagrant/.composer/composer.json
Loading config file /home/vagrant/.composer/auth.json
Reading /home/vagrant/.composer/auth.json
Reading /home/vagrant/.composer/vendor/composer/installed.json
Loading plugin Hirak\Prestissimo\Plugin_composer_tmp0
Downloading https://repo.packagist.org/packages.json
Writing /home/vagrant/.composer/cache/repo/https---repo.packagist.org/packages.json into cache
1/4: http://repo.packagist.org/p/provider-latest$eb9f98444c1864e0e3d84c7477cec3149da4201114560cbc6d8125859aeb33e1.json
2/4: http://repo.packagist.org/p/provider-2020-07$59bdd46b979080c87b3da8b15148152c2f1fc4eaba495fdcd7417fde75857c43.json
3/4: http://repo.packagist.org/p/provider-2020-01$da305ff39fe71daf7a4c7cd8b724246b0890976aed9cc2e3e711cd988bde37ad.json
4/4: http://repo.packagist.org/p/provider-2020-04$5c3949e643ed4d0e9543eac8fcd9ec6a0abbb773156a81d0cab000b218440a5a.json
Finished: success: 4, skipped: 0, failure: 0, total: 4
Loading composer repositories with package information
Writing /home/vagrant/.composer/cache/repo/https---repo.packagist.org/packages.json into cache
Updating dependencies (including require-dev)
Reading /home/vagrant/.composer/cache/repo/https---repo.packagist.org/p-provider-2013.json from cache
Reading /home/vagrant/.composer/cache/repo/https---repo.packagist.org/p-provider-2014.json from cache
Reading /home/vagrant/.composer/cache/repo/https---repo.packagist.org/p-provider-2015.json from cache
Reading /home/vagrant/.composer/cache/repo/https---repo.packagist.org/p-provider-2016.json from cache
Reading /home/vagrant/.composer/cache/repo/https---repo.packagist.org/p-provider-2017.json from cache
Reading /home/vagrant/.composer/cache/repo/https---repo.packagist.org/p-provider-2018.json from cache
Reading /home/vagrant/.composer/cache/repo/https---repo.packagist.org/p-provider-2019.json from cache
Reading /home/vagrant/.composer/cache/repo/https---repo.packagist.org/p-provider-2019-10.json from cache
Downloading http://repo.packagist.org/p/provider-2020-01%24da305ff39fe71daf7a4c7cd8b724246b0890976aed9cc2e3e711cd988bde37ad.json
Writing /home/vagrant/.composer/cache/repo/https---repo.packagist.org/p-provider-2020-01.json into cache
Writing /home/vagrant/.composer/cache/repo/https---repo.packagist.org/p-provider-2020-04.json into cache
Writing /home/vagrant/.composer/cache/repo/https---repo.packagist.org/p-provider-2020-07.json into cache
Reading /home/vagrant/.composer/cache/repo/https---repo.packagist.org/p-provider-archived.json from cache
Writing /home/vagrant/.composer/cache/repo/https---repo.packagist.org/p-provider-latest.json into cache
Reading /home/vagrant/.composer/cache/repo/https---repo.packagist.org/provider-ralouphie$getallheaders.json from cache
Resolving dependencies through SAT
Looking at all rules.
Dependency resolution completed in 0.000 seconds
Analyzed 103 packages to resolve dependencies
Analyzed 88 rules to resolve dependencies
Package operations: 1 install, 0 updates, 0 removals
Installs: ralouphie/getallheaders:3.0.3
- Installing ralouphie/getallheaders (3.0.3): Reading /home/vagrant/.composer/cache/files/ralouphie/getallheaders/ddc5f4c7ab3d868f5060717336a0d93475d53175.zip from cache
Loading from cache
Extracting archiveExecuting command (CWD): unzip -qq '/home/vagrant/code/Anonymous/experiment/vendor/ralouphie/getallheaders/a467de1e3835523e051c9df2e882c19b' -d '/home/vagrant/code/Anonymous/experiment/vendor/composer/7eebe120'
Failed to execute (9) unzip -qq '/home/vagrant/code/Anonymous/experiment/vendor/ralouphie/getallheaders/a467de1e3835523e051c9df2e882c19b' -d '/home/vagrant/code/Anonymous/experiment/vendor/composer/7eebe120'
[/home/vagrant/code/Anonymous/experiment/vendor/ralouphie/getallheaders/a467de1e3835523e051c9df2e882c19b]
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
unzip: cannot find zipfile directory in one of /home/vagrant/code/Anonymous/experiment/vendor/ralouphie/getallheaders/a467de1e3835523e051c9df2e882c19b or
/home/vagrant/code/Anonymous/experiment/vendor/ralouphie/getallheaders/a467de1e3835523e051c9df2e882c19b.zip, and cannot find /home/vagrant/code/Anonymous/experiment/vendor/ralouphie/getallheaders/a467de1e3835523e051c9df2e882c19b.ZIP, period.
The archive may contain identical file names with different capitalization (which fails on case insensitive filesystems)
Unzip with unzip command failed, falling back to ZipArchive class
Failed to download ralouphie/getallheaders from dist: Could not delete /home/vagrant/code/Anonymous/experiment/vendor/ralouphie/getallheaders/a467de1e3835523e051c9df2e882c19b:
Now trying to download from source
- Installing ralouphie/getallheaders (3.0.3):
Cloning to cache at '/home/vagrant/.composer/cache/vcs/https---github.com-ralouphie-getallheaders.git/'
Executing command (/home/vagrant/.composer/cache/vcs/https---github.com-ralouphie-getallheaders.git/): git rev-parse --git-dir
Executing command (/home/vagrant/.composer/cache/vcs/https---github.com-ralouphie-getallheaders.git/): git rev-parse --quiet --verify '120b605dfeb996808c31b6477290a714d356e822^{commit}'
Cloning 120b605dfeb996808c31b6477290a714d356e822 from cache
Executing command (CWD): git clone --no-checkout '/home/vagrant/.composer/cache/vcs/https---github.com-ralouphie-getallheaders.git/' '/home/vagrant/code/Anonymous/experiment/vendor/ralouphie/getallheaders' --dissociate --reference '/home/vagrant/.composer/cache/vcs/https---github.com-ralouphie-getallheaders.git/' && cd '/home/vagrant/code/Anonymous/experiment/vendor/ralouphie/getallheaders' && git remote set-url origin 'https://github.com/ralouphie/getallheaders.git' && git remote add composer 'https://github.com/ralouphie/getallheaders.git'
Executing command (/home/vagrant/code/Anonymous/experiment/vendor/ralouphie/getallheaders): git remote set-url --push origin 'git#github.com:ralouphie/getallheaders.git'
Executing command (/home/vagrant/code/Anonymous/experiment/vendor/ralouphie/getallheaders): git branch -r
Executing command (/home/vagrant/code/Anonymous/experiment/vendor/ralouphie/getallheaders): git checkout '3.0.3' --
Executing command (/home/vagrant/code/Anonymous/experiment/vendor/ralouphie/getallheaders): git reset --hard '120b605dfeb996808c31b6477290a714d356e822' --
REASON: Required by the root package: Install command rule (install ralouphie/getallheaders 3.0.0|install ralouphie/getallheaders 3.0.1|install ralouphie/getallheaders 3.0.2|install ralouphie/getallheaders 3.0.3)
Reading /home/vagrant/code/Anonymous/experiment/vendor/composer/installed.json
Writing lock file
Generating autoload files
And after running this command: php7.2 $(which composer) require ralouphie/getallheaders -vvv, the output is as follows:
Reading ./composer.json
Loading config file /home/vagrant/.composer/config.json
Loading config file /home/vagrant/.composer/auth.json
Loading config file ./composer.json
Checked CA file /etc/ssl/certs/ca-certificates.crt: valid
Executing command (/home/vagrant/code/Anonymous/experiment 2): git branch --no-color --no-abbrev -v
Executing command (/home/vagrant/code/Anonymous/experiment 2): git describe --exact-match --tags
Executing command (CWD): git --version
Executing command (/home/vagrant/code/Anonymous/experiment 2): git log --pretty="%H" -n1 HEAD --no-show-signature
Executing command (/home/vagrant/code/Anonymous/experiment 2): hg branch
Executing command (/home/vagrant/code/Anonymous/experiment 2): fossil branch list
Executing command (/home/vagrant/code/Anonymous/experiment 2): fossil tag list
Executing command (/home/vagrant/code/Anonymous/experiment 2): svn info --xml
Reading /home/vagrant/.composer/composer.json
Loading config file /home/vagrant/.composer/config.json
Loading config file /home/vagrant/.composer/auth.json
Loading config file /home/vagrant/.composer/composer.json
Loading config file /home/vagrant/.composer/auth.json
Reading /home/vagrant/.composer/auth.json
Reading /home/vagrant/.composer/vendor/composer/installed.json
Loading plugin Hirak\Prestissimo\Plugin
Downloading https://repo.packagist.org/packages.json
Writing /home/vagrant/.composer/cache/repo/https---repo.packagist.org/packages.json into cache
1/3: http://repo.packagist.org/p/provider-latest$91e51fd20918010bc9eb6755005da77e51d4ca3343b3c7e78c29f228cf441572.json
2/3: http://repo.packagist.org/p/provider-2020-07$59bdd46b979080c87b3da8b15148152c2f1fc4eaba495fdcd7417fde75857c43.json
3/3: http://repo.packagist.org/p/provider-2020-04$5c3949e643ed4d0e9543eac8fcd9ec6a0abbb773156a81d0cab000b218440a5a.json
Finished: success: 3, skipped: 0, failure: 0, total: 3
Running 1.10.10 (2020-08-03 11:35:19) with PHP 7.2.22-1+ubuntu18.04.1+deb.sury.org+1 on Linux / 4.15.0-64-generic
Writing /home/vagrant/.composer/cache/repo/https---repo.packagist.org/packages.json into cache
Reading /home/vagrant/.composer/cache/repo/https---repo.packagist.org/p-provider-2013.json from cache
Reading /home/vagrant/.composer/cache/repo/https---repo.packagist.org/p-provider-2014.json from cache
Reading /home/vagrant/.composer/cache/repo/https---repo.packagist.org/p-provider-2015.json from cache
Reading /home/vagrant/.composer/cache/repo/https---repo.packagist.org/p-provider-2016.json from cache
Reading /home/vagrant/.composer/cache/repo/https---repo.packagist.org/p-provider-2017.json from cache
Reading /home/vagrant/.composer/cache/repo/https---repo.packagist.org/p-provider-2018.json from cache
Reading /home/vagrant/.composer/cache/repo/https---repo.packagist.org/p-provider-2019.json from cache
Reading /home/vagrant/.composer/cache/repo/https---repo.packagist.org/p-provider-2019-10.json from cache
Reading /home/vagrant/.composer/cache/repo/https---repo.packagist.org/p-provider-2020-01.json from cache
Reading /home/vagrant/.composer/cache/repo/https---repo.packagist.org/p-provider-2020-04.json from cache
Reading /home/vagrant/.composer/cache/repo/https---repo.packagist.org/p-provider-2020-07.json from cache
Reading /home/vagrant/.composer/cache/repo/https---repo.packagist.org/p-provider-archived.json from cache
Writing /home/vagrant/.composer/cache/repo/https---repo.packagist.org/p-provider-latest.json into cache
Reading /home/vagrant/.composer/cache/repo/https---repo.packagist.org/provider-ralouphie$getallheaders.json from cache
Using version ^3.0 for ralouphie/getallheaders
./composer.json has been updated
Reading ./composer.json
Loading config file /home/vagrant/.composer/config.json
Loading config file /home/vagrant/.composer/auth.json
Loading config file ./composer.json
Executing command (/home/vagrant/code/Anonymous/experiment 2): git branch --no-color --no-abbrev -v
Executing command (/home/vagrant/code/Anonymous/experiment 2): git describe --exact-match --tags
Executing command (/home/vagrant/code/Anonymous/experiment 2): git log --pretty="%H" -n1 HEAD --no-show-signature
Executing command (/home/vagrant/code/Anonymous/experiment 2): hg branch
Executing command (/home/vagrant/code/Anonymous/experiment 2): fossil branch list
Executing command (/home/vagrant/code/Anonymous/experiment 2): fossil tag list
Executing command (/home/vagrant/code/Anonymous/experiment 2): svn info --xml
Reading /home/vagrant/.composer/composer.json
Loading config file /home/vagrant/.composer/config.json
Loading config file /home/vagrant/.composer/auth.json
Loading config file /home/vagrant/.composer/composer.json
Loading config file /home/vagrant/.composer/auth.json
Reading /home/vagrant/.composer/auth.json
Reading /home/vagrant/.composer/vendor/composer/installed.json
Loading plugin Hirak\Prestissimo\Plugin_composer_tmp0
Downloading https://repo.packagist.org/packages.json
Writing /home/vagrant/.composer/cache/repo/https---repo.packagist.org/packages.json into cache
Loading composer repositories with package information
Writing /home/vagrant/.composer/cache/repo/https---repo.packagist.org/packages.json into cache
Updating dependencies (including require-dev)
Reading /home/vagrant/.composer/cache/repo/https---repo.packagist.org/p-provider-2013.json from cache
Reading /home/vagrant/.composer/cache/repo/https---repo.packagist.org/p-provider-2014.json from cache
Reading /home/vagrant/.composer/cache/repo/https---repo.packagist.org/p-provider-2015.json from cache
Reading /home/vagrant/.composer/cache/repo/https---repo.packagist.org/p-provider-2016.json from cache
Reading /home/vagrant/.composer/cache/repo/https---repo.packagist.org/p-provider-2017.json from cache
Reading /home/vagrant/.composer/cache/repo/https---repo.packagist.org/p-provider-2018.json from cache
Reading /home/vagrant/.composer/cache/repo/https---repo.packagist.org/p-provider-2019.json from cache
Reading /home/vagrant/.composer/cache/repo/https---repo.packagist.org/p-provider-2019-10.json from cache
Reading /home/vagrant/.composer/cache/repo/https---repo.packagist.org/p-provider-2020-01.json from cache
Reading /home/vagrant/.composer/cache/repo/https---repo.packagist.org/p-provider-2020-04.json from cache
Reading /home/vagrant/.composer/cache/repo/https---repo.packagist.org/p-provider-2020-07.json from cache
Reading /home/vagrant/.composer/cache/repo/https---repo.packagist.org/p-provider-archived.json from cache
Reading /home/vagrant/.composer/cache/repo/https---repo.packagist.org/p-provider-latest.json from cache
Reading /home/vagrant/.composer/cache/repo/https---repo.packagist.org/provider-ralouphie$getallheaders.json from cache
Resolving dependencies through SAT
Looking at all rules.
Dependency resolution completed in 0.000 seconds
Analyzed 103 packages to resolve dependencies
Analyzed 88 rules to resolve dependencies
Package operations: 1 install, 0 updates, 0 removals
Installs: ralouphie/getallheaders:3.0.3
- Installing ralouphie/getallheaders (3.0.3): Reading /home/vagrant/.composer/cache/files/ralouphie/getallheaders/ddc5f4c7ab3d868f5060717336a0d93475d53175.zip from cache
Loading from cache
Extracting archiveExecuting command (CWD): unzip -qq '/home/vagrant/code/Anonymous/experiment 2/vendor/ralouphie/getallheaders/fd45c27f2968e6a5a56e4f234ba908a4' -d '/home/vagrant/code/Anonymous/experiment 2/vendor/composer/d6184e5e'
Failed to execute (9) unzip -qq '/home/vagrant/code/Anonymous/experiment 2/vendor/ralouphie/getallheaders/fd45c27f2968e6a5a56e4f234ba908a4' -d '/home/vagrant/code/Anonymous/experiment 2/vendor/composer/d6184e5e'
[/home/vagrant/code/Anonymous/experiment 2/vendor/ralouphie/getallheaders/fd45c27f2968e6a5a56e4f234ba908a4]
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
unzip: cannot find zipfile directory in one of /home/vagrant/code/Anonymous/experiment 2/vendor/ralouphie/getallheaders/fd45c27f2968e6a5a56e4f234ba908a4 or
/home/vagrant/code/Anonymous/experiment 2/vendor/ralouphie/getallheaders/fd45c27f2968e6a5a56e4f234ba908a4.zip, and cannot find /home/vagrant/code/Anonymous/experiment 2/vendor/ralouphie/getallheaders/fd45c27f2968e6a5a56e4f234ba908a4.ZIP, period.
The archive may contain identical file names with different capitalization (which fails on case insensitive filesystems)
Unzip with unzip command failed, falling back to ZipArchive class
REASON: Required by the root package: Install command rule (install ralouphie/getallheaders 3.0.0|install ralouphie/getallheaders 3.0.1|install ralouphie/getallheaders 3.0.2|install ralouphie/getallheaders 3.0.3)
Reading /home/vagrant/code/Anonymous/experiment 2/vendor/composer/installed.json
Writing lock file
Generating autoload files

I don't know what happened! But when I ran this commands: php7.2 $(which composer) clear-cache and then php7.2 $(which composer) require ralouphie/getallheaders -vvv, it successfully installed that package.
Thanks #Marcin Orlowski, #RiggsFolly and #aynber for your help!

Related

Composer crashes when it tries to Resolve dependencies

I am trying to use Composer to install dependancies inside a Docker container running PHP 5.6.40.
It runs, but quits and the vendor directory is always empty.
MacBook:my-app dev$ docker exec my-app_php56_1 php -d memory_limit=-1 composer.phar update -vvv --no-cache --no-plugins
Disabling cache usage
Running 1.9.0 (2019-08-02 20:55:32) with PHP 5.6.40 on Linux / 4.9.184-linuxkit
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Reading ./composer.json
Loading config file ./composer.json
Checked CA file /etc/ssl/certs/ca-certificates.crt: valid
Executing command (/var/www/html): git branch --no-color --no-abbrev -v
Reading /root/.composer/composer.json
Loading config file /root/.composer/composer.json
Loading composer repositories with package information
Downloading https://repo.packagist.org/packages.json
Updating dependencies (including require-dev)
Downloading http://repo.packagist.org/p/provider-2013%24b962a943715f142bd3c36c0e87b67b28b16c014a98898622ec735220b7e1ee4f.json
Downloading http://repo.packagist.org/p/provider-2014%24ecc1513d9762efcfd48fdbaf4a08f829a59093064f40b7c351f93f3fbdd07973.json
Downloading http://repo.packagist.org/p/provider-2015%24258303eff7165b17439353fe44e501a3a6d600bd5b5482c5261a2ffa2234a947.json
Downloading http://repo.packagist.org/p/provider-2016%2496e2313b5ba90c2b798b03f9e306a27c15f11f763cd6478b834943fc128fc111.json
Downloading http://repo.packagist.org/p/provider-2017%24d2ad294ebaf381b7bf68cacbe514cf2bb33c3a919b97319bfa2e2ffaa66bc511.json
Downloading http://repo.packagist.org/p/provider-2018%2466893d07acdb18bb12d5e92e062b6e3058f5d284292b09cf585bf0ceb1b26aca.json
Downloading http://repo.packagist.org/p/provider-2018-10%24ff53e18093ae3e52a84c5567489c78bf1d82d0af80f413c3d6ad35d541a28434.json
Downloading http://repo.packagist.org/p/provider-2019-01%2431194ef7551ee4bffd7cc09dd6d01dc60848afc129544438ac7931e9d42dd54e.json
...
Downloading http://repo.packagist.org/p/phpspec/phpspec%248dc959bd0ae544f84e5bceee933d9a61d0a2074b208c3b7e7807cdc320e83eee.json
Downloading http://repo.packagist.org/p/phpspec/php-diff%249b8687b7c99f069823a9ac8d17900f9c8243368ceea9a5ac4e71ab424bb6f2d5.json
Downloading http://repo.packagist.org/p/squizlabs/php_codesniffer%24386b3726c6c3ce5edde180a7881f924be5dfd720c951dc93db8455ae871e9d61.json
MacBook:my-app dev$
It then just returns nothing and the vendor directory remains empty.
I am running composer without any plugins or cache.
Finally, the exact same composer.json file works fine in my other PHP 7.1.x container.
I also wondered if the final dependancies was causing an issue so tried removing it. Still no luck.
EDIT:
I've now gone back to my PHP 7.1 container and run the exact same scripts and it works fine. Composer's output is (so the 5.6 version just dies at the point that it does the "Resolving dependencies through SAT":
...
Downloading http://repo.packagist.org/p/webmozart/assert%24f23cf2d90bee4a1a09dc1d005896d60e715bdb9ecd4531874bfc3dd3ea5908c1.json
Downloading http://repo.packagist.org/p/phpspec/phpspec%248dc959bd0ae544f84e5bceee933d9a61d0a2074b208c3b7e7807cdc320e83eee.json
Downloading http://repo.packagist.org/p/phpspec/php-diff%249b8687b7c99f069823a9ac8d17900f9c8243368ceea9a5ac4e71ab424bb6f2d5.json
Downloading http://repo.packagist.org/p/squizlabs/php_codesniffer%24386b3726c6c3ce5edde180a7881f924be5dfd720c951dc93db8455ae871e9d61.json
Resolving dependencies through SAT
Looking at all rules.
Something\'s changed, looking at all rules again (pass #16)
Dependency resolution completed in 28.879 seconds
Analyzed 21713 packages to resolve dependencies
Analyzed 1376894 rules to resolve dependencies
Resolving dependencies through SAT
Looking at all rules.
Dependency resolution completed in 0.003 seconds
Package operations: 116 installs, 0 updates, 0 removals
Installs: kylekatarnls/update-helper:1.2.0, stripe/stripe-php:v2.3.0, abraham/twitteroauth:0.6.6, ralouphie/getallheaders:3.0.3, psr/http-message:1.0.1, guzzlehttp/psr7:1.6.1, guzzlehttp/promises:v1.3.1, guzzlehttp/guzzle:6.0.2, maknz/slack:1.7.0, maknz/slack-laravel:1.0.0, sabberworm/php-css-parser:8.1.0, phenx/php-svg-lib:v0.3.2, phenx/php-font-lib:0.5.1, dompdf/dompdf:v0.8.3, vlucas/phpdotenv:v1.1.1
...
etc for everything else
From the output of your run, it seems your composer setup is using http rather than https. Run this command before installing composer:
composer config -g repo.packagist composer https://packagist.org
This question is getting a little old now so I assume you already resolved it. I had the same problem recently.
The problem appears to stem from the change of PHP version. In my case I was going from 7.1 to 7.2, which you would imagine shouldn't cause too much of an issue.
My composer update -vvv --no-cache --no-plugins output would show
Resolving dependencies through SAT
Looking at all rules.
Something's changed, looking at all rules again (pass #[forever increasing])
After attempting to install symfony/thanks
In the end I had to remove symfony/thanks from my composer.json and run again. It then gave me some problems with a few other packages that I also removed. Once I had a successful run I was then able to start adding the offending packages back to my composer.json and eventually the issue was resolved.
I assume the underlying issue was a number of conflicts in the various levels of dependencies of my packages.
I guess if anyone finds they end up removing more and more packages, the solution would be to start from the minimum possible packages (the default Laravel composer.json in my case) and start adding new packages one-by-one.

XAMPP + MediaWiki + Composer installing extensions

I used the Windows Setup.exe to install Composer. It now works from the command line.
I have an installation of XAMPP in C:\ that contains MediaWiki installed in the HTDOCS folder.
My goal: Install the extensions Semantic Breadcrumb Links and Semantic Extra Special Properties into MediaWiki.
The problem: Composer floods me with a bunch of nonsense downloads of vendor folders I already possess, ignoring the SBL/SESP stuff entirely.
I deleted my composer.json file in the MW root folder entirely. Then went to the command line and entered this to recreate and add to it.
composer require mediawiki/semantic-breadcrumb-links ~1.4
composer require mediawiki/semantic-extra-special-properties ~1.5
The composer.json is created with those two in it. I already have Semantic MediaWiki and it's dependencies installed. Composer Merge Plugin is in my Vendors folder and is installed according to MediaWiki.
I run this command:
composer update
And then I get slammed with a bunch of talk about composer.json being read, then not being found in a Composer folder located in my Roaming folder. Then it starts spitting out Github information. And then it proceeds to download file after file, and write them to a cache in my AppData/Local/Composer/repo folder.
All of the files written already exist inside my Vendor folder in the MediaWiki installation.
I can't find anything online about the two extensions I want to install. An example of the output:
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\Ghaleon>cd c:\xampp\htdocs\zephyr
c:\xampp\htdocs\zephyr>composer require mediawiki/semantic-extra-special-properties "~1.5" -vvv
Reading ./composer.json
Loading config file ./composer.json
Checked CA file C:\Users\Ghaleon\AppData\Local\Temp\composer-cacert-e78c8ab7b4432bd466e64bb942d988f6c0ac91cd785017e465bdc96d42fe9dd0.pem: valid
Executing command (C:\xampp\htdocs\zephyr): git branch --no-color --no-abbrev -v
Executing command (C:\xampp\htdocs\zephyr): git describe --exact-match --tags
Executing command (C:\xampp\htdocs\zephyr): git log --pretty="%H" -n1 HEAD
Executing command (C:\xampp\htdocs\zephyr): hg branch
Executing command (C:\xampp\htdocs\zephyr): fossil branch list
Executing command (C:\xampp\htdocs\zephyr): fossil tag list
Executing command (C:\xampp\htdocs\zephyr): svn info --xml
Failed to initialize global composer: Composer could not find the config file: C:/Users/Ghaleon/AppData/Roaming/Composer/composer.json
To initialize a project, please create a composer.json file as described in the getcomposer "Getting Started" section
Reading C:\xampp\htdocs\zephyr/vendor/composer/installed.json
Loading plugin Wikimedia\Composer\MergePlugin
Running 1.5.2 (2017-09-11 16:59:25) with PHP 7.1.7 on Windows NT / 6.1
./composer.json has been updated
Reading ./composer.json
Loading config file ./composer.json
Executing command (C:\xampp\htdocs\zephyr): git branch --no-color --no-abbrev -v
Executing command (C:\xampp\htdocs\zephyr): git describe --exact-match --tags
Executing command (C:\xampp\htdocs\zephyr): git log --pretty="%H" -n1 HEAD
Executing command (C:\xampp\htdocs\zephyr): hg branch
Executing command (C:\xampp\htdocs\zephyr): fossil branch list
Executing command (C:\xampp\htdocs\zephyr): fossil tag list
Executing command (C:\xampp\htdocs\zephyr): svn info --xml
Failed to initialize global composer: Composer could not find the config file: C:/Users/Ghaleon/AppData/Roaming/Composer/composer.json
To initialize a project, please create a composer.json file as described in the getcomposer "Getting Started" section
Reading C:\xampp\htdocs\zephyr/vendor/composer/installed.json
Loading plugin Wikimedia\Composer\MergePlugin_composer_tmp0
Loading composer repositories with package information
Downloading packages.json
Writing C:/Users/Ghaleon/AppData/Local/Composer/repo/https-- packagist.org/packages.json into cache
Updating dependencies (including require-dev)
Reading C:/Users/Ghaleon/AppData/Local/Composer/repo/https---packagist.org/p-pro
vider-2013.json from cache
Reading C:/Users/Ghaleon/AppData/Local/Composer/repo/https---packagist.org/p-pro
vider-2014.json from cache
Reading C:/Users/Ghaleon/AppData/Local/Composer/repo/https---packagist.org/p-pro
vider-2015.json from cache
Reading C:/Users/Ghaleon/AppData/Local/Composer/repo/https---packagist.org/p-pro
vider-2016.json from cache
Reading C:/Users/Ghaleon/AppData/Local/Composer/repo/https---packagist.org/p-pro
vider-2016-10.json from cache
Downloading provider-2017-01%24d88eddadd51717e910cd1bad29 89204217e7add9448808859860c1520b3d294d.json

Missing composer/zend command: development-enable

When I install Zend via composer create-project -n -sdev zendframework/skeleton-application as specified by Zend's main tutorial, I get a skeleton application that seems to work nicely.
However, when I follow this tutorial's advice to use composer development-enable, I get the following message:
[Symfony\Component\Console\Exception\CommandNotFoundException]
Command "development-enable" is not defined.
Is anyone able to duplicate/fix this problem?
I would normally assume it's an issue with the bash $PATH value, but the composer command by itself runs just fine, so I'm thinking it may be some other problem specific to this subcommand -- a missing dependency somewhere, for example.
Here is the relevant piece of the tutorial I am trying to follow:
https://docs.zendframework.com/tutorials/getting-started/skeleton-application/
(In case it helps for purposes of duplication: The CLI PHP version on my development server is 5.4.43. For reasons I won't bore you with, I can't update this CLI PHP to a newer version; the major release that Apache is using on my machine is 5.6.)
EDIT 1: Rerunning my installation using composer create-project -s dev zendframework/skeleton-application (as specified in the linked tutorial) still results in the same problem.
EDIT 2: Here is my shell input/output.
patrick [~/www/berlin-data]# composer create-project -n -sdev zendframework/skeleton-application
Installing zendframework/skeleton-application (2.3.3)
- Installing zendframework/skeleton-application (2.3.3)
Loading from cache
Created project in /home1/patrick/public_html/berlin-data/skeleton-application
Loading composer repositories with package information
Updating dependencies (including require-dev)
- Installing zendframework/zendxml (1.0.2)
Loading from cache
- Installing zendframework/zendframework (2.3.3)
Loading from cache
zendframework/zendframework suggests installing doctrine/annotations (Doctrine Annotations >=1.0 for annotation features)
zendframework/zendframework suggests installing ircmaxell/random-lib (Fallback random byte generator for Zend\Math\Rand if OpenSSL/Mcrypt extensions are unavailable)
zendframework/zendframework suggests installing ocramius/proxy-manager (ProxyManager 0.5.* to handle lazy initialization of services)
zendframework/zendframework suggests installing zendframework/zendpdf (ZendPdf for creating PDF representations of barcodes)
zendframework/zendframework suggests installing zendframework/zendservice-recaptcha (ZendService\ReCaptcha for rendering ReCaptchas in Zend\Captcha and/or Zend\Form)
Writing lock file
Generating autoload files
patrick [~/www/berlin-data]# cd skeleton-application/
patrick [~/www/berlin-data/skeleton-application]# composer development-enable
[Symfony\Component\Console\Exception\CommandNotFoundException]
Command "development-enable" is not defined.
When you run the command
composer create-project -n -sdev zendframework/skeleton-application
This will create a directory in your current dir called skeleton-application inside of this directory is where you need to run the command:
composer development-enable
If this still doesnt work then something went wrong with install process.
The first command should give out put something like:
$ composer create-project -n -sdev zendframework/skeleton-application
Installing zendframework/skeleton-application (dev-master 941da45b407e4f09e264f0 00fb537928badb96ed)
- Installing zendframework/skeleton-application (dev-master master)
Cloning master from cache
Created project in C:\Users\<UserName>\Documents\skeleton-application
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
- Installing zendframework/zend-component-installer (0.3.0)
Downloading: 100%
- Installing zendframework/zend-stdlib (3.0.1)
Downloading: 100%
...
Notice this line Created project in C:\Users\<UserName>\Documents\skeleton-application
Thats the directory you need to be in to run the command:
cd C:\Users\<UserName>\Documents\skeleton-application
composer development-enable
If that still didnt work, try specifying the version for downloading:
composer create-project -n "zendframework/skeleton-application":"dev-master"
PS
As of writing this the skeleton application requires PHP "^5.6 || ^7.0". So if you are running a lower version composer wont install that copy. And the tutorials based on it may not work as expected.
Two things I've noticed: when you first initialize a skeleton application, depending on your settings, development mode is enabled by default.
If you want to run
composer development-enable
or any other similar commands, you must be in your path/to/install or path/to/yourapp directory for it to work! This is the folder that contains your local composer install. If you are in any of the parent directories, the command will not work.
I was also having this similar problem when trying to enable development mode with the command composer development-enable on my apigility app. I was getting error:
zf-development-mode is not recognised as an internal or external command.
There is a page on the apigility website regarding the development mode module:
https://apigility.org/documentation/modules/zf-development-mode
I found by following the instruction to install the module from composer:
$ composer require zfcampus/zf-development-mode
Then making a copy of the development config file:
$ cp vendor/zfcampus/zf-development-mode/development.config.php.dist config/
Now using the composer development-enable seems to work fine, which in my case returned the message 'Already in development mode'.

composer php cli has stopped working

I have tried to install with following command laravel / lumen:
composer global require "laravel/lumen-installer=~1.0"
But my commandline ends with an error: "CLI has stopped working" in my windows event-log is following entry:
Name der fehlerhaften Anwendung: php.exe, Version: 5.6.8.0, Zeitstempel: 0x5553b22c
Name des fehlerhaften Moduls: php5ts.dll, Version: 5.6.8.0, Zeitstempel: 0x5553b2a2
Ausnahmecode: 0xc0000005
Fehleroffset: 0x0004a5ec
ID des fehlerhaften Prozesses: 0x1168
Startzeit der fehlerhaften Anwendung: 0x01d1247012bc4f0e
Pfad der fehlerhaften Anwendung: D:\Applications\MAMP\bin\php\php5.6.8\php.exe
Pfad des fehlerhaften Moduls: D:\Applications\MAMP\bin\php\php5.6.8\php5ts.dll
Berichtskennung: e7132df8-3deb-4564-9ee1-9b7e15010821
Vollständiger Name des fehlerhaften Pakets:
Anwendungs-ID, die relativ zum fehlerhaften Paket ist: ...
I search for a solutions via google but nothing found - nothing worked for me
kind regards
If i am typing "composer global require "laravel/lumen-installer=~1.0" -vvv"
D:\workspace>composer global require "laravel/lumen-installer=~1.0" -vvv
Changed current directory to C:/Users/xxx/AppData/Roaming/Composer
Reading ./composer.json
Loading config file ./composer.json
Executing command (C:\Users\xxx\AppData\Roaming\Composer): git describe --exact-match --tags
Executing command (C:\Users\xxx\AppData\Roaming\Composer): git branch --no-color --no-abbrev -v
Executing command (C:\Users\xxx\AppData\Roaming\Composer): hg branch
Executing command (C:\Users\xxx\AppData\Roaming\Composer): svn info --xml
./composer.json has been updated
Reading ./composer.json
Loading config file ./composer.json
Executing command (C:\Users\xxx\AppData\Roaming\Composer): git describe --exact-match --tags
Executing command (C:\Users\xxx\AppData\Roaming\Composer): git branch --no-color --no-abbrev -v
Executing command (C:\Users\xxx\AppData\Roaming\Composer): hg branch
Executing command (C:\Users\xxx\AppData\Roaming\Composer): svn info --xml
Loading composer repositories with package information
Downloading https://packagist.org/packages.json
Writing C:/Users/xxx/AppData/Local/Composer/repo/https---packagist.org/packages.json into cache
Updating dependencies (including require-dev)
Reading C:/Users/xxx/AppData/Local/Composer/repo/https---packagist.org/p-provider-2013.json from cache
Reading C:/Users/xxx/AppData/Local/Composer/repo/https---packagist.org/p-provider-2014.json from cache
Reading C:/Users/xxx/AppData/Local/Composer/repo/https---packagist.org/p-provider-2015-01.json from cache
Reading C:/Users/xxx/AppData/Local/Composer/repo/https---packagist.org/p-provider-2015-04.json from cache
Reading C:/Users/xxx/AppData/Local/Composer/repo/https---packagist.org/p-provider-2015-07.json from cache
Reading C:/Users/xxx/AppData/Local/Composer/repo/https---packagist.org/p-provider-2015-10.json from cache
Reading C:/Users/xxx/AppData/Local/Composer/repo/https---packagist.org/p-provider-archived.json from cache
Reading C:/Users/xxx/AppData/Local/Composer/repo/https---packagist.org/p-provider-latest.json from cache
Reading C:/Users/xxx/AppData/Local/Composer/repo/https---packagist.org/provider-laravel$lumen-installer.json from cache
Reading C:/Users/xxx/AppData/Local/Composer/repo/https---packagist.org/provider-guzzlehttp$guzzle.json from cache
Reading C:/Users/xxx/AppData/Local/Composer/repo/https---packagist.org/provider-symfony$console.json from cache
Reading C:/Users/xxx/AppData/Local/Composer/repo/https---packagist.org/provider-symfony$process.json from cache
Reading C:/Users/xxx/AppData/Local/Composer/repo/https---packagist.org/provider-guzzlehttp$streams.json from cache
Reading C:/Users/xxx/AppData/Local/Composer/repo/https---packagist.org/provider-guzzlehttp$ringphp.json from cache
Reading C:/Users/xxx/AppData/Local/Composer/repo/https---packagist.org/provider-react$promise.json from cache
Analyzed 626 packages to resolve dependencies
Analyzed 7133 rules to resolve dependencies
- Installing symfony/process (v2.7.7)

PHP Composer: Debugging a Cache Miss for a Custom Repository's packages.json

I'm using PHP composer with a custom repository. For reasons that are beyond my ability to debug myself, composer is downloading the repository's packages.json every time I run a command.
$ composer.phar --profile -vvv --no-dev --repository-url=http://packages.firegento.com create-project magento-hackathon/magento-composer-installer .
[4.2MB/0.05s] Downloading http://packages.firegento.com/packages.json
[70.6MB/152.18s] Writing /Users/alanstorm/.composer/cache/repo/http---packages.firegento.com/packages.json into cache
...
$ composer.phar --profile -vvv update
[3.7MB/0.01s] Reading ./composer.json
[4.2MB/0.02s] Executing command (CWD): git describe --exact-match --tags
[4.4MB/0.03s] Executing command (CWD): git branch --no-color --no-abbrev -v
[4.5MB/0.05s] Executing command (CWD): hg branch
[4.5MB/0.12s] Executing command (CWD): svn info --xml
[6.6MB/0.17s] Loading composer repositories with package information
[6.8MB/0.19s] Downloading http://packages.firegento.com/packages.json
[73.2MB/125.50s] Writing /Users/alanstorm/.composer/cache/repo/http---packages.firegento.com/packages.json into cache
That's 152.18s seconds for the first read, and 125.50s seconds for the second.
This runs counter to the behavior of the standard packagist packages.json, which composer seems to download once and then read from cache.
How can I debug this cache miss further? I don't know enough about composer to quickly track down where the "do i need to grab this from cache" logic lives, and I don't control the custom repository server.
Also, it's possible I'm completely wrong about the cache hit/miss theory, so any other ideas on this slow behavior are appreciated.
Composer, by design, doesn't cache the main packages.json file, so my question about a cache miss was invalid. If you're seeing a slow download of packages.json, your best bet is to
Enable gzip compression on the server serving this file.
Splitting up the packages.json file into multiple files.

Categories