1
0
Fork 0
Go to file
Arnout Boks d1ce9f6246 Fix defaultRepos fallback does not use auth config
When a full 'composer' cannot be constructed (because there is no
local composer.json and no global composer.json), some commands
(e.g. `show -a`) fall back to the default repositories from the
`$COMPOSER_HOME/config.json` file. Without this fix, any auth
configuration from `$COMPOSER_HOME/auth.json` is not used for
these repositories in such a fallback scenario.

Steps to reproduce:

* Configure a password-protected composer repository in
  `$COMPOSER_HOME/config.json`.
* Configure valid credentials for that repository in
  `$COMPOSER_HOME/auth.json`.
* Make sure there is no file `$COMPOSER_HOME/composer.json`.
* Ensure the current working directory has no `composer.json`.
* Run `composer show -a some/package`.

Expected: Information about `some/package` is shown without
needing to enter credentials.

Actual: A prompt "Authentication required" is shown for the
private repository. When running the same command in a dir
that has a `composer.json`, or when `$COMPOSER_HOME/composer.json`
exists, things work as expected.
2019-01-31 13:46:45 +01:00
.github Add note about CS fixes to contribution notes 2018-11-26 13:43:24 +01:00
bin Add support for running composer with phpdbg (#7798) 2018-11-26 12:32:31 +01:00
doc Document --no-check-all better, fixes #7889 2019-01-28 16:17:46 +01:00
res Add support.chat to schema, refs #7714 2018-11-26 19:52:05 +01:00
src Fix defaultRepos fallback does not use auth config 2019-01-31 13:46:45 +01:00
tests Warn on invalid package name or require/provide/.., fixes #7874 2019-01-29 13:46:23 +01:00
.gitattributes Exclude non-essential files from dist package 2017-12-09 22:20:45 -08:00
.gitignore Add PHPCSFixer config 2015-04-15 01:22:20 +01:00
.php_cs CS fixer 2018-07-24 14:32:52 +02:00
.travis.yml Fixes from PHPStan (#7687) 2018-11-12 15:23:32 +01:00
CHANGELOG.md Update changelog 2019-01-30 08:31:28 +01:00
LICENSE lets avoid silly commits in the future 2017-01-19 12:10:26 +01:00
PORTING_INFO Import initial partial port of the libzypp satsolver. 2011-04-05 17:37:19 +02:00
README.md Fix: Remove VersionEye badges 2018-06-24 18:53:36 +02:00
appveyor.yml Improve Appveyor caching and update PHP 2018-08-31 14:27:28 +01:00
composer.json Update target release for master 2018-08-16 16:58:19 +02:00
composer.lock Update xdebug-handler, fixes #7921 2019-01-28 20:52:02 +00:00
phpunit.xml.dist Stop running PEAR Repo test suite as it fails and is kinda irrelevant at this point 2016-02-25 13:10:46 +00:00

README.md

Composer - Dependency Management for PHP

Composer helps you declare, manage, and install dependencies of PHP projects.

See https://getcomposer.org/ for more information and documentation.

Build Status

Installation / Usage

Download and install Composer by following the official instructions.

For usage, see the documentation.

Packages

Find packages on Packagist.

Community

IRC channels are on irc.freenode.org: #composer for users and #composer-dev for development.

For support, Stack Overflow also offers a good collection of Composer related questions.

Please note that this project is released with a Contributor Code of Conduct. By participating in this project and its community you agree to abide by those terms.

Requirements

PHP 5.3.2 or above (at least 5.3.4 recommended to avoid potential bugs)

Authors

See also the list of contributors who participated in this project.

Security Reports

Please send any sensitive issue to security@packagist.org. Thanks!

License

Composer is licensed under the MIT License - see the LICENSE file for details

Acknowledgments