diff --git a/docs/5.0/manipulations/middlewares.md b/docs/5.0/manipulations/middlewares.md index aa9b0a33..ddee0918 100644 --- a/docs/5.0/manipulations/middlewares.md +++ b/docs/5.0/manipulations/middlewares.md @@ -24,10 +24,10 @@ $query_to_merge = 'fo.o=bar&taz='; $uri = SlimUri::createFromString($base_uri); $source_query = $uri->getQuery(); -parse_str($source_query, $pairs); -parse_str($query_to_merge, $new_pairs); +parse_str($source_query, $params); +parse_str($query_to_merge, $new_params); $new_query = http_build_query( - array_merge($pairs, $new_pairs), + array_merge($params, $new_params), '', '&', PHP_QUERY_RFC3986 diff --git a/docs/5.0/manipulations/references.md b/docs/5.0/manipulations/references.md index eba8b6f4..bf3bf086 100644 --- a/docs/5.0/manipulations/references.md +++ b/docs/5.0/manipulations/references.md @@ -36,11 +36,11 @@ An associative array is returned. The following keys are always present within t pipe(new AppendSegment('/purchases/summary')) - ->pipe(new ReplaceLabel(3, 'download')); + ->pipe(new ReplaceLabel(-1, 'download')); $tmpUri = $modifiers->process($uri->withScheme('https')); //the specific transformation are applied here @@ -79,4 +79,5 @@ echo $uri, PHP_EOL; // display "http://www.example.com/report" echo $links['csv'], PHP_EOL; // display "https://download.example.com/report/purchases/summary.csv" echo $links['xml'], PHP_EOL; // display "https://download.example.com/report/purchases/summary.xml" echo $links['json'], PHP_EOL; // display "https://download.example.com/report/purchases/summary.json" +echo get_class($links['json']), PHP_EOL; // display "GuzzleHttp\Psr7\Uri" ~~~ diff --git a/docs/upgrading/upgrading-5.0.md b/docs/upgrading/upgrading-5.0.md index 474817e9..2d012b77 100644 --- a/docs/upgrading/upgrading-5.0.md +++ b/docs/upgrading/upgrading-5.0.md @@ -238,7 +238,7 @@ After: use League\Uri\Components\Host; $host = new Host('::1'); //triggers an Exception -$host = Host::createFromIp('::1')->__toString(); //display '[::1]' +echo Host::createFromIp('::1'); //display '[::1]' ~~~