league/uri-polyfill
Composer 安装命令:
composer require league/uri-polyfill
包简介
Polyfill backporting PHP 8.5+ native RFC3986/WHATWG URI features to lower PHP versions
README 文档
README
$uri = new Uri\Rfc3986\Uri("HTTPS://ex%61mpLE.com:443/foo/../bar/./baz?#fragment"); $uri->toRawString(); // returns "HTTPS://ex%61mpLE.com:443/foo/../bar/./baz?#fragment" $uri->toString(); // returns "https://example.com:443/bar/baz?#fragment" $url = new Uri\WhatWg\Url("HTTPS://🐘.com:443/foo/../bar/./baz?#fragment"); echo $url->toAsciiString(); // returns "https://xn--go8h.com/bar/baz?#fragment" echo $url->toUnicodeString(); // returns "https://🐘.com/bar/baz?#fragment"
This package provides a polyfill for the new native PHP URI parsing features to be included in PHP8.5. The polyfill works for PHP versions greater or equal to PHP8.1
⚠️ this is a sub-split, for development, pull requests and issues, visit: https://github.com/thephpleague/uri-src
System Requirements
To use the package, you require:
- PHP >= 8.1 but the latest stable version of PHP is recommended
- league/uri-interfaces
- rowbot/url
Tip
If you are using PHP 8.1, you SHOULD install symfony/polyfill-php82 to use its SensitiveParameter polyfill
Install
Install the package using Composer.
composer require league/uri-polyfill:^7.6
Documentation
The RFC introduces:
- the
Uri\Rfc3986\Uriclass, an RFC 3986 compliant URI parser - the
Uri\WhatWg\Urlclass, an WHATWG compliant URL parser
Full documentation can be found on the Add RFC 3986 and WHATWG compliant URI parsing support RFC.
Contributing
Contributions are welcome and will be fully credited. Please see CONTRIBUTING and CONDUCT for details.
Security
If you discover any security related issues, please email nyamsprod@gmail.com instead of using the issue tracker.
Changelog
Please see CHANGELOG for more information on what has changed recently.
Credits
License
The MIT License (MIT). Please see LICENSE for more information.
league/uri-polyfill 适用场景与选型建议
league/uri-polyfill 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 20.59k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 09 月 22 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「parser」 「url」 「resolver」 「uri」 「portable」 「rfc3986」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 league/uri-polyfill 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 league/uri-polyfill 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 league/uri-polyfill 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Type transformers, normalizers and resolvers.
Easy to use SDK with grabber for multiple platforms at once like YouTube, Dailymotion, Facebook and more.
resolve openapi keywords
Easy URL rewrites in your Laravel application
PhpPlaisio: Company Resolver
An MT940 bank statement parser for PHP
统计信息
- 总下载量: 20.59k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 41
- 依赖项目数: 2
- 推荐数: 3
其他信息
- 授权协议: MIT
- 更新时间: 2025-09-22