Skip to content

Commit

Permalink
Merge branch 'composer:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
xerc authored Nov 30, 2024
2 parents 0a5c6d9 + 74f68ad commit 1181f6a
Show file tree
Hide file tree
Showing 418 changed files with 8,048 additions and 5,550 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ jobs:

- name: "Handle lowest dependencies update"
if: "contains(matrix.dependencies, 'lowest')"
run: "echo \"COMPOSER_UPDATE_FLAGS=$COMPOSER_UPDATE_FLAGS --prefer-lowest\" >> $GITHUB_ENV"
run: |
echo "COMPOSER_UPDATE_FLAGS=$COMPOSER_UPDATE_FLAGS --prefer-lowest" >> $GITHUB_ENV
echo "COMPOSER_LOWEST_DEPS_TEST=1" >> $GITHUB_ENV
- name: "Handle ignore-platform-reqs dependencies update"
if: "contains(matrix.dependencies, 'ignore')"
Expand Down
30 changes: 21 additions & 9 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,31 @@ jobs:
matrix:
php-version:
- "7.2"
- "latest"
- "nightly"

steps:
- name: "Checkout"
uses: "actions/checkout@v4"
- uses: actions/checkout@v4

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
- uses: shivammathur/setup-php@v2
with:
coverage: "none"
extensions: "intl"
ini-values: "memory_limit=-1, error_reporting=E_ALL, display_errors=On"
php-version: "${{ matrix.php-version }}"
coverage: none

- uses: ramsey/composer-install@v3
with:
dependency-versions: highest

- name: "Lint PHP files"
run: "find src/ -type f -name '*.php' -print0 | xargs -0 -L1 -P4 -- php -l -f"
run: |
hasErrors=0
for f in $(find src/ tests/ -type f -name '*.php' ! -path '*/vendor/*')
do
{ error="$(php -derror_reporting=-1 -ddisplay_errors=1 -l -f $f 2>&1 1>&3 3>&-)"; } 3>&1;
if [ "$error" != "" ]; then
while IFS= read -r line; do echo "::error file=$f::$line"; done <<< "$error"
hasErrors=1
fi
done
if [ $hasErrors -eq 1 ]; then
exit 1
fi
2 changes: 1 addition & 1 deletion .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
include:
- php-version: "7.2"
experimental: false
- php-version: "8.1"
- php-version: "8.3"
experimental: true
fail-fast: false

Expand Down
149 changes: 146 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,134 @@
### [2.8.3] 2024-11-17

