Task #26662

Fix and cleanup UriBuilder

Added by Bastian Waidelich about 4 years ago. Updated about 4 years ago.

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

100%

Category:MVC - Routing
Target version:-
Sprint: Has patch:
PHP Version: Complexity:

Description

Currently the UriBuilder does not reliably support SubRequests and it has some flaws, that should be fixed.
Some facts:

  • setRequest() resets the UriBuilder ($this->reset()) - correct
  • setRequest() expects an \F3\FLOW3\MVC\RequestInterface - should be \F3\FLOW3\MVC\Web\Request !?
  • setArguments() prefixes specified arguments, if argumentPrefix is not empty - incorrect, setArguments should be a simple setter for $this->arguments
  • getArgments() returns all arguments, including non-prefixed - correct, if setter is fixed
  • setFormat() stores the specified format string lower cased - probably ok
  • setArgumentPrefix() (non-api) "Specifies the prefix to be used for all arguments." - should be renamed to setControllerArgumentPrefix() removed. Prefix comes from Request::getArgumentNamespace()
  • reset() sets argument prefix and all arguments of the parent request if $this->request is a SubRequest - incorrect. reset(9 should completely reset the UriBuilder (except for the request). parent request arguments should be added in build()
  • uriFor() modifies $this->arguments - incorrect, modified arguments should be passed to build() as method arguments

Related issues

blocks Conference Management - Story #26663: Solve FLOW3/Phoenix bugs for sprint "Call for Papers" Resolved 2011-05-06

Associated revisions

Revision 1174777f
Added by Bastian Waidelich about 4 years ago

[+BUGFIX] Fix and cleanup UriBuilder

This is mainly a refactoring of the UriBuilder.
But there are some slight changes in behavior too:
1. setRequest() now expects an instance of F3\FLOW3\MVC\Web\Request,
not F3\FLOW3\MVC\RequestInterface
2. $this-arguments is not modified by any method apart
from setArguments() and reset()
3. setArgumentPrefix() (not part of the api) is removed,
the argument prefix is determined by the request instead

Change-Id: I18ae892857bc50cbbed754055d8bccb2fe5ac508
Resolves: #26662

History

#1 Updated by Bastian Waidelich about 4 years ago

  • Parent task set to #26663

#2 Updated by Bastian Waidelich about 4 years ago

  • Parent task deleted (#26663)

#3 Updated by Karsten Dambekalns about 4 years ago

  • Target version deleted (Call for Papers)

#5 Updated by Mr. Hudson about 4 years ago

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

#6 Updated by Mr. Hudson about 4 years ago

Patch set 2 of change I18ae892857bc50cbbed754055d8bccb2fe5ac508 has been pushed to the review server.
It is available at http://review.typo3.org/1960

#7 Updated by Mr. Hudson about 4 years ago

Patch set 3 of change I18ae892857bc50cbbed754055d8bccb2fe5ac508 has been pushed to the review server.
It is available at http://review.typo3.org/1960

#8 Updated by Mr. Hudson about 4 years ago

Patch set 4 of change I18ae892857bc50cbbed754055d8bccb2fe5ac508 has been pushed to the review server.
It is available at http://review.typo3.org/1960

#9 Updated by Mr. Hudson about 4 years ago

Patch set 5 of change I18ae892857bc50cbbed754055d8bccb2fe5ac508 has been pushed to the review server.
It is available at http://review.typo3.org/1960

#10 Updated by Bastian Waidelich about 4 years ago

  • Status changed from Accepted to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF