Your project must not contain invalid function or method calls
- Read doc
- Reliability
- Major
More information: https://insight.symfony.com/what-we-analyse/php.invalid_call
- // Recreate the factory closure against the clone; rebinding
- // keeps any captured value (the ctor-provided dispatcher)
- // while re-pointing the captured container.
- $this->entries[$id] = new CallableEntry(
- $id,
- Closure::bind($entry->factory, $this, self::class),
- auto: true,
- );
- }
- }
- }
Your project must not contain invalid instantiations
- Read doc
- Reliability
- Major
More information: https://insight.symfony.com/what-we-analyse/php.invalid_instantiation
- // trait, abstract class, enum): must name a pre-registered entry
- // (the typo catcher).
- \is_string($factory) => $this->has($factory)
- ? new AliasEntry($id, $factory)
- : throw InvalidArgumentException::unresolvableString($id, $factory),
- \is_array($factory) => new MethodPairEntry($id, $factory), // pair validation in its ctor
- // Plain objects only; invokables matched the arm above.
- // (\is_object, not `instanceof object` — the latter always
- // evaluates false: `object` is parsed as a class name.)
- \is_object($factory) => throw InvalidArgumentException::plainObjectNotAFactory($id, $factory),
- // Invalid factory of type %s.