You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here there is the stack trace by "debug_print_backtrace"
#0 include() called at ['...'/vendor/goaop/framework/src/Instrument/ClassLoading/AopComposerLoader.php:97] #1 Go\Instrument\ClassLoading\AopComposerLoader->loadClass(PHP_Token) #2 spl_autoload_call(PHP_Token) #3 class_exists(PHP_Token) called at ['...'/vendor/phpunit/phpunit/src/Util/Blacklist.php:91] #4 PHPUnit_Util_Blacklist->initialize() called at ['...'/vendor/phpunit/phpunit/src/Util/Blacklist.php:58] #5 PHPUnit_Util_Blacklist->getBlacklistedDirectories() called at ['...'/vendor/phpunit/phpunit/src/TextUI/TestRunner.php:1055] #6 PHPUnit_TextUI_TestRunner->getCodeCoverageFilter() called at ['...'/vendor/phpunit/phpunit/src/TextUI/TestRunner.php:64] #7 PHPUnit_TextUI_TestRunner->__construct() called at ['...'/vendor/phpunit/phpunit/src/TextUI/Command.php:178] #8 PHPUnit_TextUI_Command->createRunner() called at ['...'/vendor/phpunit/phpunit/src/TextUI/Command.php:113] #9 PHPUnit_TextUI_Command->run(Array ([0] => ./bin/phpunit,[1] => tests/app/Lib/Aspects/BrokerTest.php), 1) called at ['...'/vendor/phpunit/phpunit/src/TextUI/Command.php:100] #10 PHPUnit_TextUI_Command::main() called at ['...'/vendor/phpunit/phpunit/phpunit:47]
PHPUnit 4.8.20 by Sebastian Bergmann and contributors.
Hello, sorry for the late response, I'm working hard now on my main job.
From the provided trace and exception message I can guess, that you are using PHP5.6 or PHP7 language syntax features and underlying andrewsville/php-token-reflection library which is not maintained now can and not handle this new PHP syntax.
I'm working on goaop/parser-reflection library, which will be compatible with PHP5.6 and PHP7, after that I will migrate my framework on it and release a new version for that.
To avoid such errors, try to exclude all directories where aspect should not be applied (e.g. vendor directory) and whitelist only source directory for your project (e.g. src directory). This will help you to skip source code analysis for external project files.
Hello,
I already tried your suggested solution but did not work since Laravel TestCase massively uses Traits.
I'm looking forward to try your next effort.
Here there is the stack trace by "debug_print_backtrace"
#0 include() called at ['...'/vendor/goaop/framework/src/Instrument/ClassLoading/AopComposerLoader.php:97]
#1 Go\Instrument\ClassLoading\AopComposerLoader->loadClass(PHP_Token)
#2 spl_autoload_call(PHP_Token)
#3 class_exists(PHP_Token) called at ['...'/vendor/phpunit/phpunit/src/Util/Blacklist.php:91]
#4 PHPUnit_Util_Blacklist->initialize() called at ['...'/vendor/phpunit/phpunit/src/Util/Blacklist.php:58]
#5 PHPUnit_Util_Blacklist->getBlacklistedDirectories() called at ['...'/vendor/phpunit/phpunit/src/TextUI/TestRunner.php:1055]
#6 PHPUnit_TextUI_TestRunner->getCodeCoverageFilter() called at ['...'/vendor/phpunit/phpunit/src/TextUI/TestRunner.php:64]
#7 PHPUnit_TextUI_TestRunner->__construct() called at ['...'/vendor/phpunit/phpunit/src/TextUI/Command.php:178]
#8 PHPUnit_TextUI_Command->createRunner() called at ['...'/vendor/phpunit/phpunit/src/TextUI/Command.php:113]
#9 PHPUnit_TextUI_Command->run(Array ([0] => ./bin/phpunit,[1] => tests/app/Lib/Aspects/BrokerTest.php), 1) called at ['...'/vendor/phpunit/phpunit/src/TextUI/Command.php:100]
#10 PHPUnit_TextUI_Command::main() called at ['...'/vendor/phpunit/phpunit/phpunit:47]
PHPUnit 4.8.20 by Sebastian Bergmann and contributors.
EE
Time: 11.16 seconds, Memory: 29.75Mb
There were 2 errors:
TokenReflection\Exception\ParseException: Unexpected token found.
'...'/vendor/andrewsville/php-token-reflection/TokenReflection/ReflectionClass.php:1678
'...'/vendor/andrewsville/php-token-reflection/TokenReflection/ReflectionClass.php:1622
'...'/vendor/andrewsville/php-token-reflection/TokenReflection/ReflectionElement.php:121
'...'/vendor/andrewsville/php-token-reflection/TokenReflection/ReflectionBase.php:73
'...'/vendor/andrewsville/php-token-reflection/TokenReflection/ReflectionElement.php:104
'...'/vendor/andrewsville/php-token-reflection/TokenReflection/ReflectionFileNamespace.php:299
'...'/vendor/andrewsville/php-token-reflection/TokenReflection/ReflectionElement.php:122
'...'/vendor/andrewsville/php-token-reflection/TokenReflection/ReflectionBase.php:73
'...'/vendor/andrewsville/php-token-reflection/TokenReflection/ReflectionElement.php:104
'...'/vendor/andrewsville/php-token-reflection/TokenReflection/ReflectionFile.php:120
'...'/vendor/andrewsville/php-token-reflection/TokenReflection/ReflectionBase.php:73
'...'/vendor/andrewsville/php-token-reflection/TokenReflection/Broker.php:168
'...'/vendor/goaop/framework/src/Instrument/Transformer/WeavingTransformer.php:91
'...'/vendor/goaop/framework/src/Instrument/Transformer/CachingTransformer.php:127
'...'/vendor/goaop/framework/src/Instrument/Transformer/CachingTransformer.php:106
'...'/vendor/goaop/framework/src/Instrument/ClassLoading/SourceTransformingLoader.php:146
'...'/vendor/goaop/framework/src/Instrument/ClassLoading/SourceTransformingLoader.php:102
'...'/tests/TestCase.php:12
'...'/tests/TestCase.php:12
'...'/vendor/laravel/lumen-framework/src/Testing/ApplicationTrait.php:35
'...'/vendor/laravel/lumen-framework/src/Testing/TestCase.php:43
TokenReflection\Exception\ParseException: Unexpected token found.
'...'/vendor/andrewsville/php-token-reflection/TokenReflection/ReflectionClass.php:1678
'...'/vendor/andrewsville/php-token-reflection/TokenReflection/ReflectionClass.php:1622
'...'/vendor/andrewsville/php-token-reflection/TokenReflection/ReflectionElement.php:121
'...'/vendor/andrewsville/php-token-reflection/TokenReflection/ReflectionBase.php:73
'...'/vendor/andrewsville/php-token-reflection/TokenReflection/ReflectionElement.php:104
'...'/vendor/andrewsville/php-token-reflection/TokenReflection/ReflectionFileNamespace.php:299
'...'/vendor/andrewsville/php-token-reflection/TokenReflection/ReflectionElement.php:122
'...'/vendor/andrewsville/php-token-reflection/TokenReflection/ReflectionBase.php:73
'...'/vendor/andrewsville/php-token-reflection/TokenReflection/ReflectionElement.php:104
'...'/vendor/andrewsville/php-token-reflection/TokenReflection/ReflectionFile.php:120
'...'/vendor/andrewsville/php-token-reflection/TokenReflection/ReflectionBase.php:73
'...'/vendor/andrewsville/php-token-reflection/TokenReflection/Broker.php:168
'...'/vendor/goaop/framework/src/Instrument/Transformer/WeavingTransformer.php:91
'...'/vendor/goaop/framework/src/Instrument/Transformer/CachingTransformer.php:127
'...'/vendor/goaop/framework/src/Instrument/Transformer/CachingTransformer.php:106
'...'/vendor/goaop/framework/src/Instrument/ClassLoading/SourceTransformingLoader.php:146
'...'/vendor/goaop/framework/src/Instrument/ClassLoading/SourceTransformingLoader.php:102
'...'/tests/TestCase.php:12
'...'/tests/TestCase.php:12
'...'/vendor/laravel/lumen-framework/src/Testing/ApplicationTrait.php:35
'...'/vendor/laravel/lumen-framework/src/Testing/TestCase.php:43
FAILURES!
Tests: 2, Assertions: 0, Errors: 2.
The text was updated successfully, but these errors were encountered: