Skip to content
This repository has been archived by the owner on Mar 28, 2021. It is now read-only.

Commit

Permalink
prepare 1.4.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
nyamsprod committed Feb 2, 2018
1 parent e8ad43a commit 3865dac
Show file tree
Hide file tree
Showing 51 changed files with 222 additions and 68 deletions.
24 changes: 23 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,28 @@

- All Notable changes to `uri-manipulations` will be documented in this file

## 1.4.0 - TDB

### Added

- `League\Uri\Modifiers\PublicSuffix`
- `League\Uri\replace_publicsuffix`

### Fixed

- `League\Uri\replace_registrabledomain` now can take a optional `League\Uri\PublicSuffix\Rules` object
- `League\Uri\replace_subdomain` now can take a optional `League\Uri\PublicSuffix\Rules` object
- `League\Uri\Modifiers\RegisterableDomain` constructor now can take a optional `League\Uri\PublicSuffix\Rules` object
- `League\Uri\Modifiers\SubDomain` constructor now can take a optional `League\Uri\PublicSuffix\Rules` object

### Deprecated

- None

### Removed

- None

## 1.3.0 - 2017-11-24

### Added
Expand All @@ -19,7 +41,7 @@

### Removed

- Nonce
- None

## 1.2.0 - 2017-11-22

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
},
"minimun-stability" : "dev",
"require": {
"league/uri-components": "^1.4.1",
"league/uri-components": "^1.7.0",
"league/uri-interfaces": "^1.0",
"php" : ">=7.0",
"psr/http-message": "^1.0"
Expand Down
2 changes: 1 addition & 1 deletion src/Modifiers/AddBasePath.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @author Ignace Nyamagana Butera <[email protected]>
* @copyright 2016 Ignace Nyamagana Butera
* @license https://github.com/thephpleague/uri-manipulations/blob/master/LICENSE (MIT License)
* @version 1.3.0
* @version 1.4.0
* @link https://github.com/thephpleague/uri-manipulations
*/
declare(strict_types=1);
Expand Down
2 changes: 1 addition & 1 deletion src/Modifiers/AddLeadingSlash.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @author Ignace Nyamagana Butera <[email protected]>
* @copyright 2016 Ignace Nyamagana Butera
* @license https://github.com/thephpleague/uri-manipulations/blob/master/LICENSE (MIT License)
* @version 1.3.0
* @version 1.4.0
* @link https://github.com/thephpleague/uri-manipulations
*/
declare(strict_types=1);
Expand Down
2 changes: 1 addition & 1 deletion src/Modifiers/AddRootLabel.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @author Ignace Nyamagana Butera <[email protected]>
* @copyright 2016 Ignace Nyamagana Butera
* @license https://github.com/thephpleague/uri-manipulations/blob/master/LICENSE (MIT License)
* @version 1.3.0
* @version 1.4.0
* @link https://github.com/thephpleague/uri-manipulations
*/
declare(strict_types=1);
Expand Down
2 changes: 1 addition & 1 deletion src/Modifiers/AddTrailingSlash.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @author Ignace Nyamagana Butera <[email protected]>
* @copyright 2016 Ignace Nyamagana Butera
* @license https://github.com/thephpleague/uri-manipulations/blob/master/LICENSE (MIT License)
* @version 1.3.0
* @version 1.4.0
* @link https://github.com/thephpleague/uri-manipulations
*/
declare(strict_types=1);
Expand Down
2 changes: 1 addition & 1 deletion src/Modifiers/AppendLabel.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @author Ignace Nyamagana Butera <[email protected]>
* @copyright 2016 Ignace Nyamagana Butera
* @license https://github.com/thephpleague/uri-manipulations/blob/master/LICENSE (MIT License)
* @version 1.3.0
* @version 1.4.0
* @link https://github.com/thephpleague/uri-manipulations
*/
declare(strict_types=1);
Expand Down
2 changes: 1 addition & 1 deletion src/Modifiers/AppendQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @author Ignace Nyamagana Butera <[email protected]>
* @copyright 2016 Ignace Nyamagana Butera
* @license https://github.com/thephpleague/uri-manipulations/blob/master/LICENSE (MIT License)
* @version 1.3.0
* @version 1.4.0
* @link https://github.com/thephpleague/uri-manipulations
*/
declare(strict_types=1);
Expand Down
2 changes: 1 addition & 1 deletion src/Modifiers/AppendSegment.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @author Ignace Nyamagana Butera <[email protected]>
* @copyright 2016 Ignace Nyamagana Butera
* @license https://github.com/thephpleague/uri-manipulations/blob/master/LICENSE (MIT License)
* @version 1.3.0
* @version 1.4.0
* @link https://github.com/thephpleague/uri-manipulations
*/
declare(strict_types=1);
Expand Down
2 changes: 1 addition & 1 deletion src/Modifiers/Basename.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @author Ignace Nyamagana Butera <[email protected]>
* @copyright 2016 Ignace Nyamagana Butera
* @license https://github.com/thephpleague/uri-manipulations/blob/master/LICENSE (MIT License)
* @version 1.3.0
* @version 1.4.0
* @link https://github.com/thephpleague/uri-manipulations
*/
declare(strict_types=1);
Expand Down
2 changes: 1 addition & 1 deletion src/Modifiers/CallableAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @author Ignace Nyamagana Butera <[email protected]>
* @copyright 2016 Ignace Nyamagana Butera
* @license https://github.com/thephpleague/uri-manipulations/blob/master/LICENSE (MIT License)
* @version 1.3.0
* @version 1.4.0
* @link https://github.com/thephpleague/uri-manipulations
*/
declare(strict_types=1);
Expand Down
2 changes: 1 addition & 1 deletion src/Modifiers/DataUriParameters.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @author Ignace Nyamagana Butera <[email protected]>
* @copyright 2016 Ignace Nyamagana Butera
* @license https://github.com/thephpleague/uri-manipulations/blob/master/LICENSE (MIT License)
* @version 1.3.0
* @version 1.4.0
* @link https://github.com/thephpleague/uri-manipulations
*/
declare(strict_types=1);
Expand Down
2 changes: 1 addition & 1 deletion src/Modifiers/DataUriToAscii.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @author Ignace Nyamagana Butera <[email protected]>
* @copyright 2016 Ignace Nyamagana Butera
* @license https://github.com/thephpleague/uri-manipulations/blob/master/LICENSE (MIT License)
* @version 1.3.0
* @version 1.4.0
* @link https://github.com/thephpleague/uri-manipulations
*/
declare(strict_types=1);
Expand Down
2 changes: 1 addition & 1 deletion src/Modifiers/DataUriToBinary.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @author Ignace Nyamagana Butera <[email protected]>
* @copyright 2016 Ignace Nyamagana Butera
* @license https://github.com/thephpleague/uri-manipulations/blob/master/LICENSE (MIT License)
* @version 1.3.0
* @version 1.4.0
* @link https://github.com/thephpleague/uri-manipulations
*/
declare(strict_types=1);
Expand Down
2 changes: 1 addition & 1 deletion src/Modifiers/DecodeUnreservedCharacters.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @author Ignace Nyamagana Butera <[email protected]>
* @copyright 2016 Ignace Nyamagana Butera
* @license https://github.com/thephpleague/uri-manipulations/blob/master/LICENSE (MIT License)
* @version 1.3.0
* @version 1.4.0
* @link https://github.com/thephpleague/uri-manipulations
*/
declare(strict_types=1);
Expand Down
2 changes: 1 addition & 1 deletion src/Modifiers/Dirname.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @author Ignace Nyamagana Butera <[email protected]>
* @copyright 2016 Ignace Nyamagana Butera
* @license https://github.com/thephpleague/uri-manipulations/blob/master/LICENSE (MIT License)
* @version 1.3.0
* @version 1.4.0
* @link https://github.com/thephpleague/uri-manipulations
*/
declare(strict_types=1);
Expand Down
2 changes: 1 addition & 1 deletion src/Modifiers/Exception.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @author Ignace Nyamagana Butera <[email protected]>
* @copyright 2016 Ignace Nyamagana Butera
* @license https://github.com/thephpleague/uri-manipulations/blob/master/LICENSE (MIT License)
* @version 1.3.0
* @version 1.4.0
* @link https://github.com/thephpleague/uri-manipulations
*/
declare(strict_types=1);
Expand Down
2 changes: 1 addition & 1 deletion src/Modifiers/Extension.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @author Ignace Nyamagana Butera <[email protected]>
* @copyright 2016 Ignace Nyamagana Butera
* @license https://github.com/thephpleague/uri-manipulations/blob/master/LICENSE (MIT License)
* @version 1.3.0
* @version 1.4.0
* @link https://github.com/thephpleague/uri-manipulations
*/
declare(strict_types=1);
Expand Down
11 changes: 6 additions & 5 deletions src/Modifiers/Formatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,23 @@
* @author Ignace Nyamagana Butera <[email protected]>
* @copyright 2016 Ignace Nyamagana Butera
* @license https://github.com/thephpleague/uri-manipulations/blob/master/LICENSE (MIT License)
* @version 1.3.0
* @version 1.4.0
* @link https://github.com/thephpleague/uri-manipulations
*/
declare(strict_types=1);

namespace League\Uri\Modifiers;

use InvalidArgumentException;
use League\Uri;
use League\Uri\Components\ComponentInterface;
use League\Uri\Components\EncodingInterface;
use League\Uri\Components\Fragment;
use League\Uri\Components\Host;
use League\Uri\Components\Path;
use League\Uri\Components\Query;
use League\Uri\Components\UserInfo;
use League\Uri\Interfaces\Uri;
use League\Uri\Interfaces\Uri as LeagueUriInterface;
use Psr\Http\Message\UriInterface;

/**
Expand Down Expand Up @@ -145,14 +146,14 @@ public function preserveFragment(bool $status)
public function __invoke($input)
{
if ($input instanceof Query) {
return Query::build($input->getPairs(), $this->query_separator, $this->enc_type);
return Uri\build_query($input->getPairs(), $this->query_separator, $this->enc_type);
}

if ($input instanceof ComponentInterface) {
return $input->getContent($this->enc_type);
}

if ($input instanceof Uri || $input instanceof UriInterface) {
if ($input instanceof LeagueUriInterface || $input instanceof UriInterface) {
return $this->formatUri($input);
}

Expand Down Expand Up @@ -212,7 +213,7 @@ protected function formatUri($uri): string

$query = $uri->getQuery();
if ('' != $query || $this->preserve_query) {
$query = '?'.Query::build(Query::parse((string) $query), $this->query_separator, $this->enc_type);
$query = '?'.Uri\build_query(Uri\parse_query((string) $query), $this->query_separator, $this->enc_type);
}

$fragment = $uri->getFragment();
Expand Down
2 changes: 1 addition & 1 deletion src/Modifiers/HostMiddlewareTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @author Ignace Nyamagana Butera <[email protected]>
* @copyright 2016 Ignace Nyamagana Butera
* @license https://github.com/thephpleague/uri-manipulations/blob/master/LICENSE (MIT License)
* @version 1.3.0
* @version 1.4.0
* @link https://github.com/thephpleague/uri-manipulations
*/

Expand Down
2 changes: 1 addition & 1 deletion src/Modifiers/HostToAscii.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @author Ignace Nyamagana Butera <[email protected]>
* @copyright 2016 Ignace Nyamagana Butera
* @license https://github.com/thephpleague/uri-manipulations/blob/master/LICENSE (MIT License)
* @version 1.3.0
* @version 1.4.0
* @link https://github.com/thephpleague/uri-manipulations
*/
declare(strict_types=1);
Expand Down
2 changes: 1 addition & 1 deletion src/Modifiers/HostToUnicode.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @author Ignace Nyamagana Butera <[email protected]>
* @copyright 2016 Ignace Nyamagana Butera
* @license https://github.com/thephpleague/uri-manipulations/blob/master/LICENSE (MIT License)
* @version 1.3.0
* @version 1.4.0
* @link https://github.com/thephpleague/uri-manipulations
*/
declare(strict_types=1);
Expand Down
2 changes: 1 addition & 1 deletion src/Modifiers/KsortQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @author Ignace Nyamagana Butera <[email protected]>
* @copyright 2016 Ignace Nyamagana Butera
* @license https://github.com/thephpleague/uri-manipulations/blob/master/LICENSE (MIT License)
* @version 1.3.0
* @version 1.4.0
* @link https://github.com/thephpleague/uri-manipulations
*/
declare(strict_types=1);
Expand Down
2 changes: 1 addition & 1 deletion src/Modifiers/MergeQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @author Ignace Nyamagana Butera <[email protected]>
* @copyright 2016 Ignace Nyamagana Butera
* @license https://github.com/thephpleague/uri-manipulations/blob/master/LICENSE (MIT License)
* @version 1.3.0
* @version 1.4.0
* @link https://github.com/thephpleague/uri-manipulations
*/
declare(strict_types=1);
Expand Down
2 changes: 1 addition & 1 deletion src/Modifiers/Normalize.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @author Ignace Nyamagana Butera <[email protected]>
* @copyright 2016 Ignace Nyamagana Butera
* @license https://github.com/thephpleague/uri-manipulations/blob/master/LICENSE (MIT License)
* @version 1.3.0
* @version 1.4.0
* @link https://github.com/thephpleague/uri-manipulations
*/
declare(strict_types=1);
Expand Down
2 changes: 1 addition & 1 deletion src/Modifiers/PathMiddlewareTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @author Ignace Nyamagana Butera <[email protected]>
* @copyright 2016 Ignace Nyamagana Butera
* @license https://github.com/thephpleague/uri-manipulations/blob/master/LICENSE (MIT License)
* @version 1.3.0
* @version 1.4.0
* @link https://github.com/thephpleague/uri-manipulations
*/

Expand Down
2 changes: 1 addition & 1 deletion src/Modifiers/Pipeline.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @author Ignace Nyamagana Butera <[email protected]>
* @copyright 2016 Ignace Nyamagana Butera
* @license https://github.com/thephpleague/uri-manipulations/blob/master/LICENSE (MIT License)
* @version 1.3.0
* @version 1.4.0
* @link https://github.com/thephpleague/uri-manipulations
*/
declare(strict_types=1);
Expand Down
2 changes: 1 addition & 1 deletion src/Modifiers/PrependLabel.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @author Ignace Nyamagana Butera <[email protected]>
* @copyright 2016 Ignace Nyamagana Butera
* @license https://github.com/thephpleague/uri-manipulations/blob/master/LICENSE (MIT License)
* @version 1.3.0
* @version 1.4.0
* @link https://github.com/thephpleague/uri-manipulations
*/
declare(strict_types=1);
Expand Down
2 changes: 1 addition & 1 deletion src/Modifiers/PrependSegment.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @author Ignace Nyamagana Butera <[email protected]>
* @copyright 2016 Ignace Nyamagana Butera
* @license https://github.com/thephpleague/uri-manipulations/blob/master/LICENSE (MIT License)
* @version 1.3.0
* @version 1.4.0
* @link https://github.com/thephpleague/uri-manipulations
*/
declare(strict_types=1);
Expand Down
Loading

0 comments on commit 3865dac

Please sign in to comment.