-
Notifications
You must be signed in to change notification settings - Fork 129
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
don't let GoAOP upgrade #149
Conversation
…& would require a lot of updates to AspectMock to fix.
So this fails travis, because it seems that phpunit, etc isn't a composer requirement? Please advise how I can address the failure, I'd love to make sure this project is kept stable and maintained. Happy to help in anyway. |
@JoeVieira Hi, maybe it will be better to find out, why AspectMock won't work anymore with GoAOP 2.2? I think it's more correct way, because master version of GoAOP (aka 3.x) is based on 2.2.0 version. So, you will lock all new updates and fixes in base dependency. I have a guess, that this is due to the old format of transformer class. New version of transformers should return status about transformation whether current file was processed or not, or it has changes, but they could be dropped if all other transformers vote to keep file as-is. Here is a line: https://github.com/Codeception/AspectMock/blob/master/src/AspectMock/Intercept/BeforeMockTransformer.php#L90 And here are result codes that transformers should return now: https://github.com/Codeception/AspectMock/blob/master/src/AspectMock/Intercept/BeforeMockTransformer.php#L90 Probably returning |
@lisachenko I agree about that, but from the comments in GoAOP regarding this, it seemed to indicate that there was still a state of flux around the AST transformations, so I didn't want to embark on a refactor without that being solidified. Especially as the public interface is what has changed in GoAOP. As I said in the description of the PR, I think this is just a hack, and I'll be happy to fix it correctly, once GoAOP has the public interface to StreamMetaData settled out. i.e setSource isn't adjusting the AST, which you've got marked as a todo: https://github.com/goaop/framework/blob/master/src/Instrument/Transformer/StreamMetaData.php#L154 FYI: Your examples referenced the same two lines. |
@DavertMik or anyone else have thoughts on this? AspectMock is currently broken due to this issue. |
@JoeVieira - I've just encountered this issue, and resolved it by modifying my own devDependencies in my project's composer file (not the AspectMock one). Including your change before the include for AspectMock resolves this, as the version your change suggests is also covered by AspectMock's composer file. |
I have submitted PR with update to the newest GoAOP, please check it in #150 |
Yes, PR #150 accepted, a new version is about to be released |
This PR is a proposal to limit the updating of goaop/framework so that the AST streaming issues
which are not totally resolved in 2.2.
I'd be happy to fix this the "right way" with AOP tokenStreams, but it doesn't look like that code has settled down yet in 2.2, so it seems like wasted effort.