Skip to content

Resolve inject type from reflection property type for php 7.4 #579

@lifinsky

Description

@lifinsky

throw new BeanException('`@Inject` must be define inejct value or `@var type` ');

https://www.php.net/manual/reflectionproperty.gettype.php
For example:

/**
 * @Inject()
 */
private SomeInterface $someProperty;

Instead of

/**
 * @Inject(SomeInterface::class)
 */
private SomeInterface $someProperty;

Or more ugly

/**
 * @var SomeInterface
 */
private SomeInterface $someProperty;

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions