Bug #1064

Non-existing configuration options should throw an exception

Added by Karsten Dambekalns about 7 years ago. Updated almost 5 years ago.

Status:Resolved Start date:2008-07-15
Priority:Should have Due date:
Assigned To:Robert Lemke % Done:

100%

Category:Configuration
Target version:- Estimated time:0.50 hour
PHP Version: Complexity:
Has patch: Affected Flow version:

Description

When accessing an option in a configuration container that has not been set (i.e. does not exist) an exception should be thrown. Currently an object is returned in all cases; if using that it may have unexpected results due to automatic typecasting in PHP (e.g. it evaluates to TRUE if used as boolean).

If an exception would be thrown the typo or missing configuration would be visible immediately.

Associated revisions

Revision a43654ac
Added by Robert Lemke about 7 years ago

  • FLOW3: (Configuration) Configuration containers are now locked by the configuration manager when they are retrieved. Fixes #1064.
  • FLOW3: Little speed optimization (reflection) in the bootstrap.

Revision 852f6d94
Added by Robert Lemke about 7 years ago

  • FLOW3: (Configuration) Added a more meaningful exception for the case of trying to access a non-existing configuration option. Addresses #1064.

Revision 3e6e071f
Added by Robert Lemke almost 7 years ago

  • FLOW3: (Configuration) Configuration containers are now locked recursively. Fixes #1064.
  • FLOW3: (MVC) Since recently it was allowed to set keys like "FLOW3_MVC" as package key in the Request object in order to route into sub packages. That was kind of dirty. Now there's a new option setControllerComponentNamePattern() which can be reached from the routes configuration. This doesn't work in CLI mode though (routing into sub packages that is)
  • FLOW3: (Package) The package object did not check if the specified package key is valid - now it does.
  • TYPO3: Further experiments with the routing and the different controllers.

History

#1 Updated by Robert Lemke about 7 years ago

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

Applied in changeset r1034.

#2 Updated by Robert Lemke almost 7 years ago

  • Status changed from Resolved to Accepted
  • Assigned To set to Robert Lemke
  • % Done changed from 100 to 50

The configuration manager only locks the container on the first level - the container does not recursively lock its sub containers!

#3 Updated by Robert Lemke almost 7 years ago

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

Applied in changeset r1080.

Also available in: Atom PDF