Bug #26938
Missing phpdoc attributes of the class comment
| Status: | Accepted | Start date: | 2011-05-20 | |
|---|---|---|---|---|
| Priority: | Should have | Due date: | ||
| Assignee: | Rens Admiraal | % Done: | 0% |
|
| Category: | - | |||
| Target version: | - | |||
| Votes: | 0 |
Description
AFAIK there should be at least the following attributes inside the class comment block.
- @author The Author <author@example.org>
- @package ExtKey
Related issues
| related to Extension Builder - Bug #32166: Generated code contains wrong GPL / LGPL licence information | Resolved | 2011-11-29 |
History
Updated by Stefan Galinski about 2 years ago
Also this should be consistent in all created php files including the test files.
Updated by Rens Admiraal almost 2 years ago
- Status changed from New to Needs Feedback
- Assignee set to Rens Admiraal
Hi Stefan,
I can't find anything about the @package annotation requirement, and as far as I can see the @author is also optional (http://typo3.org/documentation/document-library/core-documentation/doc_core_cgl/4.5.1/view/1/1/#id2625948)
I personally have doubts about adding the author... since what person should be the author? We can add multiple in the extension builder. And adding all persons as @author to all classes could become a mess... What do you think?
Updated by Stefan Galinski almost 2 years ago
Hi Rens,
IMHO you are right that both phpdoc annotations should be added manually if required, but at least the styles of the current classes should be unified. Currently it's a huge difference between the test files and the related source files.
Updated by Rens Admiraal almost 2 years ago
- Status changed from Needs Feedback to Accepted
If that's the case you're completely right :-) I would even want to go a bit further for an upcoming release: make the internal code uniform and CGL compatible...
Thanks for pointing us to this one.
Updated by Steffen Müller almost 2 years ago
ATM The class comment of the Model Unit Test looks like:
* @version $Id$ * @copyright Copyright belongs to the respective authors * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3 or later * * @package TYPO3 * @subpackage testext * * @author alice@example.com
I'd also suggest to remove this.
Another issue here is that the licence comment in files inside Classes/ refers to GPL version 3 or later. But CGL suggest GPL 2 or later, which is used in the core.
* This script is part of the TYPO3 project. The TYPO3 project is * free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version.
I'd suggest to change this to "version 2 or later".