diff --git a/src/Symfony/Component/VarDumper/Caster/ResourceCaster.php b/src/Symfony/Component/VarDumper/Caster/ResourceCaster.php index 981f62ce13d90..df92ddb8331f3 100644 --- a/src/Symfony/Component/VarDumper/Caster/ResourceCaster.php +++ b/src/Symfony/Component/VarDumper/Caster/ResourceCaster.php @@ -20,20 +20,10 @@ * * @final * - * @internal since Symfony 7.3 + * @internal */ class ResourceCaster { - /** - * @deprecated since Symfony 7.3 - */ - public static function castCurl(\CurlHandle $h, array $a, Stub $stub, bool $isNested): array - { - trigger_deprecation('symfony/var-dumper', '7.3', 'The "%s()" method is deprecated without replacement.', __METHOD__, CurlCaster::class); - - return CurlCaster::castCurl($h, $a, $stub, $isNested); - } - public static function castDba(\Dba\Connection $dba, array $a, Stub $stub, bool $isNested): array { if (\PHP_VERSION_ID < 80402) { @@ -66,24 +56,4 @@ public static function castStreamContext($stream, array $a, Stub $stub, bool $is { return @stream_context_get_params($stream) ?: $a; } - - /** - * @deprecated since Symfony 7.3 - */ - public static function castGd(\GdImage $gd, array $a, Stub $stub, bool $isNested): array - { - trigger_deprecation('symfony/var-dumper', '7.3', 'The "%s()" method is deprecated without replacement.', __METHOD__, GdCaster::class); - - return GdCaster::castGd($gd, $a, $stub, $isNested); - } - - /** - * @deprecated since Symfony 7.3 - */ - public static function castOpensslX509(\OpenSSLCertificate $h, array $a, Stub $stub, bool $isNested): array - { - trigger_deprecation('symfony/var-dumper', '7.3', 'The "%s()" method is deprecated without replacement.', __METHOD__, OpenSSLCaster::class); - - return OpenSSLCaster::castOpensslX509($h, $a, $stub, $isNested); - } } diff --git a/src/Symfony/Component/VarDumper/Cloner/AbstractCloner.php b/src/Symfony/Component/VarDumper/Cloner/AbstractCloner.php index 3befdf6c60a34..4081d30bfbb48 100644 --- a/src/Symfony/Component/VarDumper/Cloner/AbstractCloner.php +++ b/src/Symfony/Component/VarDumper/Cloner/AbstractCloner.php @@ -181,7 +181,7 @@ abstract class AbstractCloner implements ClonerInterface 'Dba\Connection' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castDba'], - 'GdImage' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castGd'], + 'GdImage' => ['Symfony\Component\VarDumper\Caster\GdCaster', 'castGd'], 'SQLite3Result' => ['Symfony\Component\VarDumper\Caster\SqliteCaster', 'castSqlite3Result'], diff --git a/src/Symfony/Component/VarDumper/Tests/Caster/ResourceCasterTest.php b/src/Symfony/Component/VarDumper/Tests/Caster/ResourceCasterTest.php index 1bfd47f488e18..a13528bc5eebe 100644 --- a/src/Symfony/Component/VarDumper/Tests/Caster/ResourceCasterTest.php +++ b/src/Symfony/Component/VarDumper/Tests/Caster/ResourceCasterTest.php @@ -22,36 +22,6 @@ class ResourceCasterTest extends TestCase use ExpectUserDeprecationMessageTrait; use VarDumperTestTrait; - /** - * @group legacy - * - * @requires extension curl - */ - public function testCastCurlIsDeprecated() - { - $ch = curl_init('http://example.com'); - curl_setopt($ch, \CURLOPT_RETURNTRANSFER, true); - curl_exec($ch); - - $this->expectUserDeprecationMessage('Since symfony/var-dumper 7.3: The "Symfony\Component\VarDumper\Caster\ResourceCaster::castCurl()" method is deprecated without replacement.'); - - ResourceCaster::castCurl($ch, [], new Stub(), false); - } - - /** - * @group legacy - * - * @requires extension gd - */ - public function testCastGdIsDeprecated() - { - $gd = imagecreate(1, 1); - - $this->expectUserDeprecationMessage('Since symfony/var-dumper 7.3: The "Symfony\Component\VarDumper\Caster\ResourceCaster::castGd()" method is deprecated without replacement.'); - - ResourceCaster::castGd($gd, [], new Stub(), false); - } - /** * @requires extension dba */