* Fixed windows handling of process discovery (#12180)
* Fixed react/promise requirement to allow 2.x installs again (#12188)
* Fixed some issues when lock:false is set in require and bump commands

### [2.8.2] 2024-10-29

* Fixed crash while suggesting providers if they have no description (#12152)
* Fixed issues creating lock files violating the schema in some circumstances (#12149)
* Fixed `create-project` regression in 2.8.1 when using path repos with relative paths (#12150)
* Fixed ctrl-C aborts not working inside text prompts (#12106)
* Fixed git failing silently when git cannot read a repo due to ownership violations (#12178)
* Fixed handling of signals in non-PHP binaries run via proxies (#12176)

### [2.8.1] 2024-10-04

* Fixed `init` command regression when no license is provided (#12145)
* Fixed `--strict-ambiguous` flag handling whereas it sometimes did not report all issues (#12148)
* Fixed `create-project` to inherit the target folder's permissions for installed project files (#12146)
* Fixed a few cases where the prompt for using a parent dir's composer.json fails to work correctly (#8023)

### [2.8.0] 2024-10-02

* BC Warning: Fixed `https_proxy` env var falling back to `http_proxy`'s value. The fallback and warning have now been removed per the 2.7.3 release notes (#11938, #11915)
* Added `--patch-only` flag to the `update` command to restrict updates to patch versions and make an update of all deps safer (#12122)
* Added `--abandoned` flag to the `audit` command to configure how abandoned packages should be treated, overriding the `audit.abandoned` config setting (#12091)
* Added `--ignore-severity` flag to the `audit` command to ignore one or more advisory severities (#12132)
* Added `--bump-after-update` flag to the `update` command to run bump after the update is done (#11942)
* Added a way to control which `scripts` receive additional CLI arguments and where they appear in the command, see [the docs](https://getcomposer.org/doc/articles/scripts.md#controlling-additional-arguments) (#12086)
* Added `allow-missing-requirements` config setting to skip the error when the lock file is not fulfilling the composer.json's dependencies (#11966)
* Added a JSON schema for the composer.lock file (#12123)
* Added better support for Bitbucket app passwords when cloning repos / installing from source (#12103)
* Added `--type` flag to filter packages by type(s) in the `reinstall` command (#12114)
* Added `--strict-ambiguous` flag to the `dump-autoload` command to make it return with an error code if duplicate classes are found (#12119)
* Added warning in `dump-autoload` when vendor files have been deleted (#12139)
* Added warnings for each missing platform package when running `create-project` to avoid having to run it again and again (#12120)
* Added sorting of packages in allow-plugins when `sort-packages` is enabled (#11348)
* Added suggestion of provider packages / polyfills when an ext or lib package is missing (#12113)
* Improved interactive package update selection by first outputting all packages and their possible updates (#11990)
* Improved dependency resolution failure output by sorting the output in a deterministic and (often) more logical way (#12111)
* Fixed PHP 8.4 deprecation warnings about `E_STRICT` (#12116)
* Fixed `init` command to validate the given license identifier (#12115)
* Fixed version guessing to be more deterministic on feature branches if it appears that it could come from either of two mainline branches (#12129)
* Fixed COMPOSER_ROOT_VERSION env var handling to treat 1.2 the same as 1.2.x-dev and not 1.2.0 (#12109)
* Fixed require command skipping new stability flags from the lock file, causing invalid lock file diffs (#12112)
* Fixed php://stdin potentially being open several times when running Composer programmatically (#12107)
* Fixed handling of platform packages in why-not command and partial updates (#12110)
* Reverted "Fixed transport-options.ssl for local cert authorization being stored in lock file making them less portable (#12019)" from 2.7.8 as it was broken

### [2.7.9] 2024-09-04

* Fixed Docker detection breaking on constrained environments (#12095)
* Fixed upstream issue in bash completion script, it is recommended to update it using the `completion` command (#12015)

### [2.7.8] 2024-08-22

* Added `release-age`, `release-date` and `latest-release-date` in the JSON output of `outdated` (#12053)
* Fixed PHP 8.4 deprecation warnings
* Fixed addressability of branches containing `#` signs (#12042)
* Fixed `bump` command not handling some `~` constraints correctly (#12038)
* Fixed COMPOSER_AUTH not taking precedence over ./auth.json (#12084)
* Fixed `relative: true` sometimes not being respected in path repo symlinks (#12092)
* Fixed copy from cache sometimes failing on VirtualBox shared folders (#12057)
* Fixed PSR-4 autoloading order regression in some edge case (#12063)
* Fixed duplicate lib-* packages causing issues when having pecl + core versions of the same PHP extension (#12093)
* Fixed transport-options.ssl for local cert authorization being stored in lock file making them less portable (#12019)
* Fixed memory issues when installing large binaries (#12032)
* Fixed `archive` command crashing when a path cannot be realpath'd on windows (#11544)
* API: Deprecated BasePackage::$stabilities in favor of BasePackage::STABILITIES (685add70ec)
* Improved Docker detection (#12062)

### [2.7.7] 2024-06-10

* Security: Fixed command injection via malicious git branch name (GHSA-47f6-5gq3-vx9c / CVE-2024-35241)
* Security: Fixed multiple command injections via malicious git/hg branch names (GHSA-v9qv-c7wm-wgmf / CVE-2024-35242)
* Security: Fixed secure-http checks that could be bypassed by using malformed URL formats (fa3b9582c)
* Security: Fixed Filesystem::isLocalPath including windows-specific checks on linux (3c37a67c)
* Security: Fixed perforce argument escaping (3773f775)
* Security: Fixed handling of zip bombs when extracting archives (de5f7e32)
* Security: Fixed Windows command parameter escaping to prevent abuse of unicode characters with best fit encoding conversion (3130a7455, 04a63b324)
* Fixed PSR violations for classes not matching the namespace of a rule being hidden, this may lead to new violations being shown (#11957)
* Fixed UX when a plugin is still in vendor dir but is not required nor allowed anymore after changing branches (#12000)
* Fixed new platform requirements from composer.json not being checked if the lock file is outdated (#12001)
* Fixed ability for `config` command to remove autoload keys (#11967)
* Fixed empty `type` support in `init` command (#11999)
* Fixed git clone errors when `safe.bareRepository` is set to `strict` in the git config (#11969)
* Fixed regression showing network errors on PHP <8.1 (#11974)
* Fixed some color bleed from a few warnings (#11972)

### [2.7.6] 2024-05-04

* Fixed regression when script handlers add an autoloader which uses a private callback (#11960)

### [2.7.5] 2024-05-03

* Added `uninstall` alias to `remove` command (#11951)
* Added workaround for broken curl versions 8.7.0/8.7.1 causing transport exceptions (#11913)
* Fixed root usage warnings showing up within Podman containers (#11946)
* Fixed config command not handling objects correctly in some conditions (#11945)
* Fixed binary proxies not containing the correct path if the project dir is a symlink (#11947)
* Fixed Composer autoloader being overruled by project autoloaders when they are loaded by event handlers (scripts/plugins) (#11955)
* Fixed TransportException (http failures) not having a distinct exit code, should now exit with `100` as code (#11954)

### [2.7.4] 2024-04-22

* Fixed regression (`Call to undefined method ProxyManager::needsTransitionWarning()`) with projects requiring composer/composer in an pre-2.7.3 version (#11943, #11940)

### [2.7.3] 2024-04-19

* BC Warning: Fixed `https_proxy` env var falling back to `http_proxy`'s value, this is still in place but with a warning for now, and https_proxy can now be set empty to remove the fallback. Composer 2.8.0 will remove the fallback so make sure you heed the warnings (#11915)
* Fixed `show` and `outdated` commands to remove leading `v` in e.g. `v1.2.3` when showing lists of packages (#11925)
* Fixed `audit` command not showing any id when no CVE is present, the advisory ID is now shown (#11892)
* Fixed the warning about a missing default version showing for packages with `project` type as those are typically not versioned and do not have cyclic dependencies (#11885)
* Fixed PHP 8.4 deprecation warnings
* Fixed `clear-cache` command to respect the config.cache-dir setting from the local composer.json (#11921)
* Fixed `status` command not handling failed download/install promises correctly (#11889)
* Added support for `buy_me_a_coffee` in GitHub funding files (#11902)
* Added `hg` support for SSH urls (#11878)
* Fixed some env vars with an integer value causing a crash (#11908)
* Fixed context data not being output when using IOInterface as a PSR-3 logger (#11882)

### [2.7.2] 2024-03-11

* Added info about the PHP version when running `composer --version` (#11866)
* Added warning when the root version cannot be detected (#11858)
* Fixed plugins still being enabled in a few contexts when running as root (c3efff91f)
* Fixed `outdated --ignore ...` still attempting to load the latest version of the ignored packages (#11863)
* Fixed handling of broken symlinks in the middle of an install path (#11864)
* Fixed `update --lock` still incorrectly updating some metadata (#11850, #11787)

### [2.7.1] 2024-02-09

* Added several warnings when plugins are disabled to hint at common problems people had with 2.7.0 (#11842)
Expand Down Expand Up @@ -640,7 +771,7 @@
* UX Change: Packages from `path` repositories which are symlinked in the vendor dir will always be updated in partial updates to avoid mistakes when the original composer.json changes but the symlinked package is not explicitly updated (#9765)
* Added `reinstall` command that takes one or more package names, including wildcard (`*`) support, and removes then reinstalls them in the exact same version they had (#9915)
* Added support for parallel package installs on Windows via [7-Zip](https://www.7-zip.org/) if it is installed (#9875)
* Added detection of invalid composer.lock files that do not fullfil the composer.json requirements to `validate` command (#9899)
* Added detection of invalid composer.lock files that do not fulfill the composer.json requirements to `validate` command (#9899)
* Added `InstalledVersions::getInstalledPackagesByType(string $type)` to retrieve installed plugins for example, [read more](https://getcomposer.org/doc/07-runtime.md#knowing-which-packages-of-a-given-type-are-installed) (#9699)
* Added `InstalledVersions::getInstalledPath(string $packageName)` to retrieve the install path of a given package, [read more](https://getcomposer.org/doc/07-runtime.md#knowing-the-path-in-which-a-package-is-installed) (#9699)
* Added flag to `InstalledVersions::isInstalled()` to allow excluding dev requirements from that check (#9682)
Expand Down Expand Up @@ -1069,7 +1200,7 @@
* Added a `--no-cache` flag available on all commands to run with the cache disabled
* Added PHP_BINARY as env var pointing to the PHP process when executing Composer scripts as shell scripts
* Added a `use-github-api` config option which can set the `no-api` flag on all GitHub VCS repositories declared
* Added a static helper you can preprend to a script to avoid process timeouts, `"Composer\\Config::disableProcessTimeout"`
* Added a static helper you can prepend to a script to avoid process timeouts, `"Composer\\Config::disableProcessTimeout"`
* Added Event::getOriginatingEvent to retrieve an event's original event when a script handler forwards to another one
* Added support for autoloading directly from a phar file
* Fixed loading order of plugins to always initialize them in order of dependencies
Expand Down Expand Up @@ -1673,7 +1804,7 @@
* Break: Removed support for lock files created before 2012-09-15 due to their outdated unusable format
* Added `prefer-stable` flag to pick stable packages over unstable ones when possible
* Added `preferred-install` config option to always enable --prefer-source or --prefer-dist
* Added `diagnose` command to to system/network checks and find common problems
* Added `diagnose` command to system/network checks and find common problems
* Added wildcard support in the update whitelist, e.g. to update all packages of a vendor do `composer update vendor/*`
* Added `archive` command to archive the current directory or a given package
* Added `run-script` command to manually trigger scripts
Expand Down Expand Up @@ -1829,6 +1960,18 @@

* Initial release

[2.8.3]: https://github.com/composer/composer/compare/2.8.2...2.8.3
[2.8.2]: https://github.com/composer/composer/compare/2.8.1...2.8.2
[2.8.1]: https://github.com/composer/composer/compare/2.8.0...2.8.1
[2.8.0]: https://github.com/composer/composer/compare/2.7.9...2.8.0
[2.7.9]: https://github.com/composer/composer/compare/2.7.8...2.7.9
[2.7.8]: https://github.com/composer/composer/compare/2.7.7...2.7.8
[2.7.7]: https://github.com/composer/composer/compare/2.7.6...2.7.7
[2.7.6]: https://github.com/composer/composer/compare/2.7.5...2.7.6
[2.7.5]: https://github.com/composer/composer/compare/2.7.4...2.7.5
[2.7.4]: https://github.com/composer/composer/compare/2.7.3...2.7.4
[2.7.3]: https://github.com/composer/composer/compare/2.7.2...2.7.3
[2.7.2]: https://github.com/composer/composer/compare/2.7.1...2.7.2
[2.7.1]: https://github.com/composer/composer/compare/2.7.0...2.7.1
[2.7.0]: https://github.com/composer/composer/compare/2.6.6...2.7.0
[2.6.6]: https://github.com/composer/composer/compare/2.6.5...2.6.6
Expand Down
2 changes: 1 addition & 1 deletion UPGRADE-2.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ If your repository only has a small number of packages, and you want to avoid th

`"providers-api": "https://packagist.org/providers/%package%.json",`

The providers-api is optional, but if you implement it it should return packages which provide a given package name, but not the package which has that name. For example https://packagist.org/providers/monolog/monolog.json lists some package which have a "provide" rule for monolog/monolog, but it does not list monolog/monolog itself.
The providers-api is optional, but if you implement it, it should return packages which provide a given package name, but not the package which has that name. For example https://packagist.org/providers/monolog/monolog.json lists some package which have a "provide" rule for monolog/monolog, but it does not list monolog/monolog itself.

### list

Expand Down
42 changes: 24 additions & 18 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,34 +23,34 @@
],
"require": {
"php": "^7.2.5 || ^8.0",
"composer/ca-bundle": "^1.0",
"composer/class-map-generator": "^1.0",
"composer/ca-bundle": "^1.5",
"composer/class-map-generator": "^1.4.0",
"composer/metadata-minifier": "^1.0",
"composer/semver": "^3.2.5",
"composer/semver": "^3.3",
"composer/spdx-licenses": "^1.5.7",
"composer/xdebug-handler": "^2.0.2 || ^3.0.3",
"justinrainbow/json-schema": "^5.2.11",
"justinrainbow/json-schema": "^5.3",
"psr/log": "^1.0 || ^2.0 || ^3.0",
"seld/jsonlint": "^1.4",
"seld/phar-utils": "^1.2",
"symfony/console": "^5.4.11 || ^6.0.11 || ^7",
"symfony/filesystem": "^5.4 || ^6.0 || ^7",
"symfony/finder": "^5.4 || ^6.0 || ^7",
"symfony/process": "^5.4 || ^6.0 || ^7",
"react/promise": "^2.8 || ^3",
"composer/pcre": "^2.1 || ^3.1",
"symfony/console": "^5.4.35 || ^6.3.12 || ^7.0.3",
"symfony/filesystem": "^5.4.35 || ^6.3.12 || ^7.0.3",
"symfony/finder": "^5.4.35 || ^6.3.12 || ^7.0.3",
"symfony/process": "^5.4.35 || ^6.3.12 || ^7.0.3",
"react/promise": "^2.11 || ^3.2",
"composer/pcre": "^2.2 || ^3.2",
"symfony/polyfill-php73": "^1.24",
"symfony/polyfill-php80": "^1.24",
"symfony/polyfill-php81": "^1.24",
"seld/signal-handler": "^2.0"
},
"require-dev": {
"symfony/phpunit-bridge": "^6.4.1 || ^7.0.1",
"phpstan/phpstan": "^1.9.3",
"phpstan/phpstan-phpunit": "^1.0",
"phpstan/phpstan-deprecation-rules": "^1",
"phpstan/phpstan-strict-rules": "^1",
"phpstan/phpstan-symfony": "^1.2.10"
"symfony/phpunit-bridge": "^6.4.3 || ^7.0.1",
"phpstan/phpstan": "^1.11.8",
"phpstan/phpstan-phpunit": "^1.4.0",
"phpstan/phpstan-deprecation-rules": "^1.2.0",
"phpstan/phpstan-strict-rules": "^1.6.0",
"phpstan/phpstan-symfony": "^1.4.0"
},
"suggest": {
"ext-openssl": "Enabling the openssl extension allows you to access https URLs for repositories and packages",
Expand All @@ -65,7 +65,7 @@
},
"extra": {
"branch-alias": {
"dev-main": "2.7-dev"
"dev-main": "2.8-dev"
},
"phpstan": {
"includes": [
Expand All @@ -81,7 +81,13 @@
"autoload-dev": {
"psr-4": {
"Composer\\Test\\": "tests/Composer/Test/"
}
},
"exclude-from-classmap": [
"tests/Composer/Test/Fixtures/",
"tests/Composer/Test/Autoload/Fixtures",
"tests/Composer/Test/Autoload/MinimumVersionSupport",
"tests/Composer/Test/Plugin/Fixtures"
]
},
"bin": [
"bin/composer"
Expand Down
Loading

0 comments on commit 1181f6a

Please sign in to comment.