Skip to content

Commit 6feaaef

Browse files
Merge branch '6.4' into 7.3
* 6.4: Remove calls to no-op functions, deprecated in PHP 8.5 Remove deprecated calls to deprecated methods of SplObjectStorage [Messenger] Show package installation hint also for amqps
2 parents 11d5668 + 900da8a commit 6feaaef

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Dumper/PhpDumper.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -799,7 +799,7 @@ private function addServiceConfigurator(Definition $definition, string $variable
799799

800800
if (\is_array($callable)) {
801801
if ($callable[0] instanceof Reference
802-
|| ($callable[0] instanceof Definition && $this->definitionVariables->contains($callable[0]))
802+
|| ($callable[0] instanceof Definition && $this->definitionVariables->offsetExists($callable[0]))
803803
) {
804804
return \sprintf(" %s->%s(\$%s);\n", $this->dumpValue($callable[0]), $callable[1], $variableName);
805805
}
@@ -1187,15 +1187,15 @@ private function addNewInstance(Definition $definition, string $return = '', ?st
11871187

11881188
if (['...'] === $arguments && ('Closure' !== ($class = $definition->getClass() ?: 'Closure') || $definition->isLazy() && (
11891189
$callable[0] instanceof Reference
1190-
|| ($callable[0] instanceof Definition && !$this->definitionVariables->contains($callable[0]))
1190+
|| ($callable[0] instanceof Definition && !$this->definitionVariables->offsetExists($callable[0]))
11911191
))) {
11921192
$initializer = 'fn () => '.$this->dumpValue($callable[0]);
11931193

11941194
return $return.LazyClosure::getCode($initializer, $callable, $class, $this->container, $id).$tail;
11951195
}
11961196

11971197
if ($callable[0] instanceof Reference
1198-
|| ($callable[0] instanceof Definition && $this->definitionVariables->contains($callable[0]))
1198+
|| ($callable[0] instanceof Definition && $this->definitionVariables->offsetExists($callable[0]))
11991199
) {
12001200
return $return.\sprintf('%s->%s(%s)', $this->dumpValue($callable[0]), $callable[1], $arguments ? implode(', ', $arguments) : '').$tail;
12011201
}
@@ -1937,7 +1937,7 @@ private function dumpValue(mixed $value, bool $interpolate = true): string
19371937
if ($value->hasErrors() && $e = $value->getErrors()) {
19381938
return \sprintf('throw new RuntimeException(%s)', $this->export(reset($e)));
19391939
}
1940-
if ($this->definitionVariables?->contains($value)) {
1940+
if ($this->definitionVariables?->offsetExists($value)) {
19411941
return $this->dumpValue($this->definitionVariables[$value], $interpolate);
19421942
}
19431943
if ($value->getMethodCalls()) {

0 commit comments

Comments
 (0)