Your project must not contain invalid function or method calls 2

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. }
  1. }
  2. [$class, $method] = \explode('::', $factory, 2);
  3. } else {
  4. if (\count($factory) !== 2) {
  5. throw InvalidArgumentException::invalidMethodPair($id, $factory);
    Parameter #2 $factory of static method Projek\Container\InvalidArgumentException::invalidMethodPair() expects array{string, string}|string, array{class-string<T of object>|T of object, string} given.
    Time to fix: about 9 minutes
    Read doc Open Issue Permalink Copy Prompt
    Last edited by Fery Wardiyanto
  6. }
  7. [$class, $method] = [$factory[0], $factory[1]];
  8. }

Your project must not contain invalid instantiations 4

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

in src/Container.php, line 314
  1. // statement's begin line when a paren group survives to the `;` —
  2. // without them the closing `});` line can never be marked covered.
  3. $this->entries[$id] = (match (true) {
  4. // Invokable shapes first — the is_object guard is load-bearing: a class-string naming
  5. // an invokable class must fall through to the ClassName arm (build, never invoke).
  6. FactoryEntry::isValid($factory) => new FactoryEntry($id, $factory),
    Parameter #2 $factory of class Projek\Container\Entry\FactoryEntry constructor expects Projek\Container\EntryFactory, (callable)|list<string|T of object>|Projek\Container\EntryFactory|string given.
    Last edited by Fery Wardiyanto
  7. CallableEntry::isValid($factory) => new CallableEntry($id, $factory),
  8. ClassNameEntry::isValid($factory) => new ClassNameEntry($id, $factory),
  9. MethodPairEntry::isValid($factory) => new MethodPairEntry($id, $factory),
  10. // any other string — incl. non-buildable type symbols (interface, trait, abstract
  11. // class, enum): must name a pre-registered entry (the typo catcher).
in src/Container.php, line 315
  1. // without them the closing `});` line can never be marked covered.
  2. $this->entries[$id] = (match (true) {
  3. // Invokable shapes first — the is_object guard is load-bearing: a class-string naming
  4. // an invokable class must fall through to the ClassName arm (build, never invoke).
  5. FactoryEntry::isValid($factory) => new FactoryEntry($id, $factory),
  6. CallableEntry::isValid($factory) => new CallableEntry($id, $factory),
    Parameter #2 $factory of class Projek\Container\Entry\CallableEntry constructor expects callable-string|object, array{class-string<T of object>|T of object, string}|(callable(): mixed)|Projek\Container\EntryFactory|string given.
    Last edited by Fery Wardiyanto
  7. ClassNameEntry::isValid($factory) => new ClassNameEntry($id, $factory),
  8. MethodPairEntry::isValid($factory) => new MethodPairEntry($id, $factory),
  9. // any other string — incl. non-buildable type symbols (interface, trait, abstract
  10. // class, enum): must name a pre-registered entry (the typo catcher).
  11. \is_string($factory) => $this->has($factory)
in src/Container.php, line 316
  1. $this->entries[$id] = (match (true) {
  2. // Invokable shapes first — the is_object guard is load-bearing: a class-string naming
  3. // an invokable class must fall through to the ClassName arm (build, never invoke).
  4. FactoryEntry::isValid($factory) => new FactoryEntry($id, $factory),
  5. CallableEntry::isValid($factory) => new CallableEntry($id, $factory),
  6. ClassNameEntry::isValid($factory) => new ClassNameEntry($id, $factory),
    Parameter #2 $factory of class Projek\Container\Entry\ClassNameEntry constructor expects class-string, (callable)|list<string|T of object>|Projek\Container\EntryFactory|string given.
    Last edited by Fery Wardiyanto
  7. MethodPairEntry::isValid($factory) => new MethodPairEntry($id, $factory),
  8. // any other string — incl. non-buildable type symbols (interface, trait, abstract
  9. // class, enum): must name a pre-registered entry (the typo catcher).
  10. \is_string($factory) => $this->has($factory)
  11. ? new AliasEntry($id, $factory)
in src/Container.php, line 317
  1. // Invokable shapes first — the is_object guard is load-bearing: a class-string naming
  2. // an invokable class must fall through to the ClassName arm (build, never invoke).
  3. FactoryEntry::isValid($factory) => new FactoryEntry($id, $factory),
  4. CallableEntry::isValid($factory) => new CallableEntry($id, $factory),
  5. ClassNameEntry::isValid($factory) => new ClassNameEntry($id, $factory),
  6. MethodPairEntry::isValid($factory) => new MethodPairEntry($id, $factory),
    Parameter #2 $factory of class Projek\Container\Entry\MethodPairEntry constructor expects array{class-string<T of object>|T of object, string}|string, array{class-string<T of object>|T of object, string}|(callable(): mixed)|Projek\Container\EntryFactory|string given.
    Last edited by Fery Wardiyanto
  7. // any other string — incl. non-buildable type symbols (interface, trait, abstract
  8. // class, enum): must name a pre-registered entry (the typo catcher).
  9. \is_string($factory) => $this->has($factory)
  10. ? new AliasEntry($id, $factory)
  11. : throw InvalidArgumentException::unresolvableString($id, $factory),