Bug #48763

kickstarter creates not valid code

Added by Simon Schaufelberger about 2 years ago. Updated 12 months ago.

Status:Resolved Start date:2013-06-02
Priority:Must have Due date:
Assigned To:- % Done:

100%

Category:-
Target version:-
Affected Flow version:(any)

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
Added by Rens Admiraal 12 months 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 over 1 year 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 over 1 year 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 12 months 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 12 months 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 12 months ago

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

Also available in: Atom PDF