You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bug symfony#57310 [DependencyInjection] Fix ternary in AutowireCallable attribute (alamirault)
This PR was merged into the 6.4 branch.
Discussion
----------
[DependencyInjection] Fix ternary in `AutowireCallable` attribute
| Q | A
| ------------- | ---
| Branch? | 6.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Issues | -
| License | MIT
Although `AutowireCallable` construct is
```php
public function __construct(
...
bool|string $lazy = false,
) {
```
It call `Autowire::__construct(..., lazy: $lazy);`
And in this class construct is
```php
public function __construct(
...
bool|string|array $lazy = false,
) {
if ($this->lazy = \is_string($lazy) ? [$lazy] : $lazy) {}
}
```
So `$this->lazy` is always `bool|array` and ternary always false
Commits
-------
f4792bc [DependencyInjection] Fix ternary in AutowireCallable attribute
0 commit comments