Skip to content

Call to an undefined method Nette\DI\Definitions\Definition::setFactory(). #263

@janbarasek

Description

@janbarasek

Version: 3.0.10

Bug Description

The new version 3.0.10 introduces a fatal bug in all my opensource packages. The following error is reported in PhpStan:

Snímek obrazovky 2021-09-29 v 22 15 45

Used code snippet:

final class AdminBarExtension extends CompilerExtension
{
	public function beforeCompile(): void
	{
		$builder = $this->getContainerBuilder();
		$builder->addDefinition($this->prefix('basicPanel'))
			->setFactory(BasicPanel::class) // error is here
			->setAutowired(BasicPanel::class);
	}

May I ask why?

Steps To Reproduce

https://github.com/baraja-core/admin-bar/runs/3746137042?check_suite_focus=true


Snímek obrazovky 2021-09-29 v 22 17 02

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions