283 Commits (6a466a120a404d1c5d492e5ca715841c491517fc)

Author SHA1 Message Date
Jordi Boggiano 6a466a120a
Enable strict types on all files 2 years ago
Jordi Boggiano 3cdca37e85
Fix strict type issues 2 years ago
Jordi Boggiano 7abc8da7d3
Add more types 2 years ago
Jordi Boggiano 6da38f83a0
Add parameter types to all the things 2 years ago
Alexander Schranz 1321bfca36
Add return types to closures (#9) 2 years ago
Jordi Boggiano 84f0f19112
Split Composer into PartialComposer & Composer classes to avoid nullable properties on Composer for non-fully-loaded instances, add types to Composer\Factory 2 years ago
Jordi Boggiano a16ed3d0ed
Add return types to private/internal methods 2 years ago
Jordi Boggiano f1568f1f8f
Merge branch '2.2' into main 2 years ago
Jordi Boggiano 508ac051ec
Revert "Remove getCode usage as it is not type safe apparently, see https://github.com/phpstan/phpstan-src/pull/795"
This reverts commit 84f8fda0c6.

And other issues fixed by PHPStan 1.3.2
2 years ago
Jordi Boggiano 711f436b24
Use finally to restore error handler after command runs 2 years ago
Niels Vanpachtenbeke 1c928466a9
Remove code blocks for php <7.2 compatibility (#10417) 2 years ago
Jordi Boggiano 5805a68645
Fix some todos dropping support for older Symfony releases 2 years ago
Jordi Boggiano bf72afec44
Fix Symfony6 compat 2 years ago
Shyim 70425900e9
Fix symfony error handler warnings, fixes #10397 (#10404) 2 years ago
Jordi Boggiano 8f1b3d21db
Add --no-scripts to all commands and disable plugins/scripts when running self-update (#10371)
* Add --no-scripts as global parameter available to all commands, and handle it by default when creating a Composer instance from Command::getComposer

* Disable scripts/plugins for self-update command, fixes #10351
2 years ago
Tizian Schmidlin 4f789a5f6d
Add "use-parent-dir" config to configure prompt when no composer.json is present in current dir (#10307)
Fixes #10299

Co-authored-by: Jordi Boggiano <j.boggiano@seld.be>
2 years ago
Jordi Boggiano bd4d624cc7
Read first from $_SERVER and $_ENV before using getenv (#10218) 3 years ago
Jordi Boggiano c65d09dff7
Fix @inheritDoc annotations 3 years ago
Jordi Boggiano 37ce8969a4
Use real type hint instead of annotation 3 years ago
Paolo Rossi 6e04991489
Reaching phpstan level 6 in Composer/Console (refs #10159) (#10183) 3 years ago
Jordi Boggiano e137046558
Type annotations 3 years ago
JDev4U 11810e3c2d
Fix help command not working with plugin commands, fixes #10147 (#10150)
- Add 'help' in the list of commands that need plugin command ($mayNeedPluginCommand)
- Remove `'global' !== $commandName` because $mayNeedPluginCommand encure that $commandName is one of `false`, `empty`, `list` or `help` (so never 'global')

Co-authored-by: Duret Joel <joel.duret@neo-soft.fr>
3 years ago
Jordi Boggiano 0761474599
Add type info to many properties/methods 3 years ago
Jordi Boggiano 0158436fb4
Fix list command not showing plugin commands, fixes #10075 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
Jordi Boggiano 9727adf63b
Fix init performance when plugin commands are not needed, fixes #10064 3 years ago
Jordi Boggiano 2665f1b282
Fix private property access, fixes #10022 3 years ago
Jordi Boggiano 2fb53232d1
Fix usage on symfony 2.x, fixes #10022 3 years ago
GeoSot e07d2a7bef
Respect parent setting, handling exceptions (#10017) 3 years ago
Jordi Boggiano 29a52ff463
Register ErrorHandler early to catch deprecation notices while the Application is being initialized 3 years ago
Jordi Boggiano e87a150f41
Make sure schema issues are always reported correctly, but not in init when Composer is not required, fixes #9986 3 years ago
Jordi Boggiano 91dd175f74
Fix env var handling when variables_order includes E and symfony/console 3.3.15+ is used, fixes #9930 3 years ago
Jordi Boggiano 500efbe233
Add a reinstall command, fixes #3112 3 years ago
Jordi Boggiano 3380178798
Introduce a cross-platform safe version of is_readable to support UNC / wsl$ paths on Windows (#9861) 3 years ago
John Stevenson c3b76a8532
Upgrade to xdebug-handler 2 (#9832)
This adds support for Xdebug3 modes and changes the default behaviour
from always restarting if Xdebug is loaded, to only restarting if Xdebug
is active.

Xdebug is considered active if it is loaded, and for Xdebug3, if it is
running in a mode other than `xdebug.mode=off`.
3 years ago
Markus Staab 7c602d8807
Added link to composer.org docs on ProcessTimedOutException (#9796) 3 years ago
Jordi Boggiano 4940009f83
Bump phpstan to level 3 (#9734)
Clean up PackageInterface/CompletePackageInterface, add missing methods, type things in solver as BasePackage, added CompleteAliasPackage, ..
3 years ago
Jordi Boggiano 4e0b8c1086
Update src/Composer/Console/Application.php 3 years ago
Ben Beckford 8eaae9f50a Suppress error when chdir($oldWorkingDir); unsuccessful
resolves #9649
3 years ago
Jordi Boggiano 4a740e3e61
Add warnings when running updates without curl enabled, fixes #9558 3 years ago
Jordi Boggiano b7d770659b
CS fixes 4 years ago
Jordi Boggiano 595c4c6f75
Make sure we handle cases where STDIN/STDOUT may not be defined 4 years ago
Jordi Boggiano cc536c7f45
Fix/normalize tty handling 4 years ago
Tom Klingenberg 258f6dc1a2 Reference co-relating code sequence for tty test, refs #9454 4 years ago
Jordi Boggiano 380dce9a6b
Make sure the IO is not interactive when not run in a tty, refs #9454 4 years ago
Jordi Boggiano 34bdc6cbf2
Detect and hint for solutions for common curl errors, fixes #9376 4 years ago
Simon Berger 002fd39bc6 Removed passing of parameters with default value 4 years ago
Simon Berger cda6e8bea6 Removed unnecessary property initialization or declaration 4 years ago
Simon Berger bae227ec2d Changed all substr calls used to compare fragments of text to strpos
Some additional code cleanups in those classes

Reverted change causing issues
4 years ago
Markus Staab fdff3aeaba
emit github action formatted error messages (#9120) 4 years ago