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
Related
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!
I have cloned repository from GitHub. So I am wondering how to build my own composer instance from the source files?
It also took me a while to find it, but the installation from source instructions are listed here in the Composer repository.
Basically you can install Composer from source with Composer, e.g. composer install. Very meta! Then you can use the Composer you've installed from source with path-where-you-cloned-composer/bin/composer. See the full instructions copied below:
Run git clone https://github.com/composer/composer.git
Download the composer.phar executable
Run Composer to get the dependencies: cd composer && php ../composer.phar install
You can run the test suite by executing vendor/bin/phpunit when
inside the composer directory, and run Composer by executing the
bin/composer. To test your modified Composer code against another
project, run php /path/to/composer/bin/composer inside that
project's directory.
(If you already have Composer installed globally, you don't need to do step 2.)
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)
i am new to mac os.i have installed laravel in mamp server using manually not using composer.also installed composer but i dont know how to run commands like php artisan and all.
in windows i can easily point to composer like as i given answer to this question
Where and how can I run composer commands?
please help me how to in mamp server ?
thank you in advance
Updated::
Usage:
command [options] [arguments]
Options:
--help (-h) Display this help message
--quiet (-q) Do not output any message
--verbose (-v|vv|vvv) Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version (-V) Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
--no-interaction (-n) Do not ask any interactive question
--profile Display timing and memory usage information
--working-dir (-d) If specified, use the given directory as working directory.
Available commands:
about Short information about Composer
archive Create an archive of this composer package
browse Opens the package's repository URL or homepage in your browser.
clear-cache Clears composer's internal package cache.
clearcache Clears composer's internal package cache.
config Set config options
create-project Create new project from a package into given directory.
depends Shows which packages depend on the given package
diagnose Diagnoses the system to identify common errors.
dump-autoload Dumps the autoloader
dumpautoload Dumps the autoloader
global Allows running commands in the global composer dir ($COMPOSER_HOME).
help Displays help for a command
home Opens the package's repository URL or homepage in your browser.
info Show information about packages
init Creates a basic composer.json file in current directory.
install Installs the project dependencies from the composer.lock file if present, or falls back on the composer.json.
licenses Show information about licenses of dependencies
list Lists commands
remove Removes a package from the require or require-dev
require Adds required packages to your composer.json and installs them
run-script Run the scripts defined in composer.json.
search Search for packages
self-update Updates composer.phar to the latest version.
selfupdate Updates composer.phar to the latest version.
show Show information about packages
status Show a list of locally modified packages
suggests Show package suggestions
update Updates your dependencies to the latest version according to composer.json, and updates the composer.lock file.
validate Validates a composer.json and composer.lock
CPU664:~ narendrab$ php artisan
Could not open input file: artisan
CPU664:~ narendrab$
In mac os, you can easily install composer globally by
curl -sS https://getcomposer.org/installer | /Applications/MAMP/bin/php5/bin/php
mv composer.phar /usr/local/bin/composer
Then you can just use command composer everywhere without specifying full path. You have to use full path for MAMP php since php comes with mac will be default.
Edit: run artisan command within the project directory.
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.