Skip to content

fix PHPUnit 9 deprecations #288

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

Merged
merged 4 commits into from
Dec 12, 2019
Merged

Conversation

rvanlaak
Copy link
Contributor

@rvanlaak rvanlaak commented Dec 11, 2019

After #266 was merged tests still were failing. Found out this was because of deprecation warnings on PHPUnit. This PR fixes these deprecations on the test suite.

PHPStan is the only test that's failing. What about not running PHPStan on the /tests folder?

Copy link
Contributor

@Jean85 Jean85 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately those deprecations are not the cause of the CI failures, but I appreciate them anyway, if they do not make the CI fail under PHP 7.1 (due to PHPUnit 7.5).

OTOH, I do not want to disable the deprecation helper, and those will be fixed by getsentry/sentry-php#930, as said already in #266 (review)

So, please revert the PHPUnit config change. As for PHPStan, I'll take a stab at fixing those issues, I forgot to do it due to the early CI failures.

@@ -8,6 +8,9 @@
cacheResult="false"
processIsolation="true"
>
<php>
<env name="SYMFONY_DEPRECATIONS_HELPER" value="weak" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hard failure on Symfony deprecations is required: we cannot let this bundle start them, or we could flood Sentry with unuseful events.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was under the assumption that hereby we would ignore the indirect deprecations.

Yes, the direct deprecations on this bundle's code should definitely fail CI. Maybe change the mode then?

@Jean85 Jean85 mentioned this pull request Dec 12, 2019
Copy link
Contributor

@Jean85 Jean85 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI is finally green 👍 thanks.

I'll revert the change on the PHPUnit config and break it again, later.

@Jean85 Jean85 merged commit b74b49f into getsentry:master Dec 12, 2019
@rvanlaak rvanlaak deleted the phpunit9-deprecations branch December 13, 2019 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants