Bug #48763

kickstarter creates not valid code

Added by Simon Schaufelberger over 6 years ago. Updated over 5 years ago.

Status:
Resolved
Priority:
Must have
Assignee:
-
Target version:
-
Start date:
2013-06-02
Due date:
% Done:

100%


Description

i just wanted to create a class named "List" which was possible but then the next action crashed with an exeption since you cannot create a class named "List".

I found out that you cannot use those key words:
http://www.php.net/manual/en/reserved.keywords.php
so i would suggest to write a validator, that checks if a keyword is used when creating a new class via the command line.

Associated revisions

Revision fbee66f7 (diff)
Added by Rens Admiraal over 5 years ago

[BUGFIX] Class names not checked against reserved words

Generating a Model class did not check against the reserved words
that exist in PHP, which led to Classes like "List" which cannot
exist according to the PHP specification.

This only applies to Model classes, as all other generated classes
will have a suffix which does not trigger this issue. For example:
- ListCommandController
- ListController
- ListRepository

Resolves: #48763
Releases: master
Change-Id: I13de0d996ec5308e8b25e116f4d076e4804ae9eb

History

#1 Updated by Gerrit Code Review about 6 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.Kickstart has been pushed to the review server.
It is available at https://review.typo3.org/25705

#2 Updated by Gerrit Code Review about 6 years ago

Patch set 2 for branch master of project Packages/TYPO3.Kickstart has been pushed to the review server.
It is available at https://review.typo3.org/25705

#3 Updated by Gerrit Code Review over 5 years ago

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

#4 Updated by Gerrit Code Review over 5 years ago

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

#5 Updated by Rens Admiraal over 5 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF