Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Property with #[Inject] attribute is initialized #133

Open
wants to merge 1 commit into
base: 1.1.x
Choose a base branch
from

Conversation

mabar
Copy link

@mabar mabar commented Aug 10, 2023

Adding support for inject attributes https://doc.nette.org/en/best-practices/inject-method-attribute#toc-inject-attributes

I am a bit stuck on why the test is failing - same code with native ReflectionProperty works just fine https://3v4l.org/3HF1T

Also my usual primitive debugging methods don't work as usual - var_dump() in tested code makes it stuck indefinitely and e.g. \PHPUnit\Framework\assertFalse(true) in tested code does not make the test fail

For the phpstan failure - should I just add it to ignored? Class does not have to exist in this case.

@lulco
Copy link
Contributor

lulco commented Oct 9, 2023

@mabar it's because of installing nette/di in lowest version (3.0.0) where the class Nette\DI\Attributes\Inject doesn't exist

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants