Skip to content

Ensure DeprecationErrorHandler::collectDeprecations() is triggered #24696

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

Closed
wants to merge 2 commits into from

Conversation

alexpott
Copy link
Contributor

Ensure DeprecationErrorHandler::collectDeprecations() is triggered if SYMFONY_DEPRECATIONS_SERIALIZE is set

Q A
Branch? 3.3
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #...
License MIT
Doc PR symfony/symfony-docs#...

Drupal doesn't use src/Symfony/Bridge/PhpUnit/bin/simple-phpunit but would like to use the deprecation collection features of src/Symfony/Bridge/PhpUnit. The checks in src/Symfony/Bridge/PhpUnit/bootstrap.php mean that this is difficult because they rely on simple-phpunit - but I'm not sure that that is necessary.

The problem is even in isolated tests we have PHPUNIT_COMPOSER_INSTALL set because we use a custom phpunit config file.

@alexpott
Copy link
Contributor Author

We tried this before in #24685 but got it wrong.

@alexpott
Copy link
Contributor Author

I've run src/Symfony/Component/Process/Tests/ProcessTest.php locally and this version does not seem to cause the same problems

@@ -262,6 +262,7 @@ public function endTest($test, $time)
if ($this->runsInSeparateProcess) {
$deprecations = file_get_contents($this->runsInSeparateProcess);
unlink($this->runsInSeparateProcess);
putenv('SYMFONY_DEPRECATIONS_SERIALIZE=');
Copy link
Member

Choose a reason for hiding this comment

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

the = should be removed, to really remove the env var (the = makes it the empty string, where we want to delete it, isn't it?)

@nicolas-grekas nicolas-grekas added this to the 3.3 milestone Oct 28, 2017
@nicolas-grekas
Copy link
Member

Thank you @alexpott.

This was referenced Oct 30, 2017
@fabpot fabpot mentioned this pull request Nov 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants