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

Silence deprecations by default #662

Merged
merged 1 commit into from Aug 29, 2015
Merged

Conversation

stof
Copy link
Member

@stof stof commented Aug 29, 2015

This follows the Symfony convention to make our deprecation warning less invasive (PHPUnit and Behat are both triggering exceptions on deprecation errors by default, thus breaking the BC layers).
Such deprecations warnings can be logged when using the Symfony error handler or the Symfony PHPUnit bridge (or other tools implementing the same convention).

There is no such tool for Behat yet, but this is on my TODO list.

This follows the Symfony convention to make our deprecation warning less
invasive (PHPUnit and Behat are both triggering exceptions on
deprecation errors by default, thus breaking the BC layers).
Such deprecations warnings can be logged when using the Symfony error
handler or the Symfony PHPUnit bridge (or other tools implementing the
same convention).
@@ -19,6 +19,10 @@
"symfony/css-selector": "~2.0"
},

"require-dev": {
"symfony/phpunit-bridge": "~2.7"
Copy link
Member

Choose a reason for hiding this comment

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

What does this do?

Copy link
Member

Choose a reason for hiding this comment

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

I've read http://symfony.com/blog/new-in-symfony-2-7-phpunit-bridge and now I get the clear picture.

Copy link
Member Author

Choose a reason for hiding this comment

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

it make test fail if you call a deprecated code path in a non-legacy test

Copy link
Member Author

Choose a reason for hiding this comment

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

note that we should also add this dev dependency in our drivers, to make their own test fail when they use deprecated APIs (be it in Mink APIs or in Symfony ones btw). We don't want them to use deprecated APIs.

stof added a commit that referenced this pull request Aug 29, 2015
Silence deprecations by default
@stof stof merged commit 522d983 into minkphp:master Aug 29, 2015
@stof stof deleted the silence_deprecations branch August 29, 2015 10:35
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.

None yet

2 participants