Bug #57856

@inject does not work relative to current namespace

Added by Stefan Neufeind over 7 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Extbase
Target version:
-
Start date:
2014-04-12
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:
Remote Sprint

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

Related to TYPO3.Flow - Bug #46008: Reflection should resolve relative namespacesResolvedSebastian Kurfuerst2013-03-04

Actions
Related to TYPO3 Core - Task #57878: Cleanup Extbase Reflection classesClosedMarkus Klein2014-04-13

Actions
Related to TYPO3 Core - Bug #85932: Incorrect annotation for property "message" in class "Error".Closed2018-08-23

Actions
Has duplicate TYPO3 Core - Feature #76204: Make it possible to use imported/alias class names in PHPDoc block annotationsClosed2016-05-17

Actions
#1

Updated by Markus Klein over 7 years ago

Flow has a solution for this: https://review.typo3.org/20158

#2

Updated by Markus Klein over 7 years 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 7 years 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 7 years 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 7 years ago

I agree now that we should add the use stmt support as well.

#6

Updated by Gerrit Code Review over 7 years 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 over 7 years 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 over 7 years 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 almost 7 years 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 almost 7 years 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 almost 7 years 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 over 6 years 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 over 6 years 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 over 6 years 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 over 6 years 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 over 6 years 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 over 6 years 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 over 6 years 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 over 6 years 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 over 6 years 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 over 6 years 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 over 6 years 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 over 6 years 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 over 6 years ago

  • Target version set to 7.4 (Backend)
  • Sprint Focus set to On Location Sprint
#25

Updated by Sebastian Michaelsen over 6 years ago

  • TYPO3 Version changed from 6.2 to 7
#26

Updated by Gerrit Code Review over 6 years 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

#27

Updated by Susanne Moog about 6 years ago

  • Target version changed from 7.4 (Backend) to 7.5
#28

Updated by Anja Leichsenring about 6 years ago

  • Sprint Focus changed from On Location Sprint to Remote Sprint
#29

Updated by Gerrit Code Review about 6 years ago

Patch set 15 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/38359

#30

Updated by Benni Mack about 6 years ago

  • Target version deleted (7.5)
#31

Updated by Gerrit Code Review about 6 years ago

Patch set 16 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/38359

#32

Updated by Anja Leichsenring almost 5 years ago

  • Status changed from Under Review to Accepted
#33

Updated by Patryk Ostrowski about 3 years ago

  • Related to Bug #85932: Incorrect annotation for property "message" in class "Error". added
#34

Updated by Georg Ringer over 2 years ago

  • Status changed from Accepted to Resolved

this has been solved in master, therefore issue closed

#35

Updated by Benni Mack over 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF