1
0
Fork 0
Go to file
Tom Klingenberg db53c65986
COMPOSER_DISABLE_NETWORK aware `diagnose` checks; SKIP output (#11597)
Make `diagnose` checks aware of COMPOSER_DISABLE_NETWORK (true) and skip
Composer network operations that would otherwise spill stack traces into
diagnostic messages and taint the result as error while the check itself
is not applicable/useful within the environment.

`COMPOSER_DISABLE_NETWORK` was released with [2.0.0-alpha1] and intro-
duced in fc03ab9bb (Add COMPOSER_DISABLE_NETWORK env var for debugging,
2019-01-14).

The previous behaviour was to exit with a status of two (2), denoting an
error.

The new behaviour is to exit with a status of zero (0), showing the
successful skipping of diagnostics that can only be run when Composer
network is enabled - not disabled.

SKIP output is updated and streamlined.

NOTE: The "prime" Value

It is irrelevant for diagnose checks, as all diagnostic checks that
spilled were with the HTTP Downloader and the check is aligned (both
"1" or "prime" values disable):

    (bool) Platform::getEnv('COMPOSER_DISABLE_NETWORK')

NOTE: Not Affected

 * The `allow_url_fopen` diagnostic check, platform related
 * The `disable-tls` setting related HTTP Downloader creation warning

[2.0.0-alpha1]: <https://getcomposer.org/changelog/2.0.0-alpha1> "released 2020-06-03"
2023-08-30 21:35:59 +02:00
.github GH Actions: run against PHP 8.3 (#11601) 2023-08-30 15:53:45 +02:00
bin Allow autoload to run on 5.6 still, add early exits when running composer or autoload.php with outdated PHP versions, fixes #10714, refs #10709 2022-04-06 22:07:16 +02:00
doc Fix typo 03-cli.md (#11587) 2023-08-30 18:03:12 +02:00
phpstan Fix PHPStan after running autoloader tests (#11558) 2023-07-21 14:34:59 +02:00
res Add audit.ignored config setting to ignore security advisories by id or CVE id, fixes #11298 (#11556) 2023-07-21 14:36:38 +02:00
src COMPOSER_DISABLE_NETWORK aware `diagnose` checks; SKIP output (#11597) 2023-08-30 21:35:59 +02:00
tests Add tests for DumpAutoloadCommand (#11581) 2023-08-30 16:09:05 +02:00
.editorconfig Enhancement: Add .editorconfig 2019-01-03 10:49:27 +01:00
.gitattributes Fix #11507: phpstan/rules.neon missing from archives (#11586) 2023-08-29 14:17:16 +02:00
.gitignore Adds .vscode dir to gitignore file (#11524) 2023-07-01 13:34:57 +02:00
.php-cs-fixer.php Fix CS (#11003) 2022-08-17 14:20:07 +02:00
CHANGELOG.md Minor Typo CHANGELOG.md 2.3.0-RC1 release (#11583) 2023-08-16 14:05:14 +02:00
CODE_OF_CONDUCT.md Update Code of Conduct to Contributor Covenant v2.1 (#11161) 2022-11-01 10:46:06 +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 docs: add binary dependencies (#11505) 2023-07-01 14:20:19 +02:00
UPGRADE-2.0.md Escape special characters in Markdown files 2020-10-24 11:53:20 +01:00
composer.json Upgrade to react/promise 3.0.0 (#10429) 2023-07-20 12:52:28 +02:00
composer.lock Upgrade to react/promise 3.0.0 (#10429) 2023-07-20 12:52:28 +02:00
phpunit.xml.dist Exclude PHPStan extensions from PHPUnit coverage 2023-01-03 18:57:00 +11: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.

Continuous Integration

Installation / Usage

Download and install Composer by following the official instructions.

For usage, see the documentation.

Packages

Find public packages on Packagist.org.

For private package hosting take a look at Private Packagist.

Community

Follow @packagist or @seldaek on Twitter for announcements, or check the #composerphp hashtag.

For support, Stack Overflow offers a good collection of Composer related questions, or you can use the GitHub discussions.

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

Latest Composer

PHP 7.2.5 or above for the latest version.

Composer 2.2 LTS (Long Term Support)

PHP versions 5.3.2 - 8.1 are still supported via the LTS releases of Composer (2.2.x). If you run the installer or the self-update command the appropriate Composer version for your PHP should be automatically selected.

Binary dependencies

  • 7z (or 7zz)
  • unzip (if 7z is missing)
  • gzip
  • tar
  • unrar
  • xz
  • Git (git)
  • Mercurial (hg)
  • Fossil (fossil)
  • Perforce (p4)
  • Subversion (svn)

It's important to note that the need for these binary dependencies may vary depending on individual use cases. However, for most users, only 2 dependencies are essential for Composer: 7z (or 7zz or unzip), and git.

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