Skip to content

Use the new URI extension available in PHP 8.5 #37

@spaze

Description

@spaze

Note: This can be done after Bref releases a version that supports PHP 8.5 (3.0, currently beta).

Make the library use the new URI extension https://www.php.net/releases/8.5/en.php#new-uri-extension, see some usage here https://thephp.foundation/blog/2025/10/10/php-85-uri-extension/

Then make sure all fopen() and similar calls use the new parser class as well:

$context = stream_context_create([
    "uri_parser_class" => \Uri\Rfc3986\Uri::class,
]);
$contents = file_get_contents($url, context: $context);

This would mean the library then needs PHP 8.5 but I could finally tag 1.0 release and then create 2.0 that would need PHP 8.5 and use the URI extension. Both should be listed in the README as fully supported, with PHP versions they work on.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions