Your project must not contain invalid function or method calls 5

More information: https://insight.symfony.com/what-we-analyse/php.invalid_call

in src/Container.php, line 133
  1. // Recreate the factory closure against the clone; rebinding
  2. // keeps any captured value (the ctor-provided dispatcher)
  3. // while re-pointing the captured container.
  4. $this->entries[$id] = new CallableEntry(
  5. $id,
  6. Closure::bind($entry->factory, $this, self::class),
    Parameter #1 $closure of static method Closure::bind() expects Closure, callable-string|object given.
    Time to fix: about 9 minutes
    Read doc Open Issue Permalink Copy Prompt
    Last edited by Fery Wardiyanto
  7. auto: true,
  8. );
  9. }
  10. }
  11. }
in src/Container.php, line 440
  1. default => false,
  2. });
  3. if ($shape) {
  4. return $this->injectContainer(
  5. $this->getHandler()->handle($instance, $args)
    Parameter #1 $callable of method Projek\Callable\Handler::handle() expects array{class-string<object>|object, string}|(callable(): mixed)|object|string, array<mixed>|(callable(): mixed) given.
    Time to fix: about 9 minutes
    Read doc Open Issue Permalink Copy Prompt
    Last edited by Fery Wardiyanto
  6. );
  7. }
  8. // Thrown from inside the boundary: the InvalidArgumentException
  9. // passes it untouched — the boundary never wraps a user-facing InvalidArgumentException.
  1. if ($name === 'self' || $name === 'static') {
  2. return $scope?->getName() ?? $name;
  3. }
  4. if ($name === 'parent') {
  5. return $scope?->getParentClass()?->getName() ?? $name;
    Cannot call method getName() on ReflectionClass|false.
    Time to fix: about 9 minutes
    Read doc Open Issue Permalink Copy Prompt
    Last edited by Fery Wardiyanto
  6. }
  7. return $name;
  8. };
  1. * @throws UnresolvableCallableException When the class is not instantiable (defensive).
  2. */
  3. private function instantiate(string $class, array $args): object
  4. {
  5. if ($args === []) {
  6. return $this->resolver->resolveInstance($class);
    Unable to resolve the template type T in call to method Projek\Callable\ResolverInterface::resolveInstance()
    Time to fix: about 9 minutes
    Read doc Open Issue Permalink Copy Prompt
    Last edited by Fery Wardiyanto
  7. }
  8. $reflection = new ReflectionClass($class);
  9. if (! $reflection->isInstantiable()) {
  1. * @throws UnresolvableCallableException When the class is not instantiable (defensive).
  2. */
  3. private function instantiate(string $class, array $args): object
  4. {
  5. if ($args === []) {
  6. return $this->resolver->resolveInstance($class);
    Parameter #1 $entry of method Projek\Callable\ResolverInterface::resolveInstance() expects class-string<object>, string given.
    Time to fix: about 9 minutes
    Read doc Open Issue Permalink Copy Prompt
    Last edited by Fery Wardiyanto
  7. }
  8. $reflection = new ReflectionClass($class);
  9. if (! $reflection->isInstantiable()) {

Your project must not contain invalid instantiations 2

More information: https://insight.symfony.com/what-we-analyse/php.invalid_instantiation

in src/Container.php, line 328
  1. // trait, abstract class, enum): must name a pre-registered entry
  2. // (the typo catcher).
  3. \is_string($factory) => $this->has($factory)
  4. ? new AliasEntry($id, $factory)
  5. : throw InvalidArgumentException::unresolvableString($id, $factory),
  6. \is_array($factory) => new MethodPairEntry($id, $factory), // pair validation in its ctor
    Parameter #2 $factory of class Projek\Container\Entry\MethodPairEntry constructor expects array{class-string<object>|object, non-empty-string}|non-empty-string, array<mixed> given.
    Last edited by Fery Wardiyanto
  7. // Plain objects only; invokables matched the arm above.
  8. // (\is_object, not `instanceof object` — the latter always
  9. // evaluates false: `object` is parsed as a class name.)
  10. \is_object($factory) => throw InvalidArgumentException::plainObjectNotAFactory($id, $factory),
  11. // Invalid factory of type %s.
  1. {
  2. if ($args === []) {
  3. return $this->resolver->resolveInstance($class);
  4. }
  5. $reflection = new ReflectionClass($class);
    Parameter #1 $objectOrClass of class ReflectionClass constructor expects class-string<T of object>|T of object, string given.
    Last edited by Fery Wardiyanto
  6. if (! $reflection->isInstantiable()) {
  7. throw UnresolvableCallableException::notInstantiable($class);
  8. }