Bug #57856
@inject does not work relative to current namespace
Status: | Under Review | Start date: | 2014-04-12 | |
---|---|---|---|---|
Priority: | Should have | Due date: | ||
Assigned To: | - | % Done: | 0% |
|
Category: | Extbase | Spent time: | - | |
Target version: | 7.4 (Backend) | |||
TYPO3 Version: | 7 | Is Regression: | No | |
PHP Version: | Sprint Focus: | On Location Sprint | ||
Complexity: |
Description
So far you always need to give the full classpath including full namespace for an @inject. That's the way it is currently used. It would be great if @inject would also allow to use the current namespace.
Or maybe even make use of "use"-statements?
Related issues
History
#1 Updated by Markus Klein over 1 year ago
Flow has a solution for this: https://review.typo3.org/20158
#2 Updated by Markus Klein over 1 year ago
They even support the use statement. But this comes with high costs. You need to parse the file in order to retrieve the use statements. Flow uses the doctrine phpparser for this.
For the purpose of extbase I suggest to only resolve the current namespace, which is easy.
#3 Updated by Stefan Neufeind over 1 year ago
Can't we take that "cost"? Reflection is cached anyway.
We don't have Doctrine yet. So I think for "use" only we can come up with a minimal parser - maybe even with some hardcoded limitations for now. We might get Doctrine anyway afaik, sooner or later.
Thanks for the link to that patch. Looks doable imho ...
#4 Updated by Gerrit Code Review over 1 year ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/29436
#5 Updated by Markus Klein over 1 year ago
I agree now that we should add the use stmt support as well.
#6 Updated by Gerrit Code Review over 1 year ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/29436
#7 Updated by Gerrit Code Review about 1 year ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/29436
#8 Updated by Gerrit Code Review about 1 year ago
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/29436
#9 Updated by Gerrit Code Review 7 months ago
Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/29436
#10 Updated by Gerrit Code Review 7 months ago
Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/29436
#11 Updated by Gerrit Code Review 7 months ago
Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/29436
#12 Updated by Gerrit Code Review 3 months ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/38359
#13 Updated by Gerrit Code Review 3 months ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/38359
#14 Updated by Gerrit Code Review 3 months ago
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/38359
#15 Updated by Gerrit Code Review 3 months ago
Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/38359
#16 Updated by Gerrit Code Review 3 months ago
Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/38359
#17 Updated by Gerrit Code Review 3 months ago
Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/38359
#18 Updated by Gerrit Code Review 3 months ago
Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/38359
#19 Updated by Gerrit Code Review 3 months ago
Patch set 9 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/38359
#20 Updated by Gerrit Code Review 3 months ago
Patch set 10 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/38359
#21 Updated by Gerrit Code Review 3 months ago
Patch set 11 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/38359
#22 Updated by Gerrit Code Review 3 months ago
Patch set 12 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/38359
#23 Updated by Gerrit Code Review 3 months ago
Patch set 13 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/38359
#24 Updated by Sebastian Michaelsen 17 days ago
- Target version set to 7.4 (Backend)
- Sprint Focus set to On Location Sprint
#25 Updated by Sebastian Michaelsen 17 days ago
- TYPO3 Version changed from 6.2 to 7
#26 Updated by Gerrit Code Review 17 days ago
Patch set 14 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/38359