any tests that use the filesystem should have their own unique directory, as we run our test suite in parallel and
cleanup of tests (removing directories) should not interfere with currently running tests
Extend RootPackageInterface with setter functions used by
composer-merge-plugin and implement them for RootAliasPackage. This will
allow composer-merge-plugin and similar code that manipulates the root
package at runtime to ignore the difference between a RootPackage and
a RootAliasPackage.
Working towards #3545.
formatVersion() does not belong in VersionParser since it depends upon a
Package object, and is creating a more complete pretty formatted
version, not parsing anything.
The new getFullPrettyVersion() method can be seen as an extension to
getPrettyVersion(), and is located in BasePackage as a result.
Callers to VersionParser::formatVersion() were not updated in this
commit to demonstrate that no functionality was changed in this
refactor. They will be updated in a follow up commit.
This is a change to the >=2.3.0 comparison. Without this change, such a
comparison will exclude pre-release versions.
The rationale is that this makes the comparison more consistent with
<2.3.0 (which excludes all pre-releases) and ~2.3.0 (which includes
pre-releases).
Instead of developing plugins against a single, fixed Plugin API version - `"composer-plugin-api": "1.0.0"`, this change will allow plugin developers to use versions like `"composer-plugin-api": "~1.1"` or `"composer-plugin-api": ">=2.1 <3.0"`, aka actual Composer-compatible constraints.
Only the "1.0", "1.0.0" and "1.0.0" Plugin API versions will be regarded as BC versions, and internally converted to "^1.0"; every other declared version string will be kept as it is.
Because of this new constraint flexibility, plugin version mismatches will be skipped, which means those plugin will NOT be registered to the system. Previously, a mismatch triggered a warning, but plugins were still registered.