Task #3567
Define FLOW3_SAPITYPE constant in bootstrap
Status: | Resolved | Start date: | 2009-06-04 | |
---|---|---|---|---|
Priority: | Could have | Due date: | ||
Assigned To: | - | % Done: | 100% |
|
Category: | Environment | |||
Target version: | - | |||
Sprint: | Has patch: | |||
PHP Version: | Complexity: |
Description
IMO global constants are as bad as global variables. So I'm happy there are only 4 constants needed yet in FLOW3.
They're all defined in FLOW3-bootstrap - except FLOW3_SAPITYPE, that's defined in the constructor of F3\FLOW3\Utility\Environment if it hasn't been defined before.
Attached patch fixes this. But maybe \F3\FLOW3\Utility\Environment::getSAPIType() could be a static method too so we wouldn't need to instantiate it at all and could move the Constant-definition up to the other three defines()...
Associated revisions
[+FEATURE] FLOW3 (AOP): Parse errors in AOP proxy code (introduced by a potential bug) will now be treated properly by throwing a meaningful exception.
[-FEATURE] FLOW3 (Configuration): Removed support for PHP-based configuration files. This caused a lot of overhead and in practice we want everyone to use YAML files anyway.
[+FEATURE] FLOW3 (Configuration): Implemented support for cached ("compiled") configuration. When the new FLOW3.yaml option "configuration: comileConfigurationFiles" is turned on, all configuration will be compiled into a PHP file which from then on is read instead of parsing the YAML files everytime. Please see the updated documentation for more information. Resolves #4460
[~TASK] FLOW3 (Configuration): Completely refactored the Configuration Manager and a few related classes. Its methods now each fullfil a clear purpose and work more effective. The method names now also better describe what each method is doing. Resolves #2711
[-TASK] FLOW3 (Configuration): Removed the WritableSourceInterface - this is now a standard feature of a configuration source.
[+TASK] FLOW3 (Core): Refactored and cleaned up the FLOW3 Bootstrap. Constants are now defined by a static method and all configuration related functionality has been moved to the Configuration sub package. Also replaced the evil die() calls by more handsome exit() calls. Relates to #2117
[+TASK] FLOW3 (Object): Moved some object initialization code from the Bootstrap to the Object Manager and further cleaned up the Object Manager's code. Wrote additional tests - now this class has 100% test coverage. Relates to #2117
[+API] FLOW3 (MVC): Added a few @api annotations to properties of the AbstractController and ActionController.
[-API] FLOW3 (Utility): Removed the getSAPIType() method from the Environment class. Just use the constant FLOW3_SAPITYPE instead. Resolves #3567 and relates to #2117.
[+FEATURE] FLOW3 (AOP): Parse errors in AOP proxy code (introduced by a potential bug) will now be treated properly by throwing a meaningful exception.
[-FEATURE] FLOW3 (Configuration): Removed support for PHP-based configuration files. This caused a lot of overhead and in practice we want everyone to use YAML files anyway.
[+FEATURE] FLOW3 (Configuration): Implemented support for cached ("compiled") configuration. When the new FLOW3.yaml option "configuration: comileConfigurationFiles" is turned on, all configuration will be compiled into a PHP file which from then on is read instead of parsing the YAML files everytime. Please see the updated documentation for more information. Resolves #4460
[~TASK] FLOW3 (Configuration): Completely refactored the Configuration Manager and a few related classes. Its methods now each fullfil a clear purpose and work more effective. The method names now also better describe what each method is doing. Resolves #2711
[-TASK] FLOW3 (Configuration): Removed the WritableSourceInterface - this is now a standard feature of a configuration source.
[+TASK] FLOW3 (Core): Refactored and cleaned up the FLOW3 Bootstrap. Constants are now defined by a static method and all configuration related functionality has been moved to the Configuration sub package. Also replaced the evil die() calls by more handsome exit() calls. Relates to #2117
[+TASK] FLOW3 (Object): Moved some object initialization code from the Bootstrap to the Object Manager and further cleaned up the Object Manager's code. Wrote additional tests - now this class has 100% test coverage. Relates to #2117
[+API] FLOW3 (MVC): Added a few @api annotations to properties of the AbstractController and ActionController.
[-API] FLOW3 (Utility): Removed the getSAPIType() method from the Environment class. Just use the constant FLOW3_SAPITYPE instead. Resolves #3567 and relates to #2117.
History
#1 Updated by Karsten Dambekalns about 6 years ago
- Subject changed from define constants in bootstrap to Define FLOW3_SAPITYPE constant in bootstrap
- Category set to Environment
When working on #3544 I had a similar thought... To me it sounds reasonable.
#2 Updated by Bastian Waidelich about 6 years ago
#3 Updated by Robert Lemke almost 6 years ago
- Status changed from New to Resolved
- % Done changed from 0 to 100
Applied in changeset r3107.