* AutoloadGenerator: add `Locker` parameter to the `dump` method
* AutoloadGenerator: do not create a random hash, re-use the one from the lock file if it exists
* FileSystem: make sure `safeCopy` copy also the file time metadata
* test(ArchiveCommand): Add test for ArchiveCommand with package name
* fix : using explicit variable name for eventDispatcher Mock
---------
Co-authored-by: Damien Carrier <damien.carrier@alximy.io>
Prior to PHP 8.3, ReflectionMethod could set a private method on a parent class to accessible. This is no longer possible in PHP 8.3 since php/php-src 9470 and breaks the Composer\Test\Repository\ComposerRepositoryTest::testWhatProvides test.
Also see: https://3v4l.org/8YcIk/rfc#vgit.master
Fixed now.
Co-authored-by: jrfnl <jrfnl@users.noreply.github.com>
Co-authored-by: Christophe Coevoet <stof@notk.org>
* PHP 8.3 | ZipDownloaderTest: fix deprecation notice
Calling `ReflectionProperty::setValue()` with only one argument (to set a static property) is deprecated.
Passing `null` as the first (`$object`) parameter will work cross-version.
As the `ZipDownloaderTest::setPrivateProperty()` method has a `null` default value for the `$obj` parameter anyway, this means the if/else toggle can be removed.
Ref: https://wiki.php.net/rfc/deprecate_functions_with_overloaded_signatures#reflectionpropertysetvalue
* PHP 8.3 | InstalledVersionsTest: fix deprecation notice
Calling `ReflectionProperty::setValue()` with only one argument (to set a static property) is deprecated.
Passing `null` as the first (`$object`) parameter will work cross-version.
Ref: https://wiki.php.net/rfc/deprecate_functions_with_overloaded_signatures#reflectionpropertysetvalue
---------
Co-authored-by: jrfnl <jrfnl@users.noreply.github.com>
* Audit: ignores configured repository options
* ComposerRepository: add test case to assert that repo http options are used to make security advisory POST request
* add a test case for "not provided a required parameter"
* add a test cases for "not provided locked file"
* cleanup for case provider
* add a test case for "package existence"
* add a test case for "warning when dependencies are not installed"
* fix the test case for "warning when dependencies are not installed"
* add a test case for "package was not found in the project"
* add a test cases for `why-not` command
- also they were fixed docblocks
* add a test cases for `why` command
* versions were added to dependency objects
* it was avoided HEREDOC due it seems to be failing in PHP 7.2
* it was avoided mismatches due different platforms EOL
* it was used full output instead of an array of messages (to avoid EOL isues)
* it increased code coverage to 97%
* All test case docblocks were corrected according to CR feedback
* ensure that `why-not` should say that an installed package requires an incompatible version of the inspected package