10000 [FrameworkBundle][PhpUnitBridge] Configure doctrine/deprecations as e… · symfony/symfony@cbe4808 · GitHub
[go: up one dir, main page]

Skip to content

Commit cbe4808

Browse files
[FrameworkBundle][PhpUnitBridge] Configure doctrine/deprecations as expected
1 parent 5bab536 commit cbe4808

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/Symfony/Bridge/PhpUnit/bin/simple-phpunit.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,11 @@
151151
putenv('SYMFONY_DEPRECATIONS_HELPER=disabled');
152152
}
153153

154+
if (!$getEnvVar('DOCTRINE_DEPRECATIONS')) {
155+
putenv('DOCTRINE_DEPRECATIONS=trigger');
156+
$_SERVER['DOCTRINE_DEPRECATIONS'] = $_ENV['DOCTRINE_DEPRECATIONS'] = 'trigger';
157+
}
158+
154159
$COMPOSER = ($COMPOSER = getenv('COMPOSER_BINARY'))
155160
|| file_exists($COMPOSER = $oldPwd.'/composer.phar')
156161
|| ($COMPOSER = rtrim((string) ('\\' === \DIRECTORY_SEPARATOR ? preg_replace('/[\r\n].*/', '', shell_exec('where.exe composer.phar 2> NUL')) : shell_exec('which composer.phar 2> /dev/null'))))

src/Symfony/Bundle/FrameworkBundle/FrameworkBundle.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,8 @@ class FrameworkBundle extends Bundle
9595
*/
9696
public function boot()
9797
{
98+
$_ENV['DOCTRINE_DEPRECATIONS'] = $_SERVER['DOCTRINE_DEPRECATIONS'] ??= 'trigger';
99+
98100
$handler = ErrorHandler::register(null, false);
99101
$this->container->get('debug.error_handler_configurator')->configure($handler);
100102

0 commit comments

Comments
 (0)
0