Bug #31087
Uncaught Exception: invalid annotation
Status: | Closed | Start date: | 2011-10-19 | |
---|---|---|---|---|
Priority: | Must have | Due date: | ||
Assigned To: | - | % Done: | 0% |
|
Category: | Reflection | |||
Target version: | - | |||
PHP Version: | Complexity: | |||
Has patch: | Affected Flow version: |
Description
I get a totally strange exception
Uncaught Exception The @var annotation for "Kj187\Tutorials\Domain\Model\Category::$context" seems to be invalid. More Information Exception code #1284132314 File /Volumes/Server/data/htdocs/privat/tutorials3/Packages/Framework/TYPO3.FLOW3/Classes/Reflection/ReflectionService.php Exception reference #20111019001416e73202
Here is the Category::$context
/** * @var string * @FLOW3\Identity */ protected $context;
after a little debug session i found the reason.
The problem is the optional second trim parameter in ReflectionService.php line 1119
$declaredType = trim(implode(' ', $this->getPropertyTagValues($className, $propertyName, 'var')), ' \\');
My PHP version is 5.3.8 and i use apache2 on a mac os x system based on mac ports
It works if i remove the second param, or if i wrap this line with a second trim function
$declaredType = trim(trim(implode(' ', $this->getPropertyTagValues($className, $propertyName, 'var')), ' \\'));
any ideas ?
discussion ?
or shoud i write this as a patch ?
Related issues
Associated revisions
[BUGFIX] "Wrong" EOL characters break parsing of doc comments
When \r\n was used as EOL instead of just \n the parsed doc comments
would retain the \r which would cause confusing exceptions in some
cases later on.
Change-Id: I632ced42f1f337cb7546ed411bcfde2e92011c2e
Fixes: #31363
Related: #32466
Related: #31087
Releases: 1.0, 1.1
[BUGFIX] "Wrong" EOL characters break parsing of doc comments
When \r\n was used as EOL instead of just \n the parsed doc comments
would retain the \r which would cause confusing exceptions in some
cases later on.
Change-Id: I5210bb5308558640f7b1e567eaf9a184c1f5a2d5
Fixes: #31363
Related: #32466
Related: #31087
Releases: 1.0, 1.1
History
#1 Updated by Karsten Dambekalns almost 4 years ago
- Target version deleted (
1.0.0)
#2 Updated by Julian Kleinhans almost 4 years ago
i have resolved the problem
The file was damage..
copy content, delete file, create new file, paste content and all works
#3 Updated by Julian Kleinhans almost 4 years ago
someone can close this issue please