1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-09 00:22:53 +00:00
Commit graph

322 commits

Author SHA1 Message Date
John Stevenson
3cc490d4c4
Refactor proxy handling to require https_proxy (#11915)
Composer has always allowed a single http_proxy (or CGI_HTTP_PROXY)
environment variable to be used for both HTTP and HTTPS requests. But
many other tools and libraries require scheme-specific values.

The landscape is already complicated by the use of and need for upper
and lower case values, so to bring matters inline with current practice
https_proxy is now required for HTTPS requests.

The new proxy handler incorporates a transition mechanism, which allows
http_proxy to be used for all requests when https_proxy is not set and
provides a `needsTransitionWarning` method for the main application.

Moving to scheme-specific environment variables means that a user may
set a single proxy for either HTTP or HTTPS requests. To accomodate this
situation during the transition period, an https_proxy value can be set
to an empty string which will prevent http_proxy being used for HTTPS
requests.
2024-04-17 14:34:26 +02:00
Jordi Boggiano
133447cf51
Output tweak 2024-03-04 14:01:23 +01:00
Michael Newton
c0b8086af5
Include PHP information when showing Composer version verbosely (#11866)
Co-authored-by: Jordi Boggiano <j.boggiano@seld.be>
2024-03-01 10:14:41 +01:00
Jordi Boggiano
be876b47a9
Also output root plugin warning after script execution errors 2024-02-09 14:26:07 +01:00
Jordi Boggiano
690fe716c5
Output more warnings about plugins being disabled to hint that it may cause problems, fixes #11839 (#11842) 2024-02-09 11:56:25 +01:00
Kuba Werłos
7745d56c14
Do not show error that plugins have been disabled when they are already disabled (#11803) 2024-02-07 09:32:55 +01:00
Jordi Boggiano
d3aeb1357f
Merge branch '2.6' 2024-01-26 17:45:05 +01:00
Jordi Boggiano
7048ff3808
Fix automatic disabling of plugins when running non-interactive as root 2024-01-26 17:44:35 +01:00
Travis Carden
aefa46dfba
Add support for "scripts-aliases" in composer.json (#11666) 2023-10-27 11:36:59 +02:00
Jordi Boggiano
f4738d97b7
Add support for Application::setCatchErrors in symfony 6.4+, refs symfony/symfony#50420 2023-07-28 19:33:33 +02:00
Jordi Boggiano
2b58f2c625
Fix getmypid being required as it is not always available, fixes #11401 2023-05-07 14:48:34 +02:00
Wim Leers
5d2d513f97
Follow-up for #5205: fix high concurrency race condition
Composer would fail with an
```
PHP temp directory (/tmp) does not exist or is not writable to Composer. Set sys_temp_dir in your php.ini
```
error when used in parallel. Because it is checking if a file with `md5(microtime())` can be created, which is not sufficiently unique when used in parallel.

Since each Composer instance runs in its own process, this can easily be mitigated by not just partitioning based on time of use, but also based on process ID.

Original investigation: 3338789 (comment-14961390)
2023-03-17 13:55:30 +01:00
Jordi Boggiano
0d96fd8149
Warn when require ends up auto-selecting a feature branch, fixes #11264 (#11270) 2023-01-19 21:42:09 +01:00
Jordi Boggiano
685ec29573
Increase disk size warning to 100MB minimum, closes #11190 2022-12-17 23:50:47 +01:00
Jordi Boggiano
6c85b875f2
Update to PHPStan 1.9 2022-11-03 21:53:42 +01:00
Jordi Boggiano
8ffd8bef08
Merge branch '2.4' 2022-10-25 15:27:14 +02:00
Jordi Boggiano
803e4e5dbd
Catch runtime exception while initializing Composer to make sure a missing composer.json does not fail >tryComposer, refs #11133 2022-10-25 15:04:08 +02:00
Jordi Boggiano
96e88cf84d
Merge branch '2.4' 2022-10-13 16:54:55 +02:00
Jordi Boggiano
bc93f734bc
Add an error msg to clearly explain that plugins are disabled when running as root non-interactively, fixes #11093 2022-10-13 16:40:44 +02:00
Ralf Lang
8e4dffc055
Allow other CLIs (like satis in standalone mode) to re-brand composer. (#11118)
This affects the banner at the head of the help screen and the version info.
Symfony's base object offers the same signature but composer does not allow
to override it in constructor.
Yet there are public setter methods to change both after initializing the object.
This is the workaround satis cli currently uses.
2022-10-13 14:10:27 +02:00
Jordi Boggiano
b2ebe841e4
Fixes plugin commands not being loaded during completion
Closes #11074

Co-authored-by: Susanne Moog <look@susi.dev>
2022-10-12 11:03:52 +02:00
Jordi Boggiano
a75fbf0e6a
Fix handling of plugin activation when running as root
When running without `COMPOSER_ALLOW_SUPERUSER` set so it always happens after prompting, or does not happen if input is non-interactive.

Also fixed support for bash completions hanging when running as root

Fixes #11024
2022-09-14 15:42:10 +02:00
Jordi Boggiano
131da999ac
Fix CS (#11003) 2022-08-17 14:20:07 +02:00
Jordi Boggiano
f0ab518c46
Ensure signalHandler is kept around and unregistered 2022-07-22 10:37:48 +02:00
Jordi Boggiano
07645b9895
Capture signals and wait until child process exits to also exit, fixes #6059 2022-07-20 22:32:09 +02:00
Jordi Boggiano
1a4f2174e4
Add seld/signal-handler dependency 2022-07-20 22:32:09 +02:00
Jordi Boggiano
37d3e2f44a
Merge branch '2.3' 2022-07-13 15:49:55 +02:00
Jordi Boggiano
e1e29bf698
Merge branch '2.2' into 2.3 2022-07-13 15:35:01 +02:00
Jordi Boggiano
a481dfce3f
Fix disk_free_space being called even when not available, fixes #10936 2022-07-13 10:35:32 +02:00
Jordi Boggiano
1812862d5e
Update phpstan to latest, update baseline (1909, 103) 2022-06-30 17:07:18 +02:00
Guy Sartorelli
d93239ddd9
Add audit command to check for security issues (#10798)
Closes #10329
2022-06-22 15:15:01 +02:00
Mathias Reker ⚡️
4131f7cf4c
Static lambda (#10854)
Lambdas not (indirect) referencing $this must be declared static.
2022-06-22 14:19:18 +02:00
Jordi Boggiano
70f2dd6edd
Add bump command to bump requirements to the currently installed version, fixes #7273 (#10829) 2022-06-09 11:43:59 +02:00
Jordi Boggiano
ef06702e45
Merge pull request #10320 from GromNaN/command-completion
Add completion to commands options and arguments
2022-06-01 21:59:39 +02:00
Jordi Boggiano
5b067a1b29
Update phpstan to latest 2022-05-25 22:02:22 +02:00
Jordi Boggiano
0089a69c57
Avoid outputting network errors or others while loading suggestions 2022-05-12 22:52:26 +02:00
Jordi Boggiano
106149d102
Fix a bunch of type errors in SelfUpdateCommand, fixes #10696, closes #10704 2022-04-06 21:35:26 +02:00
David Zülke
03b7882ac2
restore --version output to pre-2.3 (#10684)
Symfony Console 2.8 used to print 'version ' in between name and version, and Composer 2.3 still does for -dev snapshots, so we're going back to the old formatting for consistency (and anyone out there who parses the version output of Composer)

Fixes #10683
2022-04-01 09:46:12 +02:00
Jordi Boggiano
af3e67e745
Always show a stack trace for \Error & LogicException throwables even if output is not verbose 2022-03-30 10:34:38 +02:00
Jordi Boggiano
6a466a120a
Enable strict types on all files 2022-02-24 13:24:34 +01:00
Jordi Boggiano
3cdca37e85
Fix strict type issues 2022-02-24 13:24:25 +01:00
Jordi Boggiano
7abc8da7d3
Add more types 2022-02-23 11:37:32 +01:00
Jordi Boggiano
6da38f83a0
Add parameter types to all the things 2022-02-22 16:48:53 +01:00
Alexander Schranz
1321bfca36
Add return types to closures (#9) 2022-02-21 13:37:49 +01:00
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 2022-02-18 14:45:08 +01:00
Jordi Boggiano
a16ed3d0ed
Add return types to private/internal methods 2022-02-18 11:22:01 +01:00
Jordi Boggiano
f1568f1f8f
Merge branch '2.2' into main 2022-01-07 09:30:43 +01:00
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
2022-01-07 09:26:37 +01:00
Jordi Boggiano
711f436b24
Use finally to restore error handler after command runs 2022-01-04 16:31:45 +01:00
Niels Vanpachtenbeke
1c928466a9
Remove code blocks for php <7.2 compatibility (#10417) 2022-01-03 17:35:32 +01:00