Skip to content

Commit

Permalink
bug #32665 [ErrorHandler] Relax transition to the new Debug class (yc…
Browse files Browse the repository at this point in the history
…eruto)

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 symfony/recipes#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
-------

3216caf [ErrorHandler] Relax transition to the new Debug class
  • Loading branch information
nicolas-grekas committed Jul 31, 2019
2 parents 67d7dda + 3216caf commit 537114d
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 3 deletions.
25 changes: 25 additions & 0 deletions src/Symfony/Component/ErrorHandler/Resources/stubs/Debug.php
@@ -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
{
}
}
7 changes: 4 additions & 3 deletions src/Symfony/Component/ErrorHandler/composer.json
Expand Up @@ -19,14 +19,15 @@
"php": "^7.1.3",
"psr/log": "~1.0"
},
"conflict": {
"symfony/http-kernel": "<3.4"
},
"require-dev": {
"symfony/http-kernel": "^3.4|^4.0|^5.0"
},
"conflict": {
"symfony/http-kernel": "<3.4"
},
"autoload": {
"psr-4": { "Symfony\\Component\\ErrorHandler\\": "" },
"classmap": [ "Resources/stubs/Debug.php" ],
"exclude-from-classmap": [
"/Tests/"
]
Expand Down

0 comments on commit 537114d

Please sign in to comment.