Documentation for crwlr / url (v2.0)

Attention: You're currently viewing the documentation for v2.0 of the url package.
This is not the latest version of the package.
If you didn't navigate to this version intentionally, you can click here to switch to the latest version.

Upgrade Guides

Upgrade from 1.x to 2.0.0

PHP Version Requirement

Required minimum PHP version is now 8.0.

Change URL component property access to method calls

Access to url components via class properties (instead of methods) using magic getter and setter was removed. So if you've been using components like $url->host, $url->path and so on (see Components), you need to change those to method calls, so just: $url->host(), $url->path(). The property access was just an alias.


Upgrade from 0.x to 1.0.0

PHP Version Requirement

Required minimum PHP version is now 7.2.

Creating Url instances from relative references

Instances of the Url class can now be created from relative references (without scheme). In v0.1 creating a new instance from a relative reference threw an Exception. If your application expects this behavior, you can use the isRelativeReference method of the Url object to find out if the URL in question is a relative reference.

Usage of undocumented functionality

If you're using any other class than the Url class directly in your code, please take a look at the CHANGELOG.md entry for v1.0.0.