1
0
Fork 0
Commit Graph

2918 Commits (a03331bd219223ce15ddcaae480370d1163ec538)

Author SHA1 Message Date
Jordi Boggiano e5af569bfc
Fix tests 2024-09-18 16:32:40 +02:00
Carlos Granados c8838f198e
Add option to run bump after update (#11942)
* Add option to run bump after update

* Convert the option into a bool | string parameter and change a couple of texts

* Apply suggestions from code review

* Fix tests

---------

Co-authored-by: Jordi Boggiano <j.boggiano@seld.be>
2024-09-18 15:34:25 +02:00
Jordi Boggiano 17930441a1
Add a way to control which scripts get args and where (#12086)
Add support for `@no_additional_args` and `@additional_args` tags inside script handlers.
2024-09-18 14:44:55 +02:00
Joe 8f455d7c0c
Add allow-missing-requirements config setting to ignore missing requirements (#11966)
* Add allow-missing-requirements configuration to ignore error during install if there are any missing requirements

* Add test for allow-missing-requirements config

---------

Co-authored-by: Joe <joe@wpj.cz>
2024-09-18 11:00:09 +02:00
Job Vink be7d9abc66
Improve interactive package updates (#11990)
* Improve interactive package updates

* Exclude platform packages and up to date packages, follow stability flags, ignore-platform-reqs etc

* Add tests and support for lock file + empty lock/vendor

---------

Co-authored-by: Jordi Boggiano <j.boggiano@seld.be>
2024-09-18 10:43:42 +02:00
John Stevenson bb8387e5a0
Remove proxy transition fallback (#11938) 2024-09-17 16:14:47 +02:00
Jordi Boggiano fde6a87f64
Sort problem rules (#12111) 2024-09-17 14:13:58 +02:00
Jordi Boggiano f17df6d5a1
Fix handling of platform packages in why-not command and partial updates, fixes #12104 (#12110) 2024-09-17 13:31:33 +02:00
Jordi Boggiano 305b3413cf
Add test covering the fix for #12107, closes #12108 2024-09-17 09:52:56 +02:00
Jordi Boggiano 1b5b56f234
Fix handling of COMPOSER_ROOT_VERSION to normalize according to expectations, fixes #12101 (#12109) 2024-09-17 08:38:43 +02:00
Jordi Boggiano 39d9a5b6c5
Fix relative:true not being respected in path repo installs, fixes #12074 (#12092) 2024-08-22 11:45:25 +02:00
Mohamed Hubail 1684f82a43
Add `InitCommand.php` Interactive test case (#12068)
* Add single test case for interactive `init` command

* Fix spelling + use single quotes

* Fix test expectations

---------

Co-authored-by: Jordi Boggiano <j.boggiano@seld.be>
2024-08-22 10:49:55 +02:00
Jordi Boggiano f931887304
Detect incorrectly configured COMPOSER env when set to a directory, refs #12049 2024-08-22 10:49:04 +02:00
Mohamed Hubail 8c5f2dbb97
Add `GlobalCommandTest.php` (#12073)
* Add `GlobalCommandTest.php`

- `testGlobal` to check `COMPOSER_HOME` is followed correctly + check
  `COMPOSER` is unset.
- `testNotCreateHome` to test handling invalid `COMPOSER_HOME`.

* Add error string for non obvious test case

* Clean up env vars and minor code style changes

---------

Co-authored-by: Jordi Boggiano <j.boggiano@seld.be>
2024-08-22 10:38:16 +02:00
Mohamed Hubail dca85cc940
Add "require command with conflicting keys" test (#12072)
* Add test case for conflicting both with `--dev` and without

* Implement interactive case

* Restrcture so that interactive case is actually interactive

I don't know why specifying `'--no-interaction' => !$isInteractive,`
didn't give the desired behavior of the prompt being interactive.

You can verify that by printing the `$appTester->getDisplay()` which
doesn't contain a prompt.  In fact, it doesn't make any difference
whether I set it to true or false.  The only difference is if I set it
or don't set it.

* Fix dreaded trainling comma
2024-08-22 10:27:58 +02:00
Mohamed Hubail 47b924d27c
Add Update Interactive tests (#12065)
* Add Update Interactive tests

* Fix type + remove extra comma

* Used `php-cs-fixer`

* Normalize for windows + fix use of `Generator`
2024-08-21 18:14:40 +02:00
Jordi Boggiano 8f3fed674b
Clean up md5/sha1 usages, upgrade algos where possible (#12088)
* Clean up md5/sha1 usages, upgrade algos where possible

* Fully qualify PHP_VERSION_ID constant usages

* Fix 7.2 build
2024-08-21 17:06:42 +02:00
Jordi Boggiano 48d345ac3e
Update deps, fix some phpstan issues
Update baseline (1484, 84)
2024-08-21 14:47:44 +02:00
Jordi Boggiano eeff1c79ba
Fix addressability of branches containing # characters (#12042)
Fixes #12029
2024-07-25 16:46:57 +02:00
Jordi Boggiano 7504685a2e
Update phpstan and add composer/pcre extensions (#12045)
* Update phpstan and add composer/pcre extensions
* Update baseline (1516)
2024-07-25 16:28:25 +02:00
Jordi Boggiano 685add70ec
Refactor the BasePackage::$stabilities into a constant 2024-07-12 11:28:26 +02:00
Jordi Boggiano b2832867e6
Fix some edge cases of tilde constraints in bump command (#12038)
* Fix: Add test case for not dropping patch version for tilde

* Fix some edge cases of tilde constraints in bump command, fixes #11218

---------

Co-authored-by: Matthias Vogel <git@kanti.de>
2024-07-10 09:47:37 +02:00
Quỳnh Nguyễn dffa0a73a7
Fix typo for IO tests (#12027) 2024-07-02 00:30:29 +02:00
Jordi Boggiano 5aa7b03b9d
Fix test 2024-06-10 15:09:06 +02:00
Jordi Boggiano 6bd43dff85
Merge pull request from GHSA-v9qv-c7wm-wgmf 2024-06-10 14:56:13 +02:00
Jordi Boggiano fa3b9582c3
Fix secure-http check to avoid bypass using emojis 2024-06-10 14:48:02 +02:00
Jordi Boggiano 9dfcf62335
Fix new platform requirements from composer.json not being checked when composer.lock is outdated, fixes #11989 (#12001) 2024-05-31 17:53:52 +02:00
Jordi Boggiano dc857b4f91
Fixed PSR violations for classes not matching the namespace of a rule being hidden, fixes #11957 2024-05-31 17:52:05 +02:00
Jordi Boggiano c1be804a0c
Fix UX when a non-required plugin is still present in vendor dir (#12000)
Composer now skips it and does not prompt if it is not allowed to run, fixes #11944
2024-05-31 10:29:56 +02:00
Jordi Boggiano 37d722e73c
PHPStan/tests updates (#11996)
* Remove a bunch of inline ignores and migrate all PHPUnit assertions to static calls

* Update baseline (1573, 93)

* Update commit hash
2024-05-29 23:12:06 +02:00
Jordi Boggiano dd8af946fd
Fix tests 2024-05-29 22:08:42 +02:00
Jordi Boggiano 3773f77527
Fix perforce arg not being escaped correctly 2024-05-29 15:03:59 +02:00
Jordi Boggiano f83b6b1026
Enable new phpstan option 2024-05-27 17:11:31 +02:00
Ondřej Mirtes 5bb30ca170
Update PHPStan (#11976)
* Update PHPStan

* Update inline ignores to `@phpstan-ignore` with error identifier
2024-05-22 09:09:04 +02:00
Krzysztof Ciszewski 4d7476ca30
composer#11852 fix: ability to remove autoload* keys (#11967) 2024-05-08 11:19:05 +02:00
Jordi Boggiano 80631d2fc8
Fix one more case of unsetting a key in an object 2024-04-29 11:19:52 +02:00
Jordi Boggiano 232f4e7a5c
Fix config command issue handling objects in some conditions, fixes #11945 2024-04-29 10:59:35 +02:00
Jordi Boggiano b0ec0f96ad
Update phpstan deps and fix a few array_filter issues 2024-04-19 17:00:50 +02:00
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 92f641ac3d
Fix show command output to remove v prefixes on versions, making for more uniform output, fixes #11925 2024-04-15 13:23:25 +02:00
Jordi Boggiano b12a88b7f3
Fix call 2024-03-22 09:29:43 +01:00
Jordi Boggiano 54870a78c4
Add a new test to confirm that show --direct <name> works with direct dependents/dev-dependents 2024-03-21 16:59:41 +01:00
Jordi Boggiano 07fa4255d6
Add support for php extension packages (#11795)
* Update schema
* Validate php-ext is only set for php-ext or php-ext-zend packages
* Make sure the pool builder excludes php-ext/php-ext-zend
2024-03-20 22:04:58 +01:00
Jordi Boggiano 94fe294545
Fix self-update tests on releases 2024-03-11 17:32:50 +01:00
Pol Dellaiera 66acb84c12
Fix update --lock to avoid updating all metadata except dist/source urls and mirrors (#11850)
We now update the existing package instead of reverting changes in the updated package to ensure we keep all metadata intact, fixes #11787

Co-authored-by: Jordi Boggiano <j.boggiano@seld.be>
2024-03-05 11:32:40 +01:00
Jordi Boggiano d7cdb28b28
Try to fix CI 2024-02-23 10:54:34 +01:00
Pol Dellaiera a0d474f75c
Add a warning message when Composer is not able to guess the root package version (#11858)
Co-authored-by: Jordi Boggiano <j.boggiano@seld.be>
2024-02-23 10:47:36 +01:00
Yuto Takakura 1b7a71f7e7
Add tests for SelfUpdateCommand (#11816)
Co-authored-by: Jordi Boggiano <j.boggiano@seld.be>
2024-02-21 20:59:50 +01:00
Jordi Boggiano 64e4eb356b
Merge pull request from GHSA-7c6p-848j-wh5h
* Fix usage of possibly compromised installed.php/InstalledVersions.php at runtime, refs GHSA-7c6p-848j-wh5h

* Fix InstalledVersionsTest regression
2024-02-08 14:33:59 +01:00
theoboldalex 7a6bb18e21
Adds a test for no dev (#11833) 2024-02-08 11:06:34 +01:00