GoAOP deprecated StreamMetaData->source
bl-cp opened this issue · comments
After upgrading goaop/framework to 2.2.0 I get deprecation warning during cache generation, also the cache is not really generated, just the folder is created. This causes that doubles don't work after the first run while the folder is there.
Downgrading to goaop/framework 2.1.2 everything works again as it should.
I get this error during cache generation:
Deprecated: Setting StreamMetaData->source is deprecated, use tokenStream instead in vendor/goaop/framework/src/Instrument/Transformer/StreamMetaData.php on line 132
codeception/aspect-mock 2.1.1 Experimental Mocking Framework powered by Aspects
codeception/codeception 2.3.6 BDD-style testing framework
goaop/framework 2.2.0 Framework for aspect-oriented programming in PHP.
goaop/parser-reflection 1.4.0 Provides reflection information, based on raw source
We used it without cacheDir
not set, but now it throws an error with goaop/framework 2.2.0
.
After setting the directory we experience the same error.
Issue for tracking: goaop/framework#363.
Since 2.2.0 cache directory is required indeed. This was intended change, because of complexity of transformers and low speed of testing/development.
For AspectMock I can advise to use virtual file system and pass vfs directory as cacheDir
. Question regarding StreamMetaData->source
is valid, not sure why it isn't work as expected, I'll have a look and release patch for that if bug is present.
For me, the cacheDir
is set, however, I do get these errors and the code generated in my cache directories has syntax errors.
I have the error too.
"goaop/framework": "2.1.1"
I downgraded this, but this error had occurred.
PHP Parse error: syntax error, unexpected '$class' (T_VARIABLE), expecting '(' in /vagrant/fuel/core/classes/autoloader.php on line 177
Please tell me causes and solutions.
"php": "7.1.*",
"fuel/core": "1.8.*",
"phpunit/phpunit": "6.5.*",
"codeception/aspect-mock": "*",
"goaop/framework": "2.1.1"
I put a PR up to force the goaop version -- lets see how that goes over.
@DavertMik can you make a release out of this fix? The fix is merged to master, but no release = still crashes and issue is closed.
Please release for version 2, Some people will have issue about upgrade to version 3, because of PHPUnit 6 and PHP 7 compatibility.
Ok, I updated internal mocking engine to PHPUnit 6 so I made 3.0 release.
I will try to get 2.x release too
2.2.0 is also released
https://github.com/Codeception/AspectMock/releases/tag/2.2.0