-
-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 6.0: [Messenger] cs fix [Messenger] Fix time-limit check exception [Console] Fix console `ProgressBar::override()` after manual `ProgressBar::cleanup()` [FrameworkBundle] typo default_lifetime example [HttpClient] Handle Amp HTTP client v5 incompatibility gracefully [HttpKernel] Don’t try to wire Response argument with controller.service_arguments [PhpUnitBridge] Fix language deprecations incorrectly marked as direct [FrameworkBundle] Removed unused $willBeAvailable params on Configuration [Cache] Remove extra type condition in MemcachedAdapter::createConnection() Tell about messenger:consume invalid limit options [Messenger] Do not throw 'no handlers' exception when skipping due to duplicate handling
- Loading branch information
Showing
4 changed files
with
69 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
Tests/DeprecationErrorHandler/fake_vendor/acme/lib/PhpDeprecation.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
|
||
namespace acme\lib; | ||
|
||
class PhpDeprecation implements \Serializable | ||
{ | ||
public function serialize(): string | ||
{ | ||
return serialize([]); | ||
} | ||
|
||
public function unserialize($data): void | ||
{ | ||
} | ||
} |
43 changes: 43 additions & 0 deletions
43
Tests/DeprecationErrorHandler/php_deprecation_from_vendor_class.phpt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
--TEST-- | ||
Test that a PHP deprecation from a vendor class autoload is considered indirect. | ||
--SKIPIF-- | ||
<?php if (\PHP_VERSION_ID < 80100) echo 'skip'; ?> | ||
--FILE-- | ||
<?php | ||
|
||
$k = 'SYMFONY_DEPRECATIONS_HELPER'; | ||
putenv($k.'='.$_SERVER[$k] = $_ENV[$k] = 'max[total]=0'); | ||
putenv('ANSICON'); | ||
putenv('ConEmuANSI'); | ||
putenv('TERM'); | ||
|
||
$vendor = __DIR__; | ||
while (!file_exists($vendor.'/vendor')) { | ||
$vendor = dirname($vendor); | ||
} | ||
define('PHPUNIT_COMPOSER_INSTALL', $vendor.'/vendor/autoload.php'); | ||
require PHPUNIT_COMPOSER_INSTALL; | ||
require_once __DIR__.'/../../bootstrap.php'; | ||
eval(<<<'EOPHP' | ||
namespace PHPUnit\Util; | ||
class Test | ||
{ | ||
public static function getGroups() | ||
{ | ||
return array(); | ||
} | ||
} | ||
EOPHP | ||
); | ||
require __DIR__.'/fake_vendor/autoload.php'; | ||
|
||
\Symfony\Component\ErrorHandler\DebugClassLoader::enable(); | ||
new \acme\lib\PhpDeprecation(); | ||
|
||
?> | ||
--EXPECTF-- | ||
Remaining indirect deprecation notices (1) | ||
|
||
1x: acme\lib\PhpDeprecation implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) | ||
1x in DebugClassLoader::loadClass from Symfony\Component\ErrorHandler |