-
Notifications
You must be signed in to change notification settings - Fork 15
The PHPUnit\Framework\TestCase::prophesize
method not polyfilled
#62
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
Comments
@aik099 Thanks for opening an issue about this. Unfortunately, I don't see a straight forward way to solve this from within the PHPUnit Polyfills library as the same Composer restrictions apply. As far as I know, Composer does not have an option to conditionally install a package based on the PHP version, so the PHPUnit Polyfills library can't (conditionally) require it either. The only thing I can currently think of - and this is quite hacky - is to have a conditional The only thing the Polyfills could do is provide a The only other thing I can think of, would be for the Ideas/suggestions/PRs for solutions welcome.... @Seldaek @sebastianbergmann Would you happen to have any bright ideas on this subject ? |
@stof, any way to make https://github.com/phpspec/prophecy-phpunit work on other PHP versions? |
@stof FYI and if it helps, we did something similar to what I propose above for the For reference: If you think a similar solution would be acceptable for |
Sorry i don't see a better way than what you suggested above. |
@Seldaek Thanks Jordi for giving this a look-over! |
FYI: I've prepared all the necessary changes. I can start pulling them once I get a response to phpspec/prophecy-phpunit#34 |
@jrfnl , the phpspec/prophecy-phpunit#34 is merged now. You can send PR with autoloader now. Thank you. |
@aik I'm waiting for the follow-up PRs to be merged (step by step) - also see: phpspec/prophecy-phpunit#35 (comment) |
Alternatively, I could put those back in draft and pull them after the PR addressing this issue, but that's up to @stof. The currently open PRs are very minor small changes, so should be easy merges. |
The currently opened PRs are not at all a blocker for that change anyway (bumping the min prophecy version does not impact the definition of the trait at all for instance). So you should be able to create the PR. |
I'll do some rebasing tomorrow, as, as I said before, the PRs make changes in the same files, so will be creating conflicts when pulled at the same time. Guess I'll just keep recreating commits and rebasing :-/ |
do not wait, I am the wrong "aik" :) @aik099 probably is. |
@aik Apologies and thanks for letting me know ❤️ |
@stof @aik099 FYI: the PR has now been pulled - see phpspec/prophecy-phpunit#38 |
I'm going to close this issue as this is not something which I intend to solve in the polyfills (forward compatibility vs backward compatibility). The PR to https://github.com/phpspec/prophecy-phpunit is (still) open and if it would be merged, I'll happily link to it from the readme of this package, but other than that, there is nothing to be done here. |
Since PHP 7.3 I'm seeing this warning:
I can't just require
phpspec/prophecy-phpunit
in thecomposer.json
and use the trait it provides, because package itself won't even connect in PHP 7.2 and smaller versions.The text was updated successfully, but these errors were encountered: