Skip to content

Commit aad8aee

Browse files
minor symfony#46102 [VarDumper] Remove casters for mysql link resource and removed DOM classes (fancyweb)
This PR was merged into the 6.1 branch. Discussion ---------- [VarDumper] Remove casters for mysql link resource and removed DOM classes | Q | A | ------------- | --- | Branch? | 6.1 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - `\DOMTypeinfo`, `\DOMDomError` and `\DOMLocator` have been removed in PHP 8.0 (php/php-src#4707). `mysql link` resource looks impossible because the `mysql` extension has been removed in PHP 7.0. Commits ------- a506f9c [VarDumper] Remove casters for mysql link resource and removed DOM classes
2 parents 8d29cc7 + a506f9c commit aad8aee

File tree

3 files changed

+0
-50
lines changed

3 files changed

+0
-50
lines changed

src/Symfony/Component/VarDumper/Caster/DOMCaster.php

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -208,43 +208,6 @@ public static function castText(\DOMText $dom, array $a, Stub $stub, bool $isNes
208208
return $a;
209209
}
210210

211-
public static function castTypeinfo(\DOMTypeinfo $dom, array $a, Stub $stub, bool $isNested)
212-
{
213-
$a += [
214-
'typeName' => $dom->typeName,
215-
'typeNamespace' => $dom->typeNamespace,
216-
];
217-
218-
return $a;
219-
}
220-
221-
public static function castDomError(\DOMDomError $dom, array $a, Stub $stub, bool $isNested)
222-
{
223-
$a += [
224-
'severity' => $dom->severity,
225-
'message' => $dom->message,
226-
'type' => $dom->type,
227-
'relatedException' => $dom->relatedException,
228-
'related_data' => $dom->related_data,
229-
'location' => $dom->location,
230-
];
231-
232-
return $a;
233-
}
234-
235-
public static function castLocator(\DOMLocator $dom, array $a, Stub $stub, bool $isNested)
236-
{
237-
$a += [
238-
'lineNumber' => $dom->lineNumber,
239-
'columnNumber' => $dom->columnNumber,
240-
'offset' => $dom->offset,
241-
'relatedNode' => $dom->relatedNode,
242-
'uri' => $dom->uri ? new LinkStub($dom->uri, $dom->lineNumber) : $dom->uri,
243-
];
244-
245-
return $a;
246-
}
247-
248211
public static function castDocumentType(\DOMDocumentType $dom, array $a, Stub $stub, bool $isNested)
249212
{
250213
$a += [

src/Symfony/Component/VarDumper/Caster/ResourceCaster.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,6 @@ public static function castGd($gd, array $a, Stub $stub, bool $isNested)
6363
return $a;
6464
}
6565

66-
public static function castMysqlLink($h, array $a, Stub $stub, bool $isNested)
67-
{
68-
$a['host'] = mysql_get_host_info($h);
69-
$a['protocol'] = mysql_get_proto_info($h);
70-
$a['server'] = mysql_get_server_info($h);
71-
72-
return $a;
73-
}
74-
7566
public static function castOpensslX509($h, array $a, Stub $stub, bool $isNested)
7667
{
7768
$stub->cut = -1;

src/Symfony/Component/VarDumper/Cloner/AbstractCloner.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,6 @@ abstract class AbstractCloner implements ClonerInterface
6666
'DOMAttr' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castAttr'],
6767
'DOMElement' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castElement'],
6868
'DOMText' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castText'],
69-
'DOMTypeinfo' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castTypeinfo'],
70-
'DOMDomError' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castDomError'],
71-
'DOMLocator' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castLocator'],
7269
'DOMDocumentType' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castDocumentType'],
7370
'DOMNotation' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castNotation'],
7471
'DOMEntity' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castEntity'],
@@ -163,7 +160,6 @@ abstract class AbstractCloner implements ClonerInterface
163160
'GdImage' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castGd'],
164161
':gd' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castGd'],
165162

166-
':mysql link' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castMysqlLink'],
167163
':pgsql large object' => ['Symfony\Component\VarDumper\Caster\PgSqlCaster', 'castLargeObject'],
168164
':pgsql link' => ['Symfony\Component\VarDumper\Caster\PgSqlCaster', 'castLink'],
169165
':pgsql link persistent' => ['Symfony\Component\VarDumper\Caster\PgSqlCaster', 'castLink'],

0 commit comments

Comments
 (0)