Task #33589

Issue warning / error when trying to @inject into private property

Added by Robert Lemke almost 10 years ago. Updated almost 10 years ago.

Status:
Resolved
Priority:
Should have
Assignee:
Category:
Object
Start date:
2012-02-01
Due date:
% Done:

100%

Estimated time:
Sprint:
PHP Version:
5.3
Has patch:
No
Complexity:
easy

Description

Class properties declared as private cannot be used for property injection by using the @FLOW3\Inject annotation because the proxy class can only set it in its own scope. If private properties are really necessary, constructor or setter injection can be used as a workaround.

FLOW3 should throw an exception on detecting an inject annotation on a private property.

Also available in: Atom PDF