1
0
Fork 0
Go to file
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
.github Try to fix lowest deps tests 2024-11-14 11:47:19 +01:00
bin Merge pull request from GHSA-jm6m-4632-36hf 2023-09-29 10:15:51 +02:00
doc Update docs with hint for avast disabling 2024-11-14 10:50:54 +01:00
phpstan 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
res JSON schema updates (#12123) 2024-09-26 13:36:25 +02:00
src Support schemeless funding URLs 2024-12-17 22:22:26 +08:00
tests Support schemeless funding URLs 2024-12-17 22:22:26 +08:00
.editorconfig Enhancement: Add .editorconfig 2019-01-03 10:49:27 +01:00
.gitattributes chore: remove `composer.lock` from `.gitattributes` (#11674) 2023-10-06 09:59:15 +02:00
.gitignore Add tests for SelfUpdateCommand (#11816) 2024-02-21 20:59:50 +01:00
.php-cs-fixer.php Fix CS (#11003) 2022-08-17 14:20:07 +02:00
CHANGELOG.md Update changelog 2024-11-17 13:12:53 +01:00
CODE_OF_CONDUCT.md Update Code of Conduct to Contributor Covenant v2.1 (#11161) 2022-11-01 10:46:06 +01:00
LICENSE lets avoid silly commits in the future 2017-01-19 12:10:26 +01:00
PORTING_INFO Import initial partial port of the libzypp satsolver. 2011-04-05 17:37:19 +02:00
README.md docs: add binary dependencies (#11505) 2023-07-01 14:20:19 +02:00
UPGRADE-2.0.md chore: fix some comments (#11922) 2024-04-13 09:08:12 +02:00
composer.json Allow react/promise 2.x again, fixes #12188 2024-11-15 13:53:30 +01:00
composer.lock Allow react/promise 2.x again, fixes #12188 2024-11-15 13:53:30 +01:00
phpunit.xml.dist Exclude PHPStan extensions from PHPUnit coverage 2023-01-03 18:57:00 +11:00

README.md

Composer

Dependency Management for PHP

Composer helps you declare, manage, and install dependencies of PHP projects.

See https://getcomposer.org/ for more information and documentation.

Continuous Integration

Installation / Usage

Download and install Composer by following the official instructions.

For usage, see the documentation.

Packages

Find public packages on Packagist.org.

For private package hosting take a look at Private Packagist.

Community

Follow @packagist or @seldaek on Twitter for announcements, or check the #composerphp hashtag.

For support, Stack Overflow offers a good collection of Composer related questions, or you can use the GitHub discussions.

Please note that this project is released with a Contributor Code of Conduct. By participating in this project and its community you agree to abide by those terms.

Requirements

Latest Composer

PHP 7.2.5 or above for the latest version.

Composer 2.2 LTS (Long Term Support)

PHP versions 5.3.2 - 8.1 are still supported via the LTS releases of Composer (2.2.x). If you run the installer or the self-update command the appropriate Composer version for your PHP should be automatically selected.

Binary dependencies

  • 7z (or 7zz)
  • unzip (if 7z is missing)
  • gzip
  • tar
  • unrar
  • xz
  • Git (git)
  • Mercurial (hg)
  • Fossil (fossil)
  • Perforce (p4)
  • Subversion (svn)

It's important to note that the need for these binary dependencies may vary depending on individual use cases. However, for most users, only 2 dependencies are essential for Composer: 7z (or 7zz or unzip), and git.

Authors

See also the list of contributors who participated in this project.

Security Reports

Please send any sensitive issue to security@packagist.org. Thanks!

License

Composer is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments