Download the PHP package uri-interop/interface without Composer

On this page you can find all versions of the php package uri-interop/interface. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package interface

Uri-Interop Standard Interface Package

PDS Skeleton PDS Composer Script Names

Uri-Interop provides an interoperable package of standard interfaces for working with URIs in PHP 8.4 or later. It reflects, refines, and reconciles the common practices identified within several pre-existing projects.

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 (RFC 2119, RFC 8174).

This package attempts to adhere to the Package Development Standards approach to naming and versioning.

Interfaces

This package defines the following interfaces:

UriStruct

UriStruct affords reading of URI component values and recomposing them into a string.

UriStruct Properties

UriStruct Methods

MutableUriStruct

UriStruct to afford direct modification of component values via property set hooks.

MutableUriStruct Properties

ImmutableUriStruct

UriStruct to afford immutable modification of component values via "with" methods.

ImmutableUriStruct Methods

UriStructFactory

UriStruct instance from parsed component values.

UriStructFactory Methods

UriStructNormalizer

UriStruct instance with normalized component values.

UriStructNormalizer Methods

UriStructResolver

UriStruct instance by resolving a relative URI reference against a base URI.

UriStructResolver Methods

UriStringParser

UriStruct instance from a URI string.

UriStringParser Methods

UriThrowable

Throwable to indicate an Exception is URI-related.

It adds no class members.

UriTypeAliases

UriTypeAliases provides custom PHPStan types to aid static analysis.

Implementations

Implementations advertised as readonly or immutable MUST be deeply readonly or immutable; they MUST NOT encapsulate any references, resources, mutable objects, objects or arrays encapsulating references or resources or mutable objects, and so on.

Implementations MAY define additional class members not defined in these interfaces; implementations advertised as readonly or immutable MUST make those additional class members deeply readonly or immutable.

Notes:

Q & A

Why $username and not $user?

Among the researched projects, $user was the more common property name. Earlier drafts honored the majority. However, for symmetry with $password and $userinfo, reviewers found $username more suitable. The fact that WHATWG-URL specifies username strengthened that preference.

Why $password and not $pass?

Among the researched projects, $password was the more common property name.

Why $userinfo (lower case) and not $userInfo (camel case)?

Among the researched projects, most used camel-casing for this property and/or its associated methods, rather than all lower case. Earlier drafts honored this majority usage. However, for symmetry with $username and $password, reviewers found $userinfo more suitable.

Why is RFC 3987 not included?

Earlier drafts of these standard interfaces included an RFC 3987 marker interface for IRIs, in an attempt to unify IRI and URI handling. In the end it was removed:

  1. There are too few IRI implementations to draw from.
  2. Tooling around percent-encoding for UCS characters is practically nonexistent.
  3. Percent-encoding strategies around ASCII-only URIs as vs UCS-allowed IRIs were difficult to typehint sensibly.

Despite this, RFC 3987 projects do have some overlap with URIs, and thus continue to inform Uri-Interop.

Why is WHATWG-URL not included?

Earlier drafts of these standard interfaces included a WHATWG-URL marker. However, there are enough differences between WHATWG-URL and the RFC 3986-like behaviors of the researched projects to warrant exclusion from this standard.

Despite this, WHATWG-URL does have some overlap with RFC 3986, and thus continues to inform Uri-Interop.

Why is there no UriStruct::normalize() interface method?

Although a UriStruct implementation, especially when normalizing URIs from different implementors to compare them for equivalence.

Why is there no UriStruct::resolve() interface method?

Although a UriStruct implementation.



All versions of interface with dependencies

PHP Build Version
Package Version
Requires php Version >=8.4
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package uri-interop/interface contains the following files

Loading the files please wait ...