1
0
Fork 0
composer/tests/Composer/Test
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
..
Advisory Add `composer audit --ignore-severity` option (#12132) 2024-10-02 14:14:53 +02:00
Autoload PHPStan/tests updates (#11996) 2024-05-29 23:12:06 +02:00
Command Try to fix lowest deps tests 2024-11-14 11:47:19 +01:00
Config PHPStan/tests updates (#11996) 2024-05-29 23:12:06 +02:00
Console Fix typos (#12133) 2024-10-02 12:28:32 +02:00
DependencyResolver Fix many PHPStan errors in DependencyResolver namespace (#12121) 2024-09-21 13:53:33 +02:00
Downloader Try to fix lowest deps tests 2024-11-14 11:47:19 +01:00
EventDispatcher Add a way to control which scripts get args and where (#12086) 2024-09-18 14:44:55 +02:00
Filter/PlatformRequirementFilter PHPStan/tests updates (#11996) 2024-05-29 23:12:06 +02:00
Fixtures Show root package version in error output for circular dependencies for added clarity 2024-11-14 11:26:58 +01:00
IO Fix typo for IO tests (#12027) 2024-07-02 00:30:29 +02:00
Installer Clean up md5/sha1 usages, upgrade algos where possible (#12088) 2024-08-21 17:06:42 +02:00
Json PHPStan/tests updates (#11996) 2024-05-29 23:12:06 +02:00
Mock Stop relying on OS to find executables on Windows, and migrate most Process calls to array syntax (#12180) 2024-11-06 13:49:06 +01:00
Package Support schemeless funding URLs 2024-12-17 22:22:26 +08:00
Platform [Tests] Use static data providers (#11197) 2022-11-24 14:39:08 +01:00
Plugin PHPStan/tests updates (#11996) 2024-05-29 23:12:06 +02:00
Question PHPStan/tests updates (#11996) 2024-05-29 23:12:06 +02:00
Repository Support schemeless funding URLs 2024-12-17 22:22:26 +08:00
Script PHPStan/tests updates (#11996) 2024-05-29 23:12:06 +02:00
Util Stop relying on OS to find executables on Windows, and migrate most Process calls to array syntax (#12180) 2024-11-06 13:49:06 +01:00
AllFunctionalTest.php Stop relying on OS to find executables on Windows, and migrate most Process calls to array syntax (#12180) 2024-11-06 13:49:06 +01:00
ApplicationTest.php Add test covering the fix for #12107, closes #12108 2024-09-17 09:52:56 +02:00
CacheTest.php PHPStan/tests updates (#11996) 2024-05-29 23:12:06 +02:00
CompletionFunctionalTest.php PHPStan/tests updates (#11996) 2024-05-29 23:12:06 +02:00
ComposerTest.php PHPStan/tests updates (#11996) 2024-05-29 23:12:06 +02:00
ConfigTest.php Fix secure-http check to avoid bypass using emojis 2024-06-10 14:48:02 +02:00
DefaultConfigTest.php PHPStan/tests updates (#11996) 2024-05-29 23:12:06 +02:00
DocumentationTest.php Add support for Application::setCatchErrors in symfony 6.4+, refs symfony/symfony#50420 2023-07-28 19:33:33 +02:00
FactoryTest.php Detect incorrectly configured COMPOSER env when set to a directory, refs #12049 2024-08-22 10:49:04 +02:00
InstalledVersionsTest.php PHPStan/tests updates (#11996) 2024-05-29 23:12:06 +02:00
InstallerTest.php Fix tests 2024-09-18 16:32:40 +02:00
TestCase.php Clean up md5/sha1 usages, upgrade algos where possible (#12088) 2024-08-21 17:06:42 +02:00