Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GoAOP deprecated StreamMetaData->source #146

Closed
bl-cp opened this issue Feb 12, 2018 · 9 comments
Closed

GoAOP deprecated StreamMetaData->source #146

bl-cp opened this issue Feb 12, 2018 · 9 comments
Labels

Comments

@bl-cp
Copy link

bl-cp commented Feb 12, 2018

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

@sonicoder86
Copy link

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.

@lisachenko
Copy link
Contributor

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.

@ddinchev
Copy link
Contributor

ddinchev commented Feb 19, 2018

For me, the cacheDir is set, however, I do get these errors and the code generated in my cache directories has syntax errors.

@yamamoto-hiroya
Copy link

yamamoto-hiroya commented Mar 6, 2018

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"

@JoeVieira
Copy link

I put a PR up to force the goaop version -- lets see how that goes over.

@sonicoder86
Copy link

sonicoder86 commented Mar 20, 2018

@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.

@Gasol
Copy link

Gasol commented Mar 26, 2018

Please release for version 2, Some people will have issue about upgrade to version 3, because of PHPUnit 6 and PHP 7 compatibility.

@DavertMik
Copy link
Member

Ok, I updated internal mocking engine to PHPUnit 6 so I made 3.0 release.
I will try to get 2.x release too

@DavertMik
Copy link
Member

2.2.0 is also released
https://github.com/Codeception/AspectMock/releases/tag/2.2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants