Laravel version update
Laravel version update
This commit is contained in:
48
vendor/zendframework/zend-uri/CHANGELOG.md
vendored
48
vendor/zendframework/zend-uri/CHANGELOG.md
vendored
@@ -2,6 +2,54 @@
|
||||
|
||||
All notable changes to this project will be documented in this file, in reverse chronological order by release.
|
||||
|
||||
## 2.6.1 - 2018-04-30
|
||||
|
||||
### Added
|
||||
|
||||
- Nothing.
|
||||
|
||||
### Changed
|
||||
|
||||
- [#23](https://github.com/zendframework/zend-uri/pull/23) updates the zend-validator dependency to the 2.10 series, in order to ensure that
|
||||
this package can run under PHP 7.2.
|
||||
|
||||
### Deprecated
|
||||
|
||||
- Nothing.
|
||||
|
||||
### Removed
|
||||
|
||||
- Nothing.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Nothing.
|
||||
|
||||
## 2.6.0 - 2018-04-10
|
||||
|
||||
### Added
|
||||
|
||||
- [#4](https://github.com/zendframework/zend-uri/pull/4) adds and publishes the
|
||||
documentation to https://zendframework.github.io/zend-uri/
|
||||
|
||||
### Deprecated
|
||||
|
||||
- Nothing.
|
||||
|
||||
### Removed
|
||||
|
||||
- [#16](https://github.com/zendframework/zend-uri/pull/16) removes support for
|
||||
PHP 5.5.
|
||||
|
||||
- [#16](https://github.com/zendframework/zend-uri/pull/16) removes support for
|
||||
HHVM.
|
||||
|
||||
### Fixed
|
||||
|
||||
- [#17](https://github.com/zendframework/zend-uri/pull/17) updates the path
|
||||
encoding algorithm to allow `(` and `)` characters as path characters (per
|
||||
the RFC-3986, these are valid sub-delimiters allowed within a path).
|
||||
|
||||
## 2.5.2 - 2016-02-17
|
||||
|
||||
### Added
|
||||
|
229
vendor/zendframework/zend-uri/CONTRIBUTING.md
vendored
229
vendor/zendframework/zend-uri/CONTRIBUTING.md
vendored
@@ -1,229 +0,0 @@
|
||||
# CONTRIBUTING
|
||||
|
||||
## RESOURCES
|
||||
|
||||
If you wish to contribute to Zend Framework, please be sure to
|
||||
read/subscribe to the following resources:
|
||||
|
||||
- [Coding Standards](https://github.com/zendframework/zf2/wiki/Coding-Standards)
|
||||
- [Contributor's Guide](http://framework.zend.com/participate/contributor-guide)
|
||||
- ZF Contributor's mailing list:
|
||||
Archives: http://zend-framework-community.634137.n4.nabble.com/ZF-Contributor-f680267.html
|
||||
Subscribe: zf-contributors-subscribe@lists.zend.com
|
||||
- ZF Contributor's IRC channel:
|
||||
#zftalk.dev on Freenode.net
|
||||
|
||||
If you are working on new features or refactoring [create a proposal](https://github.com/zendframework/zend-uri/issues/new).
|
||||
|
||||
## Reporting Potential Security Issues
|
||||
|
||||
If you have encountered a potential security vulnerability, please **DO NOT** report it on the public
|
||||
issue tracker: send it to us at [zf-security@zend.com](mailto:zf-security@zend.com) instead.
|
||||
We will work with you to verify the vulnerability and patch it as soon as possible.
|
||||
|
||||
When reporting issues, please provide the following information:
|
||||
|
||||
- Component(s) affected
|
||||
- A description indicating how to reproduce the issue
|
||||
- A summary of the security vulnerability and impact
|
||||
|
||||
We request that you contact us via the email address above and give the project
|
||||
contributors a chance to resolve the vulnerability and issue a new release prior
|
||||
to any public exposure; this helps protect users and provides them with a chance
|
||||
to upgrade and/or update in order to protect their applications.
|
||||
|
||||
For sensitive email communications, please use [our PGP key](http://framework.zend.com/zf-security-pgp-key.asc).
|
||||
|
||||
## RUNNING TESTS
|
||||
|
||||
> ### Note: testing versions prior to 2.4
|
||||
>
|
||||
> This component originates with Zend Framework 2. During the lifetime of ZF2,
|
||||
> testing infrastructure migrated from PHPUnit 3 to PHPUnit 4. In most cases, no
|
||||
> changes were necessary. However, due to the migration, tests may not run on
|
||||
> versions < 2.4. As such, you may need to change the PHPUnit dependency if
|
||||
> attempting a fix on such a version.
|
||||
|
||||
To run tests:
|
||||
|
||||
- Clone the repository:
|
||||
|
||||
```console
|
||||
$ git clone git@github.com:zendframework/zend-uri.git
|
||||
$ cd
|
||||
```
|
||||
|
||||
- Install dependencies via composer:
|
||||
|
||||
```console
|
||||
$ curl -sS https://getcomposer.org/installer | php --
|
||||
$ ./composer.phar install
|
||||
```
|
||||
|
||||
If you don't have `curl` installed, you can also download `composer.phar` from https://getcomposer.org/
|
||||
|
||||
- Run the tests via `phpunit` and the provided PHPUnit config, like in this example:
|
||||
|
||||
```console
|
||||
$ ./vendor/bin/phpunit
|
||||
```
|
||||
|
||||
You can turn on conditional tests with the phpunit.xml file.
|
||||
To do so:
|
||||
|
||||
- Copy `phpunit.xml.dist` file to `phpunit.xml`
|
||||
- Edit `phpunit.xml` to enable any specific functionality you
|
||||
want to test, as well as to provide test values to utilize.
|
||||
|
||||
## Running Coding Standards Checks
|
||||
|
||||
This component uses [php-cs-fixer](http://cs.sensiolabs.org/) for coding
|
||||
standards checks, and provides configuration for our selected checks.
|
||||
`php-cs-fixer` is installed by default via Composer.
|
||||
|
||||
To run checks only:
|
||||
|
||||
```console
|
||||
$ ./vendor/bin/php-cs-fixer fix . -v --diff --dry-run --config-file=.php_cs
|
||||
```
|
||||
|
||||
To have `php-cs-fixer` attempt to fix problems for you, omit the `--dry-run`
|
||||
flag:
|
||||
|
||||
```console
|
||||
$ ./vendor/bin/php-cs-fixer fix . -v --diff --config-file=.php_cs
|
||||
```
|
||||
|
||||
If you allow php-cs-fixer to fix CS issues, please re-run the tests to ensure
|
||||
they pass, and make sure you add and commit the changes after verification.
|
||||
|
||||
## Recommended Workflow for Contributions
|
||||
|
||||
Your first step is to establish a public repository from which we can
|
||||
pull your work into the master repository. We recommend using
|
||||
[GitHub](https://github.com), as that is where the component is already hosted.
|
||||
|
||||
1. Setup a [GitHub account](http://github.com/), if you haven't yet
|
||||
2. Fork the repository (http://github.com/zendframework/zend-uri)
|
||||
3. Clone the canonical repository locally and enter it.
|
||||
|
||||
```console
|
||||
$ git clone git://github.com:zendframework/zend-uri.git
|
||||
$ cd zend-uri
|
||||
```
|
||||
|
||||
4. Add a remote to your fork; substitute your GitHub username in the command
|
||||
below.
|
||||
|
||||
```console
|
||||
$ git remote add {username} git@github.com:{username}/zend-uri.git
|
||||
$ git fetch {username}
|
||||
```
|
||||
|
||||
### Keeping Up-to-Date
|
||||
|
||||
Periodically, you should update your fork or personal repository to
|
||||
match the canonical ZF repository. Assuming you have setup your local repository
|
||||
per the instructions above, you can do the following:
|
||||
|
||||
|
||||
```console
|
||||
$ git checkout master
|
||||
$ git fetch origin
|
||||
$ git rebase origin/master
|
||||
# OPTIONALLY, to keep your remote up-to-date -
|
||||
$ git push {username} master:master
|
||||
```
|
||||
|
||||
If you're tracking other branches -- for example, the "develop" branch, where
|
||||
new feature development occurs -- you'll want to do the same operations for that
|
||||
branch; simply substitute "develop" for "master".
|
||||
|
||||
### Working on a patch
|
||||
|
||||
We recommend you do each new feature or bugfix in a new branch. This simplifies
|
||||
the task of code review as well as the task of merging your changes into the
|
||||
canonical repository.
|
||||
|
||||
A typical workflow will then consist of the following:
|
||||
|
||||
1. Create a new local branch based off either your master or develop branch.
|
||||
2. Switch to your new local branch. (This step can be combined with the
|
||||
previous step with the use of `git checkout -b`.)
|
||||
3. Do some work, commit, repeat as necessary.
|
||||
4. Push the local branch to your remote repository.
|
||||
5. Send a pull request.
|
||||
|
||||
The mechanics of this process are actually quite trivial. Below, we will
|
||||
create a branch for fixing an issue in the tracker.
|
||||
|
||||
```console
|
||||
$ git checkout -b hotfix/9295
|
||||
Switched to a new branch 'hotfix/9295'
|
||||
```
|
||||
|
||||
... do some work ...
|
||||
|
||||
|
||||
```console
|
||||
$ git commit
|
||||
```
|
||||
|
||||
... write your log message ...
|
||||
|
||||
|
||||
```console
|
||||
$ git push {username} hotfix/9295:hotfix/9295
|
||||
Counting objects: 38, done.
|
||||
Delta compression using up to 2 threads.
|
||||
Compression objects: 100% (18/18), done.
|
||||
Writing objects: 100% (20/20), 8.19KiB, done.
|
||||
Total 20 (delta 12), reused 0 (delta 0)
|
||||
To ssh://git@github.com/{username}/zend-uri.git
|
||||
b5583aa..4f51698 HEAD -> master
|
||||
```
|
||||
|
||||
To send a pull request, you have two options.
|
||||
|
||||
If using GitHub, you can do the pull request from there. Navigate to
|
||||
your repository, select the branch you just created, and then select the
|
||||
"Pull Request" button in the upper right. Select the user/organization
|
||||
"zendframework" as the recipient.
|
||||
|
||||
If using your own repository - or even if using GitHub - you can use `git
|
||||
format-patch` to create a patchset for us to apply; in fact, this is
|
||||
**recommended** for security-related patches. If you use `format-patch`, please
|
||||
send the patches as attachments to:
|
||||
|
||||
- zf-devteam@zend.com for patches without security implications
|
||||
- zf-security@zend.com for security patches
|
||||
|
||||
#### What branch to issue the pull request against?
|
||||
|
||||
Which branch should you issue a pull request against?
|
||||
|
||||
- For fixes against the stable release, issue the pull request against the
|
||||
"master" branch.
|
||||
- For new features, or fixes that introduce new elements to the public API (such
|
||||
as new public methods or properties), issue the pull request against the
|
||||
"develop" branch.
|
||||
|
||||
### Branch Cleanup
|
||||
|
||||
As you might imagine, if you are a frequent contributor, you'll start to
|
||||
get a ton of branches both locally and on your remote.
|
||||
|
||||
Once you know that your changes have been accepted to the master
|
||||
repository, we suggest doing some cleanup of these branches.
|
||||
|
||||
- Local branch cleanup
|
||||
|
||||
```console
|
||||
$ git branch -d <branchname>
|
||||
```
|
||||
|
||||
- Remote branch removal
|
||||
|
||||
```console
|
||||
$ git push {username} :<branchname>
|
||||
```
|
13
vendor/zendframework/zend-uri/LICENSE.md
vendored
13
vendor/zendframework/zend-uri/LICENSE.md
vendored
@@ -1,16 +1,15 @@
|
||||
Copyright (c) 2005-2015, Zend Technologies USA, Inc.
|
||||
|
||||
Copyright (c) 2005-2018, Zend Technologies USA, Inc.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
- Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
- Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
- Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
- Redistributions in binary form must reproduce the above copyright notice, this
|
||||
list of conditions and the following disclaimer in the documentation and/or
|
||||
other materials provided with the distribution.
|
||||
|
||||
- Neither the name of Zend Technologies USA, Inc. nor the names of its
|
||||
contributors may be used to endorse or promote products derived from this
|
||||
|
13
vendor/zendframework/zend-uri/README.md
vendored
13
vendor/zendframework/zend-uri/README.md
vendored
@@ -1,13 +1,12 @@
|
||||
# zend-uri
|
||||
|
||||
[](https://secure.travis-ci.org/zendframework/zend-uri)
|
||||
[](https://coveralls.io/r/zendframework/zend-uri?branch=master)
|
||||
|
||||
`Zend\Uri` is a component that aids in manipulating and validating Uniform
|
||||
Resource Identifiers ([URIs](http://www.ietf.org/rfc/rfc3986.txt)). `Zend\Uri`
|
||||
exists primarily to service other components, such as `Zend\Http`, but is also
|
||||
useful as a standalone utility.
|
||||
[](https://coveralls.io/github/zendframework/zend-uri?branch=master)
|
||||
|
||||
zend-uri aids in manipulating and validating Uniform Resource Identifiers
|
||||
([URIs](http://www.ietf.org/rfc/rfc3986.txt)). zend-uri exists primarily to
|
||||
assist other components, such as zend-http, but is also useful as a standalone
|
||||
utility.
|
||||
|
||||
- File issues at https://github.com/zendframework/zend-uri/issues
|
||||
- Documentation is at http://framework.zend.com/manual/current/en/index.html#zend-uri
|
||||
- Documentation is at https://docs.zendframework.com/zend-uri/
|
||||
|
55
vendor/zendframework/zend-uri/composer.json
vendored
55
vendor/zendframework/zend-uri/composer.json
vendored
@@ -1,35 +1,56 @@
|
||||
{
|
||||
"name": "zendframework/zend-uri",
|
||||
"description": "a component that aids in manipulating and validating \u00bb Uniform Resource Identifiers (URIs)",
|
||||
"description": "A component that aids in manipulating and validating \u00bb Uniform Resource Identifiers (URIs)",
|
||||
"license": "BSD-3-Clause",
|
||||
"keywords": [
|
||||
"zf2",
|
||||
"zf",
|
||||
"zendframework",
|
||||
"uri"
|
||||
],
|
||||
"homepage": "https://github.com/zendframework/zend-uri",
|
||||
"support": {
|
||||
"docs": "https://docs.zendframework.com/zend-uri/",
|
||||
"issues": "https://github.com/zendframework/zend-uri/issues",
|
||||
"source": "https://github.com/zendframework/zend-uri",
|
||||
"rss": "https://github.com/zendframework/zend-uri/releases.atom",
|
||||
"chat": "https://zendframework-slack.herokuapp.com",
|
||||
"forum": "https://discourse.zendframework.com/c/questions/components"
|
||||
},
|
||||
"require": {
|
||||
"php": "^5.6 || ^7.0",
|
||||
"zendframework/zend-escaper": "^2.5",
|
||||
"zendframework/zend-validator": "^2.10"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.4",
|
||||
"zendframework/zend-coding-standard": "~1.0.0"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Zend\\Uri\\": "src/"
|
||||
}
|
||||
},
|
||||
"require": {
|
||||
"php": "^5.5 || ^7.0",
|
||||
"zendframework/zend-escaper": "^2.5",
|
||||
"zendframework/zend-validator": "^2.5"
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.5-dev",
|
||||
"dev-develop": "2.6-dev"
|
||||
}
|
||||
},
|
||||
"autoload-dev": {
|
||||
"psr-4": {
|
||||
"ZendTest\\Uri\\": "test/"
|
||||
}
|
||||
},
|
||||
"require-dev": {
|
||||
"fabpot/php-cs-fixer": "1.7.*",
|
||||
"phpunit/PHPUnit": "~4.0"
|
||||
"config": {
|
||||
"sort-packages": true
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.6.x-dev",
|
||||
"dev-develop": "2.7.x-dev"
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"check": [
|
||||
"@cs-check",
|
||||
"@test"
|
||||
],
|
||||
"cs-check": "phpcs",
|
||||
"cs-fix": "phpcbf",
|
||||
"test": "phpunit --colors=always",
|
||||
"test-coverage": "phpunit --colors=always --coverage-clover clover.xml"
|
||||
}
|
||||
}
|
||||
|
@@ -1,10 +1,8 @@
|
||||
<?php
|
||||
/**
|
||||
* Zend Framework (http://framework.zend.com/)
|
||||
*
|
||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @see https://github.com/zendframework/zend-uri for the canonical source repository
|
||||
* @copyright Copyright (c) 2005-2018 Zend Technologies USA Inc. (https://www.zend.com)
|
||||
* @license https://github.com/zendframework/zend-uri/blob/master/LICENSE.md New BSD License
|
||||
*/
|
||||
|
||||
namespace Zend\Uri\Exception;
|
||||
|
@@ -1,10 +1,8 @@
|
||||
<?php
|
||||
/**
|
||||
* Zend Framework (http://framework.zend.com/)
|
||||
*
|
||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @see https://github.com/zendframework/zend-uri for the canonical source repository
|
||||
* @copyright Copyright (c) 2005-2018 Zend Technologies USA Inc. (https://www.zend.com)
|
||||
* @license https://github.com/zendframework/zend-uri/blob/master/LICENSE.md New BSD License
|
||||
*/
|
||||
|
||||
namespace Zend\Uri\Exception;
|
||||
|
@@ -1,10 +1,8 @@
|
||||
<?php
|
||||
/**
|
||||
* Zend Framework (http://framework.zend.com/)
|
||||
*
|
||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @see https://github.com/zendframework/zend-uri for the canonical source repository
|
||||
* @copyright Copyright (c) 2005-2018 Zend Technologies USA Inc. (https://www.zend.com)
|
||||
* @license https://github.com/zendframework/zend-uri/blob/master/LICENSE.md New BSD License
|
||||
*/
|
||||
|
||||
namespace Zend\Uri\Exception;
|
||||
|
@@ -1,10 +1,8 @@
|
||||
<?php
|
||||
/**
|
||||
* Zend Framework (http://framework.zend.com/)
|
||||
*
|
||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @see https://github.com/zendframework/zend-uri for the canonical source repository
|
||||
* @copyright Copyright (c) 2005-2018 Zend Technologies USA Inc. (https://www.zend.com)
|
||||
* @license https://github.com/zendframework/zend-uri/blob/master/LICENSE.md New BSD License
|
||||
*/
|
||||
|
||||
namespace Zend\Uri\Exception;
|
||||
|
8
vendor/zendframework/zend-uri/src/File.php
vendored
8
vendor/zendframework/zend-uri/src/File.php
vendored
@@ -1,10 +1,8 @@
|
||||
<?php
|
||||
/**
|
||||
* Zend Framework (http://framework.zend.com/)
|
||||
*
|
||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @see https://github.com/zendframework/zend-uri for the canonical source repository
|
||||
* @copyright Copyright (c) 2005-2018 Zend Technologies USA Inc. (https://www.zend.com)
|
||||
* @license https://github.com/zendframework/zend-uri/blob/master/LICENSE.md New BSD License
|
||||
*/
|
||||
|
||||
namespace Zend\Uri;
|
||||
|
8
vendor/zendframework/zend-uri/src/Http.php
vendored
8
vendor/zendframework/zend-uri/src/Http.php
vendored
@@ -1,10 +1,8 @@
|
||||
<?php
|
||||
/**
|
||||
* Zend Framework (http://framework.zend.com/)
|
||||
*
|
||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @see https://github.com/zendframework/zend-uri for the canonical source repository
|
||||
* @copyright Copyright (c) 2005-2018 Zend Technologies USA Inc. (https://www.zend.com)
|
||||
* @license https://github.com/zendframework/zend-uri/blob/master/LICENSE.md New BSD License
|
||||
*/
|
||||
|
||||
namespace Zend\Uri;
|
||||
|
8
vendor/zendframework/zend-uri/src/Mailto.php
vendored
8
vendor/zendframework/zend-uri/src/Mailto.php
vendored
@@ -1,10 +1,8 @@
|
||||
<?php
|
||||
/**
|
||||
* Zend Framework (http://framework.zend.com/)
|
||||
*
|
||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @see https://github.com/zendframework/zend-uri for the canonical source repository
|
||||
* @copyright Copyright (c) 2005-2018 Zend Technologies USA Inc. (https://www.zend.com)
|
||||
* @license https://github.com/zendframework/zend-uri/blob/master/LICENSE.md New BSD License
|
||||
*/
|
||||
|
||||
namespace Zend\Uri;
|
||||
|
44
vendor/zendframework/zend-uri/src/Uri.php
vendored
44
vendor/zendframework/zend-uri/src/Uri.php
vendored
@@ -1,10 +1,8 @@
|
||||
<?php
|
||||
/**
|
||||
* Zend Framework (http://framework.zend.com/)
|
||||
*
|
||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @see https://github.com/zendframework/zend-uri for the canonical source repository
|
||||
* @copyright Copyright (c) 2005-2018 Zend Technologies USA Inc. (https://www.zend.com)
|
||||
* @license https://github.com/zendframework/zend-uri/blob/master/LICENSE.md New BSD License
|
||||
*/
|
||||
|
||||
namespace Zend\Uri;
|
||||
@@ -315,7 +313,7 @@ class Uri implements UriInterface
|
||||
$this->setHost($authority);
|
||||
}
|
||||
|
||||
if (!$uri) {
|
||||
if (! $uri) {
|
||||
return $this;
|
||||
}
|
||||
|
||||
@@ -325,7 +323,7 @@ class Uri implements UriInterface
|
||||
$uri = substr($uri, strlen($match[0]));
|
||||
}
|
||||
|
||||
if (!$uri) {
|
||||
if (! $uri) {
|
||||
return $this;
|
||||
}
|
||||
|
||||
@@ -334,7 +332,7 @@ class Uri implements UriInterface
|
||||
$this->setQuery($match[1]);
|
||||
$uri = substr($uri, strlen($match[0]));
|
||||
}
|
||||
if (!$uri) {
|
||||
if (! $uri) {
|
||||
return $this;
|
||||
}
|
||||
|
||||
@@ -354,8 +352,8 @@ class Uri implements UriInterface
|
||||
*/
|
||||
public function toString()
|
||||
{
|
||||
if (!$this->isValid()) {
|
||||
if ($this->isAbsolute() || !$this->isValidRelative()) {
|
||||
if (! $this->isValid()) {
|
||||
if ($this->isAbsolute() || ! $this->isValidRelative()) {
|
||||
throw new Exception\InvalidUriException(
|
||||
'URI is not valid and cannot be converted into a string'
|
||||
);
|
||||
@@ -467,7 +465,7 @@ class Uri implements UriInterface
|
||||
|
||||
if (is_string($baseUri)) {
|
||||
$baseUri = new static($baseUri);
|
||||
} elseif (!$baseUri instanceof Uri) {
|
||||
} elseif (! $baseUri instanceof Uri) {
|
||||
throw new Exception\InvalidArgumentException(
|
||||
'Provided base URI must be a string or a Uri object'
|
||||
);
|
||||
@@ -479,16 +477,16 @@ class Uri implements UriInterface
|
||||
} else {
|
||||
$basePath = $baseUri->getPath();
|
||||
$relPath = $this->getPath();
|
||||
if (!$relPath) {
|
||||
if (! $relPath) {
|
||||
$this->setPath($basePath);
|
||||
if (!$this->getQuery()) {
|
||||
if (! $this->getQuery()) {
|
||||
$this->setQuery($baseUri->getQuery());
|
||||
}
|
||||
} else {
|
||||
if (substr($relPath, 0, 1) == '/') {
|
||||
$this->setPath(static::removePathDotSegments($relPath));
|
||||
} else {
|
||||
if ($baseUri->getHost() && !$basePath) {
|
||||
if ($baseUri->getHost() && ! $basePath) {
|
||||
$mergedPath = '/';
|
||||
} else {
|
||||
$mergedPath = substr($basePath, 0, strrpos($basePath, '/') + 1);
|
||||
@@ -570,7 +568,7 @@ class Uri implements UriInterface
|
||||
foreach ($matchingParts as $index => $segment) {
|
||||
// If we skip an index at any point, we have parent traversal, and
|
||||
// need to prepend the path accordingly
|
||||
if ($index && !isset($matchingParts[$index - 1])) {
|
||||
if ($index && ! isset($matchingParts[$index - 1])) {
|
||||
array_unshift($pathParts, '../');
|
||||
continue;
|
||||
}
|
||||
@@ -690,7 +688,7 @@ class Uri implements UriInterface
|
||||
*/
|
||||
public function setScheme($scheme)
|
||||
{
|
||||
if (($scheme !== null) && (!self::validateScheme($scheme))) {
|
||||
if (($scheme !== null) && (! self::validateScheme($scheme))) {
|
||||
throw new Exception\InvalidUriPartException(sprintf(
|
||||
'Scheme "%s" is not valid or is not accepted by %s',
|
||||
$scheme,
|
||||
@@ -738,7 +736,7 @@ class Uri implements UriInterface
|
||||
{
|
||||
if (($host !== '')
|
||||
&& ($host !== null)
|
||||
&& !self::validateHost($host, $this->validHostTypes)
|
||||
&& ! self::validateHost($host, $this->validHostTypes)
|
||||
) {
|
||||
throw new Exception\InvalidUriPartException(sprintf(
|
||||
'Host "%s" is not valid or is not accepted by %s',
|
||||
@@ -841,8 +839,8 @@ class Uri implements UriInterface
|
||||
*/
|
||||
public static function validateScheme($scheme)
|
||||
{
|
||||
if (!empty(static::$validSchemes)
|
||||
&& !in_array(strtolower($scheme), static::$validSchemes)
|
||||
if (! empty(static::$validSchemes)
|
||||
&& ! in_array(strtolower($scheme), static::$validSchemes)
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
@@ -972,7 +970,7 @@ class Uri implements UriInterface
|
||||
*/
|
||||
public static function encodeUserInfo($userInfo)
|
||||
{
|
||||
if (!is_string($userInfo)) {
|
||||
if (! is_string($userInfo)) {
|
||||
throw new Exception\InvalidArgumentException(sprintf(
|
||||
'Expecting a string, got %s',
|
||||
(is_object($userInfo) ? get_class($userInfo) : gettype($userInfo))
|
||||
@@ -1000,14 +998,14 @@ class Uri implements UriInterface
|
||||
*/
|
||||
public static function encodePath($path)
|
||||
{
|
||||
if (!is_string($path)) {
|
||||
if (! is_string($path)) {
|
||||
throw new Exception\InvalidArgumentException(sprintf(
|
||||
'Expecting a string, got %s',
|
||||
(is_object($path) ? get_class($path) : gettype($path))
|
||||
));
|
||||
}
|
||||
|
||||
$regex = '/(?:[^' . self::CHAR_UNRESERVED . ':@&=\+\$,\/;%]+|%(?![A-Fa-f0-9]{2}))/';
|
||||
$regex = '/(?:[^' . self::CHAR_UNRESERVED . ')(:@&=\+\$,\/;%]+|%(?![A-Fa-f0-9]{2}))/';
|
||||
$escaper = static::getEscaper();
|
||||
$replace = function ($match) use ($escaper) {
|
||||
return $escaper->escapeUrl($match[0]);
|
||||
@@ -1029,7 +1027,7 @@ class Uri implements UriInterface
|
||||
*/
|
||||
public static function encodeQueryFragment($input)
|
||||
{
|
||||
if (!is_string($input)) {
|
||||
if (! is_string($input)) {
|
||||
throw new Exception\InvalidArgumentException(sprintf(
|
||||
'Expecting a string, got %s',
|
||||
(is_object($input) ? get_class($input) : gettype($input))
|
||||
|
14
vendor/zendframework/zend-uri/src/UriFactory.php
vendored
14
vendor/zendframework/zend-uri/src/UriFactory.php
vendored
@@ -1,10 +1,8 @@
|
||||
<?php
|
||||
/**
|
||||
* Zend Framework (http://framework.zend.com/)
|
||||
*
|
||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @see https://github.com/zendframework/zend-uri for the canonical source repository
|
||||
* @copyright Copyright (c) 2005-2018 Zend Technologies USA Inc. (https://www.zend.com)
|
||||
* @license https://github.com/zendframework/zend-uri/blob/master/LICENSE.md New BSD License
|
||||
*/
|
||||
|
||||
namespace Zend\Uri;
|
||||
@@ -26,7 +24,7 @@ abstract class UriFactory
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected static $schemeClasses = [
|
||||
protected static $schemeClasses = [
|
||||
'http' => 'Zend\Uri\Http',
|
||||
'https' => 'Zend\Uri\Http',
|
||||
'mailto' => 'Zend\Uri\Mailto',
|
||||
@@ -87,7 +85,7 @@ abstract class UriFactory
|
||||
*/
|
||||
public static function factory($uriString, $defaultScheme = null)
|
||||
{
|
||||
if (!is_string($uriString)) {
|
||||
if (! is_string($uriString)) {
|
||||
throw new Exception\InvalidArgumentException(sprintf(
|
||||
'Expecting a string, received "%s"',
|
||||
(is_object($uriString) ? get_class($uriString) : gettype($uriString))
|
||||
@@ -96,7 +94,7 @@ abstract class UriFactory
|
||||
|
||||
$uri = new Uri($uriString);
|
||||
$scheme = strtolower($uri->getScheme());
|
||||
if (!$scheme && $defaultScheme) {
|
||||
if (! $scheme && $defaultScheme) {
|
||||
$scheme = $defaultScheme;
|
||||
}
|
||||
|
||||
|
@@ -1,10 +1,8 @@
|
||||
<?php
|
||||
/**
|
||||
* Zend Framework (http://framework.zend.com/)
|
||||
*
|
||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @see https://github.com/zendframework/zend-uri for the canonical source repository
|
||||
* @copyright Copyright (c) 2005-2018 Zend Technologies USA Inc. (https://www.zend.com)
|
||||
* @license https://github.com/zendframework/zend-uri/blob/master/LICENSE.md New BSD License
|
||||
*/
|
||||
|
||||
namespace Zend\Uri;
|
||||
|
Reference in New Issue
Block a user