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

PHP errors, notices, etc. cannot be tested anymore with PHPUnit 8.3 #3774

Closed
ADmad opened this issue Aug 2, 2019 · 15 comments
Closed

PHP errors, notices, etc. cannot be tested anymore with PHPUnit 8.3 #3774

ADmad opened this issue Aug 2, 2019 · 15 comments

Comments

@ADmad
Copy link

@ADmad ADmad commented Aug 2, 2019

Q A
PHPUnit version 8.3.0
PHP version N/A
Installation Method Composer / PHAR

Class PHPUnit\Framework\Error\Error has been removed in 8.3.0.

The removed class was marked as @internal but the Testing PHP Errors mentions uses of that class. So what's the alternative?

Docs for 8.3 don't seem to be up yet.

@sebastianbergmann sebastianbergmann transferred this issue from sebastianbergmann/phpunit Aug 2, 2019
@sebastianbergmann
Copy link
Owner

@sebastianbergmann sebastianbergmann commented Aug 2, 2019

Loading

@ADmad
Copy link
Author

@ADmad ADmad commented Aug 2, 2019

So I presume the 8.3 docs have been will be updated to show the alternative way?

It's still unfortunate that 8.2 docs show the use of internal class and then it's removed in 8.3 causing test suites of users to break. If 8.2 docd has warned about used of internal classes people could have tried to fix the issue before hand or hold off using 8.3.

Loading

@sebastianbergmann
Copy link
Owner

@sebastianbergmann sebastianbergmann commented Aug 2, 2019

The documentation for PHPUnit 8.3 is 1) not updated to reflect this and 2) is not published yet.

Loading

@sebastianbergmann sebastianbergmann transferred this issue from sebastianbergmann/phpunit-documentation-english Aug 2, 2019
@sebastianbergmann
Copy link
Owner

@sebastianbergmann sebastianbergmann commented Aug 2, 2019

The removal of this functionality was not intentional.

Loading

@sebastianbergmann sebastianbergmann changed the title Docs for testing for PHP errors/warnings need to be updated PHP errors, notices, etc. cannot be tested anymore with PHPUnit 8.3 Aug 2, 2019
@sebastianbergmann
Copy link
Owner

@sebastianbergmann sebastianbergmann commented Aug 2, 2019

PHPUnit 8.3.1 has been released with a fix for this.

Loading

@ADmad
Copy link
Author

@ADmad ADmad commented Aug 2, 2019

Thank you.

Loading

@sebastianbergmann
Copy link
Owner

@sebastianbergmann sebastianbergmann commented Aug 2, 2019

No, thank you for bringing this to my attention :-)

Loading

@ADmad
Copy link
Author

@ADmad ADmad commented Aug 2, 2019

I had no choice when our test suite broke 😝.

I initially thought it was our fault for using classes marked as @internal only to realize that is the documented way.

So maybe the @internal tag should be removed?

Loading

@sebastianbergmann
Copy link
Owner

@sebastianbergmann sebastianbergmann commented Aug 2, 2019

It has already been removed.

Loading

@ADmad
Copy link
Author

@ADmad ADmad commented Aug 2, 2019

Oh good, sorry I didn't notice.

Loading

@ADmad
Copy link
Author

@ADmad ADmad commented Aug 2, 2019

Umm it's still present

* @internal This class is not covered by the backward compatibility promise for PHPUnit

In other error classes too.

Loading

@sebastianbergmann
Copy link
Owner

@sebastianbergmann sebastianbergmann commented Aug 2, 2019

Loading

@ADmad
Copy link
Author

@ADmad ADmad commented Aug 2, 2019

I checked the 8.3.1 tag, I guess you removed if after tagging :).

Loading

@ADmad
Copy link
Author

@ADmad ADmad commented Aug 2, 2019

In 8.3.1 you added class PHPUnit\Framework\Error\Deprecation but that class is named PHPUnit\Framework\Error\Deprecated in 8.2.

Loading

@sebastianbergmann
Copy link
Owner

@sebastianbergmann sebastianbergmann commented Aug 2, 2019

PHPUnit 8.3.2 has been released with a fix for this.

Loading

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

Successfully merging a pull request may close this issue.

None yet
2 participants