diff --git a/TokenReflection/ReflectionConstant.php b/TokenReflection/ReflectionConstant.php index 4dc39672..71867649 100644 --- a/TokenReflection/ReflectionConstant.php +++ b/TokenReflection/ReflectionConstant.php @@ -358,6 +358,12 @@ private function parseValue(Stream $tokenStream, IReflection $parent) T_NS_C => true, T_TRAIT_C => true ); + + if ( floatval(phpversion()) >= 5.6 ) { + $acceptedTokens['['] = true; + $acceptedTokens[']'] = true; + $acceptedTokens[T_DOUBLE_ARROW] = true; + } while (null !== ($type = $tokenStream->getType())) { if (T_START_HEREDOC === $type) { diff --git a/composer.json b/composer.json index 1569e612..63a2e6b2 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,11 @@ "homepage": "https://github.com/kukulich" } ], - + + "replace": { + "andrewsville/php-token-reflection": "1.*" + }, + "require": { "php": ">=5.3.0", "ext-tokenizer": "*"