1
0
Fork 0
Commit Graph

117 Commits (67a12f48291c07d2c1fe1bb6a289f1e11b76bb25)

Author SHA1 Message Date
Alexander Schranz e9b60580f5
Add return types to tests (#10) 2022-02-21 13:42:28 +01:00
Jordi Boggiano eda9014bef
Add return types to all code which is not being extended by open source packages 2022-02-18 14:32:38 +01:00
Jordi Boggiano 137ebddc25
Clean up useless mocks 2022-02-18 13:05:12 +01:00
Jordi Boggiano a16ed3d0ed
Add return types to private/internal methods 2022-02-18 11:22:01 +01:00
Jordi Boggiano abdc6893a6
Add void types where no return statement is present 2022-02-18 10:38:54 +01:00
Jordi Boggiano 86fb8d4412
Fix CS 2022-02-18 08:50:11 +01:00
Jordi Boggiano 3446091027
Merge branch '2.2' into main 2022-02-04 16:31:14 +01:00
Jordi Boggiano 4ce11ab4ab
Support escaping on newer symfony/console versions, fixes #10499 2022-02-02 15:01:55 +01:00
Jordi Boggiano 7e50f37b87
Remove some dead code and deprecate JsonFormatter, JsonFile::JSON_* constants, and TlsHelper 2022-01-04 11:15:33 +01:00
Jordi Boggiano 96486d81cb
Fix many PHPStan issues and update baseline 2022-01-01 14:54:21 +01:00
Jordi Boggiano 6ed3aeb343
Remove setExpectedException wrapper 2022-01-01 14:54:21 +01:00
Jordi Boggiano ffd62795bc
Get rid of all the ->at() mock invocations 2022-01-01 14:54:20 +01:00
Jordi Boggiano 2a771dfb2d
Update PHPUnit to 8.5 2022-01-01 14:54:19 +01:00
Jordi Boggiano 90087b4fb3
Fix handling of php bin proxies combined with declare() on php <8, fixes #10246 (#10249) 2021-11-02 11:36:31 +01:00
megubyte c2a2198089
phpstan: update tests/Composer/Test/Installer/* to level 6 standard (#10225) 2021-10-27 14:41:30 +02:00
Jordi Boggiano c3c6969cf5
Type annotations 2021-10-16 10:25:12 +02:00
Jordi Boggiano d3c176ec69
PHPStan Level 5 (#10070)
* Bump PHPStan to level 5

* Update seld/phar-utils to latest

* Add phpstan-setup / phpstan scripts
2021-08-21 17:41:52 +02:00
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))
...
```
2021-08-12 03:38:56 +02:00
Jordi Boggiano 09ef026d43
Remove OperationInterface::getReason, closes #9230, closes #9263 2020-10-12 12:31:54 +02:00
Jordi Boggiano d942c65e0c
Fix more warnings 2020-09-11 11:32:09 +02:00
Jordi Boggiano 8a1e9744a0
Fix tests 2020-04-23 10:29:22 +02:00
Jordi Boggiano 44d1e15294
Simplify suggester output when updating, refactor suggest command to reuse SuggestedPackagesReporter and make smarter defaults, fixes #6267 2020-02-13 16:13:29 +01:00
Jordi Boggiano d52ce3c37f
Replace pre/post-dependencies-solving by a pre-operations-exec event happening only on install from lock 2020-02-12 14:35:31 +01:00
Jordi Boggiano 71855e6430
Restore PRE/POST_DEPENDENCY_SOLVING events 2020-02-12 10:41:03 +01:00
Jordi Boggiano 45ecbae8f5
Merge branch 'master' into 2.0 2020-02-07 22:20:51 +01:00
Ion Bazan db32d6bc18 do not use env 2020-02-07 13:07:01 +08:00
Ion Bazan a2137d5263 use Symfony PHPUnit Bridge 2020-02-07 12:22:22 +08:00
Jordi Boggiano 88eb61c1d8
Fix 5.3 syntax 2019-11-23 13:18:09 +01:00
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
2019-11-14 15:21:28 +01:00
Jordi Boggiano 4517c00d40 Merge branch 'master' into 2.0 2019-01-29 14:01:28 +01:00
Jordi Boggiano 98a15bc93c Add output for metapackage installs/updates/.. fixes #7586 2019-01-29 11:38:18 +01:00
Jordi Boggiano 3dfcae99a9 Add parallel download capability to FileDownloader and derivatives 2019-01-18 08:39:03 +01:00
Jordi Boggiano 2e0f31106a Merge remote-tracking branch 'origin/master' into 2.0 2018-11-12 16:01:07 +01:00
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
2018-11-12 15:23:32 +01:00
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
2018-09-10 15:27:54 +02:00
Jordi Boggiano ff59bbdab0 CS fixer 2018-07-24 14:32:52 +02:00
Jordi Boggiano 16af52be8a Merge remote-tracking branch 'origin/1.6' 2018-07-20 11:39:44 +02:00
Théo FIDRY 87646ae689
Hide suggest reason when there is not one 2018-06-09 15:18:21 +01:00
Jordi Boggiano bfa01285c2 Merge branch '1.6' 2018-04-12 10:25:03 +02:00
Jordi Boggiano 066351c5b9 Remove use of deprecated getMock method 2018-04-12 10:24:56 +02:00
Gabriel Caruso 3d262bd637 Fixes from PHPStan level 0
More fixes from PHPStan level 0
2018-01-14 11:44:15 -02:00
Gabriel Caruso afc9a7643e Use PHPUnit\Framework\TestCase instead of PHPUnit_Framework_TestCase 2017-11-30 13:44:43 -02:00
Gabriel Caruso a4b220273e Refactoring Tests (#6849) 2017-11-30 15:58:10 +01:00
Alexander M. Turek 20050dd984 Remove console formatting as well. 2017-04-19 17:24:47 +02:00
Alexander M. Turek 401ef69ae3 Remove ANSI control characters from suggested packages output. 2017-04-11 15:20:40 +02:00
Jordi Boggiano 122e422682 CS fixes 2017-03-08 15:16:44 +01:00
Jordi Boggiano 59596ff012 Make sure we do not overwrite binaries but only re-create missing ones, refs #5127 2016-07-02 16:35:09 +01:00
Jeremy Benoist e9fc0e6548 Re-install binaries on update/install
Binaries are re-installed after an update/install (ie: removed and then installed)
2016-03-28 23:15:13 +02:00
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.
2016-03-23 21:39:58 +01:00
Haralan Dobrev cc389d6c1a List project suggestions in create-project command
Resolves https://github.com/composer/composer/issues/2752
2016-03-05 14:22:12 +02:00