bug #32665 [ErrorHandler] Relax transition to the new Debug class (yceruto)
This PR was squashed before being merged into the 4.4 branch (closes #32665).
Discussion
----------
[ErrorHandler] Relax transition to the new Debug class
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Alternative of https://github.com/symfony/recipes/pull/630
This would solve the bug in `bin/console.php` and `public/index.php` for existing projects migrating to 4.4 without requiring symfony/debug.
/cc @nicolas-grekas
Commits
-------
3216caf430
[ErrorHandler] Relax transition to the new Debug class
This commit is contained in:
commit
537114defc
25
src/Symfony/Component/ErrorHandler/Resources/stubs/Debug.php
Normal file
25
src/Symfony/Component/ErrorHandler/Resources/stubs/Debug.php
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of the Symfony package.
|
||||||
|
*
|
||||||
|
* (c) Fabien Potencier <fabien@symfony.com>
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Symfony\Component\Debug;
|
||||||
|
|
||||||
|
if (!class_exists(Debug::class, false)) {
|
||||||
|
class_alias(\Symfony\Component\ErrorHandler\Debug::class, Debug::class);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (false) {
|
||||||
|
/**
|
||||||
|
* @deprecated since Symfony 4.4, use Symfony\Component\ErrorHandler\Debug instead.
|
||||||
|
*/
|
||||||
|
class Debug extends \Symfony\Component\ErrorHandler\Debug
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
@ -19,14 +19,15 @@
|
|||||||
"php": "^7.1.3",
|
"php": "^7.1.3",
|
||||||
"psr/log": "~1.0"
|
"psr/log": "~1.0"
|
||||||
},
|
},
|
||||||
"conflict": {
|
|
||||||
"symfony/http-kernel": "<3.4"
|
|
||||||
},
|
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"symfony/http-kernel": "^3.4|^4.0|^5.0"
|
"symfony/http-kernel": "^3.4|^4.0|^5.0"
|
||||||
},
|
},
|
||||||
|
"conflict": {
|
||||||
|
"symfony/http-kernel": "<3.4"
|
||||||
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": { "Symfony\\Component\\ErrorHandler\\": "" },
|
"psr-4": { "Symfony\\Component\\ErrorHandler\\": "" },
|
||||||
|
"classmap": [ "Resources/stubs/Debug.php" ],
|
||||||
"exclude-from-classmap": [
|
"exclude-from-classmap": [
|
||||||
"/Tests/"
|
"/Tests/"
|
||||||
]
|
]
|
||||||
|
Reference in New Issue
Block a user