Skip to content

Commit

Permalink
Bump nikic/php-parser from 4.3.0 to 4.10.4
Browse files Browse the repository at this point in the history
Bumps [nikic/php-parser](https://github.com/nikic/PHP-Parser) from 4.3.0 to 4.10.4.
- [Release notes](https://github.com/nikic/PHP-Parser/releases)
- [Changelog](https://github.com/nikic/PHP-Parser/blob/master/CHANGELOG.md)
- [Commits](nikic/PHP-Parser@v4.3.0...v4.10.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
  • Loading branch information
dependabot-preview[bot] authored and ChristophWurst committed Dec 29, 2020
1 parent f5579b1 commit 453f037
Show file tree
Hide file tree
Showing 47 changed files with 2,992 additions and 2,353 deletions.
20 changes: 12 additions & 8 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions composer/InstalledVersions.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class InstalledVersions
'aliases' =>
array (
),
'reference' => '1c9341631508ff217c3ebec6b64a97eb1137248c',
'reference' => '9ad31ea3d2fa3d88123b8af2692322892a17b4d4',
'name' => 'nextcloud/3rdparty',
),
'versions' =>
Expand Down Expand Up @@ -284,7 +284,7 @@ class InstalledVersions
'aliases' =>
array (
),
'reference' => '1c9341631508ff217c3ebec6b64a97eb1137248c',
'reference' => '9ad31ea3d2fa3d88123b8af2692322892a17b4d4',
),
'nextcloud/lognormalizer' =>
array (
Expand All @@ -297,12 +297,12 @@ class InstalledVersions
),
'nikic/php-parser' =>
array (
'pretty_version' => 'v4.3.0',
'version' => '4.3.0.0',
'pretty_version' => 'v4.10.4',
'version' => '4.10.4.0',
'aliases' =>
array (
),
'reference' => '9a9981c347c5c49d6dfe5cf826bb882b824080dc',
'reference' => 'c6d052fc58cb876152f89f532b95a8d7907e7f0e',
),
'opis/closure' =>
array (
Expand Down
1 change: 0 additions & 1 deletion composer/autoload_classmap.php
Original file line number Diff line number Diff line change
Expand Up @@ -1790,7 +1790,6 @@
'PhpParser\\Lexer\\TokenEmulator\\CoaleseEqualTokenEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/CoaleseEqualTokenEmulator.php',
'PhpParser\\Lexer\\TokenEmulator\\FnTokenEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/FnTokenEmulator.php',
'PhpParser\\Lexer\\TokenEmulator\\NumericLiteralSeparatorEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/NumericLiteralSeparatorEmulator.php',
'PhpParser\\Lexer\\TokenEmulator\\TokenEmulatorInterface' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/TokenEmulatorInterface.php',
'PhpParser\\NameContext' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NameContext.php',
'PhpParser\\Node' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node.php',
'PhpParser\\NodeAbstract' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeAbstract.php',
Expand Down
1 change: 0 additions & 1 deletion composer/autoload_static.php
Original file line number Diff line number Diff line change
Expand Up @@ -2286,7 +2286,6 @@ class ComposerStaticInit2f23f73bc0cc116b4b1eee1521aa8652
'PhpParser\\Lexer\\TokenEmulator\\CoaleseEqualTokenEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/CoaleseEqualTokenEmulator.php',
'PhpParser\\Lexer\\TokenEmulator\\FnTokenEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/FnTokenEmulator.php',
'PhpParser\\Lexer\\TokenEmulator\\NumericLiteralSeparatorEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/NumericLiteralSeparatorEmulator.php',
'PhpParser\\Lexer\\TokenEmulator\\TokenEmulatorInterface' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/TokenEmulatorInterface.php',
'PhpParser\\NameContext' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NameContext.php',
'PhpParser\\Node' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node.php',
'PhpParser\\NodeAbstract' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeAbstract.php',
Expand Down
22 changes: 13 additions & 9 deletions composer/installed.json
Original file line number Diff line number Diff line change
Expand Up @@ -1836,35 +1836,35 @@
},
{
"name": "nikic/php-parser",
"version": "v4.3.0",
"version_normalized": "4.3.0.0",
"version": "v4.10.4",
"version_normalized": "4.10.4.0",
"source": {
"type": "git",
"url": "https://github.com/nikic/PHP-Parser.git",
"reference": "9a9981c347c5c49d6dfe5cf826bb882b824080dc"
"reference": "c6d052fc58cb876152f89f532b95a8d7907e7f0e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/9a9981c347c5c49d6dfe5cf826bb882b824080dc",
"reference": "9a9981c347c5c49d6dfe5cf826bb882b824080dc",
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/c6d052fc58cb876152f89f532b95a8d7907e7f0e",
"reference": "c6d052fc58cb876152f89f532b95a8d7907e7f0e",
"shasum": ""
},
"require": {
"ext-tokenizer": "*",
"php": ">=7.0"
},
"require-dev": {
"ircmaxell/php-yacc": "0.0.5",
"phpunit/phpunit": "^6.5 || ^7.0 || ^8.0"
"ircmaxell/php-yacc": "^0.0.7",
"phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0"
},
"time": "2019-11-08T13:50:10+00:00",
"time": "2020-12-20T10:01:03+00:00",
"bin": [
"bin/php-parse"
],
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.3-dev"
"dev-master": "4.9-dev"
}
},
"installation-source": "dist",
Expand All @@ -1887,6 +1887,10 @@
"parser",
"php"
],
"support": {
"issues": "https://github.com/nikic/PHP-Parser/issues",
"source": "https://github.com/nikic/PHP-Parser/tree/v4.10.4"
},
"install-path": "../nikic/php-parser"
},
{
Expand Down
10 changes: 5 additions & 5 deletions composer/installed.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
'aliases' =>
array (
),
'reference' => '1c9341631508ff217c3ebec6b64a97eb1137248c',
'reference' => '9ad31ea3d2fa3d88123b8af2692322892a17b4d4',
'name' => 'nextcloud/3rdparty',
),
'versions' =>
Expand Down Expand Up @@ -261,7 +261,7 @@
'aliases' =>
array (
),
'reference' => '1c9341631508ff217c3ebec6b64a97eb1137248c',
'reference' => '9ad31ea3d2fa3d88123b8af2692322892a17b4d4',
),
'nextcloud/lognormalizer' =>
array (
Expand All @@ -274,12 +274,12 @@
),
'nikic/php-parser' =>
array (
'pretty_version' => 'v4.3.0',
'version' => '4.3.0.0',
'pretty_version' => 'v4.10.4',
'version' => '4.10.4.0',
'aliases' =>
array (
),
'reference' => '9a9981c347c5c49d6dfe5cf826bb882b824080dc',
'reference' => 'c6d052fc58cb876152f89f532b95a8d7907e7f0e',
),
'opis/closure' =>
array (
Expand Down
8 changes: 0 additions & 8 deletions nikic/php-parser/.gitattributes

This file was deleted.

44 changes: 21 additions & 23 deletions nikic/php-parser/LICENSE
Original file line number Diff line number Diff line change
@@ -1,31 +1,29 @@
Copyright (c) 2011-2018 by Nikita Popov.
BSD 3-Clause License

Some rights reserved.
Copyright (c) 2011, Nikita Popov
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
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.
1. 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.
2. 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.

* The names of the contributors may not be used to endorse or
promote products derived from this software without specific
prior written permission.
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4 changes: 2 additions & 2 deletions nikic/php-parser/lib/PhpParser/Builder/Param.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public function setDefault($value) {
/**
* Sets type for the parameter.
*
* @param string|Node\Name|Node\NullableType $type Parameter type
* @param string|Node\Name|Node\NullableType|Node\UnionType $type Parameter type
*
* @return $this The builder instance (for fluid interface)
*/
Expand All @@ -60,7 +60,7 @@ public function setType($type) {
/**
* Sets type for the parameter.
*
* @param string|Node\Name|Node\NullableType $type Parameter type
* @param string|Node\Name|Node\NullableType|Node\UnionType $type Parameter type
*
* @return $this The builder instance (for fluid interface)
*
Expand Down
22 changes: 15 additions & 7 deletions nikic/php-parser/lib/PhpParser/BuilderHelpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use PhpParser\Node\NullableType;
use PhpParser\Node\Scalar;
use PhpParser\Node\Stmt;
use PhpParser\Node\UnionType;

/**
* This class defines helpers used in the implementation of builders. Don't use it directly.
Expand Down Expand Up @@ -158,16 +159,19 @@ private static function normalizeNameCommon($name, bool $allowExpr) {
* In particular, builtin types become Identifiers, custom types become Names and nullables
* are wrapped in NullableType nodes.
*
* @param string|Name|Identifier|NullableType $type The type to normalize
* @param string|Name|Identifier|NullableType|UnionType $type The type to normalize
*
* @return Name|Identifier|NullableType The normalized type
* @return Name|Identifier|NullableType|UnionType The normalized type
*/
public static function normalizeType($type) {
if (!is_string($type)) {
if (!$type instanceof Name && !$type instanceof Identifier
&& !$type instanceof NullableType) {
if (
!$type instanceof Name && !$type instanceof Identifier &&
!$type instanceof NullableType && !$type instanceof UnionType
) {
throw new \LogicException(
'Type must be a string, or an instance of Name, Identifier or NullableType');
'Type must be a string, or an instance of Name, Identifier, NullableType or UnionType'
);
}
return $type;
}
Expand All @@ -179,7 +183,7 @@ public static function normalizeType($type) {
}

$builtinTypes = [
'array', 'callable', 'string', 'int', 'float', 'bool', 'iterable', 'void', 'object'
'array', 'callable', 'string', 'int', 'float', 'bool', 'iterable', 'void', 'object', 'mixed'
];

$lowerType = strtolower($type);
Expand All @@ -193,7 +197,11 @@ public static function normalizeType($type) {
throw new \LogicException('void type cannot be nullable');
}

return $nullable ? new Node\NullableType($type) : $type;
if ($nullable && (string) $type === 'mixed') {
throw new \LogicException('mixed type cannot be nullable');
}

return $nullable ? new NullableType($type) : $type;
}

/**
Expand Down
Loading

0 comments on commit 453f037

Please sign in to comment.