1
0
Fork 0
Commit Graph

2902 Commits (811dfd3a136ff482c6d84fd19e6545bd76b60804)

Author SHA1 Message Date
Andrew Nicols 811dfd3a13
Support schemeless funding URLs
The [GitHub documentation][1] for FUNDING.yml specifically notes that if a
custom URL is in the Array format, and includes `:` then it must be
quoted.

From this we can infer that the custom URL does not have to contain a
`:` at all.

The example for a Custom URL also gives an example of an unquoted URL
without any `:` character:

```
custom: ["https://www.paypal.me/octocat", octocat.com]
```

However if a repository uses a URL in this format it is currently
rejected because it does not specify a scheme. Furthermore the
`parse_url` method treats the `octocat.com` example as a path and not a
host. The same is true for URLs such as
`octocat.com/funding/example.html`.

This patch adds an additional allowance for the URL filter to capture
the case where a URL has no scheme or host, but does have a path.

[1]: https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/displaying-a-sponsor-button-in-your-repository#about-funding-files
2024-12-17 22:22:26 +08:00
Jordi Boggiano 8f24b67c3c
Try to fix lowest deps tests 2024-11-14 11:47:19 +01:00
Jordi Boggiano a7a14ea860
Show root package version in error output for circular dependencies for added clarity 2024-11-14 11:26:58 +01:00
Nicolas Grekas 3dc279cf66
Stop relying on OS to find executables on Windows, and migrate most Process calls to array syntax (#12180)
Co-authored-by: Jordi Boggiano <j.boggiano@seld.be>
2024-11-06 13:49:06 +01:00
Jordi Boggiano 186d78cde3
Add php-ext to array dumper 2024-10-24 11:38:45 +02:00
Eirik Stanghelle Morland a01ab9bbca
Better app password support for bitbucket (#12103)
* Fix support for app passwords better, plus better handling of bitbucket repositories stored with ssh
2024-10-02 14:36:30 +02:00
Johnson Page 31d83b2c0f
Add `composer audit --ignore-severity` option (#12132)
Co-authored-by: Jordi Boggiano <j.boggiano@seld.be>
2024-10-02 14:14:53 +02:00
Viktor Szépe 8728a75930
Fix typos (#12133) 2024-10-02 12:28:32 +02:00
Jordi Boggiano c8bd0e6278
Add --patch-only flag to update command to restrict updates to patch versions and make them safer (#12122)
Fixes #11446
2024-09-21 13:54:03 +02:00
Jordi Boggiano 6b81140f81
Fix many PHPStan errors in DependencyResolver namespace (#12121) 2024-09-21 13:53:33 +02:00
Jordi Boggiano 3a2a18175d
Add ability to reinstall packages by type (#12114)
Fixes #11364
2024-09-21 13:37:55 +02:00
Jordi Boggiano 58905ffe4e
Validate licenses passed into init command (#12115)
Fixes #10838
2024-09-19 17:07:28 +02:00
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