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
Labels
type/backward-compatibility Something will be/is intentionally broken

Comments

@ADmad
Copy link

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

@ADmad
Copy link
Author

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.

@sebastianbergmann
Copy link
Owner

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

@sebastianbergmann sebastianbergmann transferred this issue from sebastianbergmann/phpunit-documentation-english Aug 2, 2019
@sebastianbergmann sebastianbergmann added the type/backward-compatibility Something will be/is intentionally broken label Aug 2, 2019
@sebastianbergmann
Copy link
Owner

The removal of this functionality was not intentional.

@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

PHPUnit 8.3.1 has been released with a fix for this.

@ADmad
Copy link
Author

ADmad commented Aug 2, 2019

Thank you.

@sebastianbergmann
Copy link
Owner

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

@ADmad
Copy link
Author

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?

@sebastianbergmann
Copy link
Owner

It has already been removed.

@ADmad
Copy link
Author

ADmad commented Aug 2, 2019

Oh good, sorry I didn't notice.

@ADmad
Copy link
Author

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.

@sebastianbergmann
Copy link
Owner

@ADmad
Copy link
Author

ADmad commented Aug 2, 2019

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

@ADmad
Copy link
Author

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.

@sebastianbergmann
Copy link
Owner

PHPUnit 8.3.2 has been released with a fix for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/backward-compatibility Something will be/is intentionally broken
Projects
None yet
Development

No branches or pull requests

2 participants