Bug #28327
Argument mapping falsely detects tags from method description - ReflectionService RegExp issue
Status: | Resolved | Start date: | 2011-07-20 | |
---|---|---|---|---|
Priority: | Should have | Due date: | ||
Assigned To: | Sebastian Kurfuerst | % Done: | 100% |
|
Category: | Reflection | |||
Target version: | TYPO3 Flow Base Distribution - 1.0.0 | |||
PHP Version: | Complexity: | |||
Has patch: | Affected Flow version: |
Description
Consider the following doc comment and method signature of a CommandController:
/** * An example command * * The comment of this command method is also used for FLOW3's help screens. The first line should give a very short * summary about what the command does. Then, after an empty line, you should explain in more detail what the command * does. You might also give some usage example. * * It is important to document the parameters with @param tags, because that information will also appear in the help * screen. * * @param string $requiredArgument This argument is required * @param string $optionalArgument This argument is optional * @return void */ public function exampleCommand($requiredArgument, $optionalArgument = NULL) { $this->view->appendContent('You called the example command.'); }
The property mapper will fail on this command because the "@param tags," is detected as an argument definition and then the property mapper tries to convert the first argument into "tags," ... which it can't'.
Associated revisions
[+BUGFIX] (Reflection): Only detect tags when they are at the beginning of a line
We should not detect tags like param foo when they are at the beginning of a line,
' now, as using a RegExp here could
and not inside freeform text.
We still use a heuristic, by searching for '*
have severe performance penalties.
Functional test adjusted.
Change-Id: Ic8440a8d95c8444573d49a0cbce684b1f7dbad48
Fixes: #28327
History
#1 Updated by Sebastian Kurfuerst about 4 years ago
- Subject changed from Argument mapping falsely detects tags from method description to Argument mapping falsely detects tags from method description - ReflectionService RegExp issue
#2 Updated by Sebastian Kurfuerst about 4 years ago
- Status changed from New to Accepted
- Assigned To set to Sebastian Kurfuerst
#3 Updated by Sebastian Kurfuerst about 4 years ago
- Category changed from MVC to Reflection
- Status changed from Accepted to Under Review
- % Done changed from 0 to 100
#4 Updated by Mr. Hudson about 4 years ago
Patch set 1 of change Ic8440a8d95c8444573d49a0cbce684b1f7dbad48 has been pushed to the review server.
It is available at http://review.typo3.org/3431
#5 Updated by Sebastian Kurfuerst about 4 years ago
- Status changed from Under Review to Resolved
#6 Updated by Karsten Dambekalns almost 4 years ago
- Target version changed from 1230 to 1.0.0