1
0
Fork 0
composer/tests/Composer/Test/Repository
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
..
Fixtures Update PHPStan (#11976) 2024-05-22 09:09:04 +02:00
Vcs Support schemeless funding URLs 2024-12-17 22:22:26 +08:00
ArrayRepositoryTest.php PHPStan/tests updates (#11996) 2024-05-29 23:12:06 +02:00
ArtifactRepositoryTest.php PHPStan/tests updates (#11996) 2024-05-29 23:12:06 +02:00
ComposerRepositoryTest.php PHPStan/tests updates (#11996) 2024-05-29 23:12:06 +02:00
CompositeRepositoryTest.php PHPStan/tests updates (#11996) 2024-05-29 23:12:06 +02:00
FilesystemRepositoryTest.php PHPStan/tests updates (#11996) 2024-05-29 23:12:06 +02:00
FilterRepositoryTest.php Refactor the BasePackage::$stabilities into a constant 2024-07-12 11:28:26 +02:00
InstalledRepositoryTest.php PHPStan/tests updates (#11996) 2024-05-29 23:12:06 +02:00
PathRepositoryTest.php Clean up md5/sha1 usages, upgrade algos where possible (#12088) 2024-08-21 17:06:42 +02:00
PlatformRepositoryTest.php PHPStan/tests updates (#11996) 2024-05-29 23:12:06 +02:00
RepositoryFactoryTest.php PHPStan/tests updates (#11996) 2024-05-29 23:12:06 +02:00
RepositoryManagerTest.php PHPStan/tests updates (#11996) 2024-05-29 23:12:06 +02:00
RepositoryUtilsTest.php Fix UX when a non-required plugin is still present in vendor dir (#12000) 2024-05-31 10:29:56 +02:00
VcsRepositoryTest.php Fix addressability of branches containing # characters (#12042) 2024-07-25 16:46:57 +02:00