Skip to content

Commit a23cefe

Browse files
Remove BC layers related to new methods and new parameters
1 parent ff3a211 commit a23cefe

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ CHANGELOG
1212
* Remove `PhpDumper` options `inline_factories_parameter` and `inline_class_loader_parameter`, use options `inline_factories` and `inline_class_loader` instead
1313
* Parameter names of `ParameterBag` cannot be numerics
1414
* Remove `ContainerAwareInterface` and `ContainerAwareTrait`, use dependency injection instead
15+
* Add argument `$id` and `$asGhostObject` to `DumperInterface::isProxyCandidate()` and `getProxyCode()`
16+
* Add argument `$source` to `FileLoader::registerClasses()`
1517

1618
6.4
1719
---

LazyProxy/PhpDumper/DumperInterface.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,9 @@ interface DumperInterface
2323
/**
2424
* Inspects whether the given definitions should produce proxy instantiation logic in the dumped container.
2525
*
26-
* @param bool|null &$asGhostObject Set to true after the call if the proxy is a ghost object
27-
* @param string|null $id
26+
* @param bool|null &$asGhostObject Set to true after the call if the proxy is a ghost object
2827
*/
29-
public function isProxyCandidate(Definition $definition/* , bool &$asGhostObject = null, string $id = null */): bool;
28+
public function isProxyCandidate(Definition $definition, bool &$asGhostObject = null, string $id = null): bool;
3029

3130
/**
3231
* Generates the code to be used to instantiate a proxy in the dumped factory code.
@@ -35,8 +34,6 @@ public function getProxyFactoryCode(Definition $definition, string $id, string $
3534

3635
/**
3736
* Generates the code for the lazy proxy.
38-
*
39-
* @param string|null $id
4037
*/
41-
public function getProxyCode(Definition $definition/* , string $id = null */): string;
38+
public function getProxyCode(Definition $definition, string $id = null): string;
4239
}

Loader/FileLoader.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public function import(mixed $resource, string $type = null, bool|string $ignore
9898
*
9999
* @return void
100100
*/
101-
public function registerClasses(Definition $prototype, string $namespace, string $resource, string|array $exclude = null/* , string $source = null */)
101+
public function registerClasses(Definition $prototype, string $namespace, string $resource, string|array $exclude = null, string $source = null)
102102
{
103103
if (!str_ends_with($namespace, '\\')) {
104104
throw new InvalidArgumentException(sprintf('Namespace prefix must end with a "\\": "%s".', $namespace));
@@ -115,7 +115,6 @@ public function registerClasses(Definition $prototype, string $namespace, string
115115
throw new InvalidArgumentException('The exclude list must not contain an empty value.');
116116
}
117117

118-
$source = \func_num_args() > 4 ? func_get_arg(4) : null;
119118
$autoconfigureAttributes = new RegisterAutoconfigureAttributesPass();
120119
$autoconfigureAttributes = $autoconfigureAttributes->accept($prototype) ? $autoconfigureAttributes : null;
121120
$classes = $this->findClasses($namespace, $resource, (array) $exclude, $autoconfigureAttributes, $source);

0 commit comments

Comments
 (0)