112 Commits (32852304d0c8823fe535dfc5b19e68952d4a6f41)

Author SHA1 Message Date
Jordi Boggiano 86fb8d4412
Fix CS 2 years ago
Jordi Boggiano 3446091027
Merge branch '2.2' into main 2 years ago
Jordi Boggiano 4ce11ab4ab
Support escaping on newer symfony/console versions, fixes #10499 2 years ago
Jordi Boggiano 7e50f37b87
Remove some dead code and deprecate JsonFormatter, JsonFile::JSON_* constants, and TlsHelper 3 years ago
Jordi Boggiano 96486d81cb
Fix many PHPStan issues and update baseline 3 years ago
Jordi Boggiano 6ed3aeb343
Remove setExpectedException wrapper 3 years ago
Jordi Boggiano ffd62795bc
Get rid of all the ->at() mock invocations 3 years ago
Jordi Boggiano 2a771dfb2d
Update PHPUnit to 8.5 3 years ago
Jordi Boggiano 90087b4fb3
Fix handling of php bin proxies combined with declare() on php <8, fixes #10246 (#10249) 3 years ago
megubyte c2a2198089
phpstan: update tests/Composer/Test/Installer/* to level 6 standard (#10225) 3 years ago
Jordi Boggiano c3c6969cf5
Type annotations 3 years ago
Jordi Boggiano d3c176ec69
PHPStan Level 5 (#10070)
* Bump PHPStan to level 5

* Update seld/phar-utils to latest

* Add phpstan-setup / phpstan scripts
3 years ago
jrfnl 7004e0d031 PHP 8.1/LibraryInstallerTest: add missing mock expectation
The `LibraryInstallerTest::testUninstall()` method mocks a `Package` object, but did not set an expectation for a call to `getName()`, while that method _is_ called in the `LibraryInstaller::uninstall()` method.

Without expectation, the mock returns `null`, which was subsequently being passed on to `strpos()` leading to the below error.

Fixes:
```
Deprecation triggered by Composer\Test\Installer\LibraryInstallerTest::testUninstall:
strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated

Stack trace:
0 [internal function]: Symfony\Bridge\PhpUnit\DeprecationErrorHandler->handleError(8192, '...', '...', 202)
1 src/Composer/Installer/LibraryInstaller.php(202): strpos(NULL, '...')
2 vendor/react/promise/src/FulfilledPromise.php(28): Composer\Installer\LibraryInstaller->Composer\Installer\{closure}(NULL)
3 src/Composer/Installer/LibraryInstaller.php(208): React\Promise\FulfilledPromise->then(Object(Closure))
4 tests/Composer/Test/Installer/LibraryInstallerTest.php(221): Composer\Installer\LibraryInstaller->uninstall(Object(Mock_InstalledRepositoryInterface_e3699f95), Object(Mock_Package_e4571076))
...
```
3 years ago
Jordi Boggiano 09ef026d43
Remove OperationInterface::getReason, closes #9230, closes #9263 4 years ago
Jordi Boggiano d942c65e0c
Fix more warnings 4 years ago
Jordi Boggiano 8a1e9744a0
Fix tests 4 years ago
Jordi Boggiano 44d1e15294
Simplify suggester output when updating, refactor suggest command to reuse SuggestedPackagesReporter and make smarter defaults, fixes #6267 4 years ago
Jordi Boggiano d52ce3c37f
Replace pre/post-dependencies-solving by a pre-operations-exec event happening only on install from lock 4 years ago
Jordi Boggiano 71855e6430
Restore PRE/POST_DEPENDENCY_SOLVING events 4 years ago
Jordi Boggiano 45ecbae8f5
Merge branch 'master' into 2.0 4 years ago
Ion Bazan db32d6bc18 do not use env 4 years ago
Ion Bazan a2137d5263 use Symfony PHPUnit Bridge 4 years ago
Jordi Boggiano 88eb61c1d8
Fix 5.3 syntax 5 years ago
Jordi Boggiano 006985a0ea
Execute all operations at once which lets us download all packages in parallel then install only once all downloads succeeded, fixes #2847
This also changes the PRE/POST_PACKAGE_INSTALL/UPDATE/UNINSTALL events to have less information available on them, repositorySet, request and policy are gone
5 years ago
Jordi Boggiano 4517c00d40 Merge branch 'master' into 2.0 6 years ago
Jordi Boggiano 98a15bc93c Add output for metapackage installs/updates/.. fixes #7586 6 years ago
Jordi Boggiano 3dfcae99a9 Add parallel download capability to FileDownloader and derivatives 6 years ago
Jordi Boggiano 2e0f31106a Merge remote-tracking branch 'origin/master' into 2.0 6 years ago
Gabriel Caruso 2a13bb2649 Fixes from PHPStan (#7687)
* fix docblocks

* remove redundant conditional

* fix wrong variable name

* fix wrong namespaces

* add missing private members

* remove unused/redundant arguments

* move testcase class

* exclude TestCase.php

* Tweak RuleWatchGraph type hints

* Tweak doc comment
6 years ago
Nils Adermann 6ef65e5319 Add a new RepositorySet class and restrict pool usage to the solver
Breaking change for the plugin interface so bumping the version of
composer-plugin-api to 2.0.0

First step for a refactoring of the package metadata loading mechanism
6 years ago
Jordi Boggiano ff59bbdab0 CS fixer 6 years ago
Jordi Boggiano 16af52be8a Merge remote-tracking branch 'origin/1.6' 6 years ago
Théo FIDRY 87646ae689
Hide suggest reason when there is not one 6 years ago
Jordi Boggiano bfa01285c2 Merge branch '1.6' 6 years ago
Jordi Boggiano 066351c5b9 Remove use of deprecated getMock method 6 years ago
Gabriel Caruso 3d262bd637 Fixes from PHPStan level 0
More fixes from PHPStan level 0
7 years ago
Gabriel Caruso afc9a7643e Use PHPUnit\Framework\TestCase instead of PHPUnit_Framework_TestCase 7 years ago
Gabriel Caruso a4b220273e Refactoring Tests (#6849) 7 years ago
Alexander M. Turek 20050dd984 Remove console formatting as well. 7 years ago
Alexander M. Turek 401ef69ae3 Remove ANSI control characters from suggested packages output. 7 years ago
Jordi Boggiano 122e422682 CS fixes 7 years ago
Jordi Boggiano 59596ff012 Make sure we do not overwrite binaries but only re-create missing ones, refs #5127 8 years ago
Jeremy Benoist e9fc0e6548 Re-install binaries on update/install
Binaries are re-installed after an update/install (ie: removed and then installed)
8 years ago
Helmut Hummel b1ec99faed Extract binary installation and removal to own class
The functionality to install binaries might be useful
for other installers.
Create API for that by extracting this functionality from
the LibraryInstaller class.
8 years ago
Haralan Dobrev cc389d6c1a List project suggestions in create-project command
Resolves https://github.com/composer/composer/issues/2752
8 years ago
Rob Bast a8995b2572 use dirsep so phpunit on windows doesnt fail 9 years ago
Rob Bast adf3b956d0 try to use unique test directories
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
9 years ago
Jordi Boggiano 3efed220a6 Clean up event dispatching code and make package events extend installer events 9 years ago
François Pluchino 1067ce4f96 Add installer events 10 years ago
Jordi Boggiano 8398c9f2ab Fix target-dir update checks, fixes #2395 11 years ago