@@ -146,7 +146,7 @@ $uri = Uri::new('toto://thephpleague.com/path/to?here#content');
146146<p class =" message-notice " >For extra validation rules to be triggered the URI must be absolute and the
147147scheme recognized. Otherwise, only basic RFC3986 rules are taken into account.</p >
148148
149- ### Complete Scheme Validation
149+ ### Scheme Validation
150150
151151For the following URI schemes (order alphabetically) full validation is taken into account.
152152
@@ -156,8 +156,9 @@ For the following URI schemes (order alphabetically) full validation is taken in
156156- http(s)
157157- ws(s)
158158- blob ** (since version 7.6)**
159+ - mailto ** (since version 7.6)**
159160
160- ### URN Generic Validation
161+ #### URN Validation
161162
162163<p class =" message-notice " >Since version <code >7.6.0</code ></p >
163164
@@ -177,7 +178,7 @@ $uri = Uri::new('urn:isbn:foobar/baz');
177178// possibly with hyphens only
178179~~~
179180
180- ### Component Presence Validation
181+ ### Component Validation
181182
182183<p class =" message-notice " >Since version <code >7.6.0</code ></p >
183184
@@ -186,17 +187,17 @@ and on the different RFCs and specifications for each URI scheme, a validation b
186187component presence is used. For instance, the following URI will be rejected.
187188
188189``` php
189- $uri = Uri::new('mailto:path/to? here');
190+ $uri = Uri::new('bitcoin:config/ here');
190191//will work
191192
192- $uri = Uri::new('mailto ://thephpleague.com/path/to?here ');
193+ $uri = Uri::new('bitcoin ://thephpleague.com');
193194// will throw a League\Uri\Exceptions\SyntaxError
194195```
195196
196- In the example, because a the ` mailto ` URI scheme cannot contain an authority component, an
197+ In the example, because a the ` bitcoin ` URI scheme cannot contain an authority component, an
197198exception is thrown. On the other hand, the path has not been checked to validate that it only
198- contained valid email addresses . According to RFC3986, the path component is valid, but it is
199- not according to the [ ` mailto ` RFC ] ( https://www.rfc-editor.org/rfc/rfc6068.html ) .
199+ contained a valid bitcoin address . According to RFC3986, the path component is valid, but it is
200+ not according to the [ ` bitcoin ` specification ] ( https://en.bitcoin.it/wiki/BIP_0021#Accessibility_(URI_scheme_name) ) .
200201
201202The list of supported URI scheme can be found on the [ UriScheme] ( https://github.com/thephpleague/uri-src/blob/master/uri/UriScheme.php ) Enum
202203available since version ` 7.6 ` .
@@ -327,7 +328,7 @@ The algorithm used is defined by the [WHATWG URL Living standard](https://url.sp
327328
328329~~~ php
329330echo Uri::new('https://uri.thephpleague.com/uri/6.0/info/')->getOrigin(); //display 'https://uri.thephpleague.com';
330- echo Uri::new('blob:https://mozilla.org:443 ')->getOrigin(); //display 'https://mozilla.org'
331+ echo Uri::new('blob:null/700475de-c453-11f0-8de9-0242ac120002 ')->getOrigin(); //display 'https://mozilla.org'
331332Uri::new('file:///usr/bin/php')->getOrigin(); //returns null
332333Uri::new('data:text/plain,Bonjour%20le%20monde%21')->getOrigin(); //returns null
333334~~~
@@ -409,7 +410,7 @@ any leading zeros.
409410
410411~~~ php
411412<?php
412- Uri::new('blob:http://xn--bb-bjab.be./path ')
413+ Uri::new('blob:http://xn--bb-bjab.be./700475de-c453-11f0-8de9-0242ac120002 ')
413414 ->isCrossOrigin('http://Bébé.BE./path'); // returns false
414415
415416Uri::new('https://example.com/123')
0 commit comments