Bug #29792

exceeding arguments are ignored if a command has optional arguments

Added by Karsten Dambekalns almost 4 years ago. Updated almost 4 years ago.

Status:Resolved Start date:2011-09-14
Priority:Must have Due date:
Assigned To:Bastian Waidelich % Done:

100%

Category:MVC
Target version:TYPO3 Flow Base Distribution - 1.0.0
PHP Version: Complexity:
Has patch: Affected Flow version:

Description

When kickstarting a model with

./flow3 kickstart:model TYPO3.Blog Blog title:string description:string

the generated code will not contain any trace of the title property. A "workaround" is possible: Calling

./flow3 kickstart:model TYPO3.Blog Blog dummy:prop title:string description:string

will result in a model with title and description (and without dummy).

That could very well be a problem of CLI argument handling, though.

Associated revisions

Revision a43360b3
Added by Bastian Waidelich almost 4 years ago

[!!!][BUGFIX] Optional CLI arguments have to be named

Currently exceeding arguments are ignored if a command has optional
arguments, because the RequestBuilder then can't differentiate them.

This change requires options to be named:
For commands expecting one optional argument you were able to write
./flow3 command value
Now you'd have to write
./flow3 command --optional-argument value

Change-Id: Ia9f59326e5c4dc793102db20883ae798ae2f27cd
Resolves: #29792

History

#1 Updated by Bastian Waidelich almost 4 years ago

  • Project changed from TYPO3.Kickstart to TYPO3.Flow
  • Assigned To set to Bastian Waidelich

#2 Updated by Bastian Waidelich almost 4 years ago

  • Subject changed from kickstart:model ignores first given property to exceeding arguments are ignored if a command has optional arguments
  • Category set to MVC
  • Status changed from New to Accepted

#3 Updated by Bastian Waidelich almost 4 years ago

The problem seems to be that the kickstart:model has a third argument force that is optional.
So the third argument is mapped to this method parameter.

I currently don't know a solution for this, but I'll look into it again.

#4 Updated by Mr. Hudson almost 4 years ago

  • Status changed from Accepted to Under Review

Patch set 1 of change Ia9f59326e5c4dc793102db20883ae798ae2f27cd has been pushed to the review server.
It is available at http://review.typo3.org/4979

#5 Updated by Bastian Waidelich almost 4 years ago

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

#6 Updated by Karsten Dambekalns almost 4 years ago

  • Target version changed from 1230 to 1.0.0

Also available in: Atom PDF