Task #5658

Inconsistent class names in sub namespaces (Part II)

Added by Robert Lemke almost 10 years ago. Updated about 9 years ago.

Status:
Resolved
Priority:
Must have
Assignee:
Category:
-
Start date:
2009-01-26
Due date:
% Done:

100%

Sprint:
PHP Version:
Has patch:
Complexity:

Description

From the refactoring before alpha1 there are still a few edge cases concerning the naming of classes which turned out to be disturbing. Especially the rule "the main purpose of namespaces is categorization and ordering" was a bit neglected by allowing these special cases.

Currently allowed edge case           Future class name
-----------------------------------------------------------------------------------------
\F3\FLOW3\Object\Manager              \F3\FLOW3\Object\ObjectManager
\F3\Foo\Bar\Builder                   \F3\Foo\Bar\BarBuilder
\F3\FLOW3\Object\Factory              \F3\FLOW3\Object\Factory
To be discussed:
  • Rename "AbstractFoo" to "FooAbstract"
  • Rename "InvalidFoo" to "InvalidFooException"
Scope of this ticket:
  1. Refactor class names which don't follow the above rules.
  2. Add the above rules to the CGL.

migrateclassnames.php View (20.3 KB) Robert Lemke, 2010-01-15 15:53

Associated revisions

Revision 027a4016 (diff)
Added by Robert Lemke almost 10 years ago

[~TASK] FLOW3 (AOP): Removed the "Resource" sub package from the blacklisted sub packages because it now contains a class (Resource) which needs to be persistable.
[-FEATURE][!!!] FLOW3 (MVC): For now removed the request hash feature (HMAC) because it mocks a level of security for incoming data which it doesn't provide. The current mechanism effectively puts control over content security into Fluid templates and it doesn't belong there. Although there might be a need for a request hash, the content security must be implemented by other means. Relates to #4960 and relates to #5659.
[+FEATURE] FLOW3 (MVC): Implemented support for file uploads. Uploading files is cooperation between the Web Request Builder, the Property Mapper and the Resource sub package. The solution included in this commit provides handling of incoming files (including nested arguments) and transparent conversion into Resource objects. Resources (files) are only stored once, no matter how often they are uploaded or what original filename they carried. Still missing: view helper, documentation and automatic purging of unused resource files. Addresses #342.
[~API][!!!] FLOW3 (Property): Renamed the property mapper class to "PropertyMapper" (was just "Mapper" before). Relates to #5658
[+FEATURE] FLOW3 (Property): The Property Mapper now supports a mechanism called Object Converters. These convertes enable the mapper to convert strings, arrays or numbers to certain objects, for example a unix time stamp to a DateTime object. Resolves #5660.
[+FEATURE] FLOW3 (Reflection): Implemented the methods "isPropertySettable" and "isPropertyGettable" for the ObjectAccess class.
[~TASK] FLOW3 (Resource): Renamed the StreamWrapper class to StreamWrapperAdapter
[+FEATURE] FLOW3 (Resource): Implemented a ResourceObjectConverter which is capable of converting arrays or strings to Resource objects.
[+FEATURE] FLOW3 (Utility): Implemented a setValueByPath() method for the Array utilities class.
[+FEATURE] FLOW3 (Utility): Added support for the _FILES super global to the Environment class. The array of information about uploaded files can be obtained in a much cleaner way than PHP provides it by the new getUploadedFiles() method.

Revision 11bf8ad9 (diff)
Added by Robert Lemke almost 10 years ago

[+FEATURE][+API] Fluid (ViewHelper): The Resource view helper now supports Resource objects: Like before you can provide a path and package key pointing to a static package resource or you pass it a resource object. Relates to #5822
[~TASK][~API] Fluid (ViewHelper): The ActionViewhelper now produces only absolute URIs. The argument "absolute" is now obsolete.
[~TASK] Fluid (ViewHelper): Defined additional reserved keywords "on", "off", "yes" and "no" in the TemplateVariableContainer.
[~TASK] FLOW3 (Resource): Renamed a few classes in FLOW3/Resource/: "Manager" -> "ResourceManager", "Publisher" -> "ResourcePublisher". Relates to #5658
[~TASK] FLOW3 (Cache): Defined a new "magic" tag for the cache frontends: TAG_PACKAGE can now be used wherever cache entries should be flushed if any package is activated or deactivated. Relates to #5774
[~TASK] FLOW3: Replaced occurrences of "[fF]ileName" with "[fF]ilename".
[~TASK] FLOW3 (Package): isPackageAvailable() and isPackageActive() no longer throw exceptions if the given parameter is not a valid string. However they still return FALSE of course in those cases.
[+FEATURE][+API] FLOW3 (Reflection): Added a new method isMethodTaggedWith() to the Reflection Service.
[+FEATURE][+API] FLOW3 (Resource): Completely reworked the resource management module. It now supports persistent resources, file uploads and provides a more flexible publishing mechanism. Resolves #5822

[+FEATURE] FLOW3 (Resource): Implemented an Object Converter for resources which can handle file uploads.
[~TASK] FLOW3 (Utility): Renamed Files::mimeTypeFromFilename() and Files::mediaTypeFromFilename() to Files::getMimeTypeFromFilename() and Files::getMediaTypeFromFilename() respectively.
[~CONFIGURATION][~API] FLOW3 (Resource): Changed the names of settings for the Resource module. Please refer to the updated Settings.yaml for the new options.
[~TASK] FLOW3 (Documentation): Documented the new Resource module.
[~TASK] ExtJS: Updated the view helpers to match the new Resource framework. Relates to #5822
[~TASK] FLOW3: Implemented additional rewrite rules in the .htaccess file to support the new static resources publish mechanism.

Revision 6d8b1e4a (diff)
Added by Robert Lemke almost 10 years ago

[+FEATURE][+API] Fluid (ViewHelper): The Resource view helper now supports Resource objects: Like before you can provide a path and package key pointing to a static package resource or you pass it a resource object. Relates to #5822
[~TASK][~API] Fluid (ViewHelper): The ActionViewhelper now produces only absolute URIs. The argument "absolute" is now obsolete.
[~TASK] Fluid (ViewHelper): Defined additional reserved keywords "on", "off", "yes" and "no" in the TemplateVariableContainer.
[~TASK] FLOW3 (Resource): Renamed a few classes in FLOW3/Resource/: "Manager" -> "ResourceManager", "Publisher" -> "ResourcePublisher". Relates to #5658
[~TASK] FLOW3 (Cache): Defined a new "magic" tag for the cache frontends: TAG_PACKAGE can now be used wherever cache entries should be flushed if any package is activated or deactivated. Relates to #5774
[~TASK] FLOW3: Replaced occurrences of "[fF]ileName" with "[fF]ilename".
[~TASK] FLOW3 (Package): isPackageAvailable() and isPackageActive() no longer throw exceptions if the given parameter is not a valid string. However they still return FALSE of course in those cases.
[+FEATURE][+API] FLOW3 (Reflection): Added a new method isMethodTaggedWith() to the Reflection Service.
[+FEATURE][+API] FLOW3 (Resource): Completely reworked the resource management module. It now supports persistent resources, file uploads and provides a more flexible publishing mechanism. Resolves #5822

[+FEATURE] FLOW3 (Resource): Implemented an Object Converter for resources which can handle file uploads.
[~TASK] FLOW3 (Utility): Renamed Files::mimeTypeFromFilename() and Files::mediaTypeFromFilename() to Files::getMimeTypeFromFilename() and Files::getMediaTypeFromFilename() respectively.
[~CONFIGURATION][~API] FLOW3 (Resource): Changed the names of settings for the Resource module. Please refer to the updated Settings.yaml for the new options.
[~TASK] FLOW3 (Documentation): Documented the new Resource module.
[~TASK] ExtJS: Updated the view helpers to match the new Resource framework. Relates to #5822
[~TASK] FLOW3: Implemented additional rewrite rules in the .htaccess file to support the new static resources publish mechanism.

Revision 479ecb0c (diff)
Added by Robert Lemke almost 10 years ago

[~TASK] FLOW3 (Documentation): Updated the Coding Guidelines: removed inconsistent exceptions from the general class naming rules. Also added the rule that names of aspect classes must end with "Aspect". Relates to #5658
[~TASK] Global: Renamed many classes and interfaces in order to be consistent with FLOW3's naming rules. A migration script to update third-party applications will follow soon. Resolves #5658

Revision 7a4ae368 (diff)
Added by Robert Lemke almost 10 years ago

[~TASK] Global: Commit of those files whose case of the filename changed. Relates to #5658

Revision 52033d13 (diff)
Added by Robert Lemke almost 10 years ago

[~TASK] FLOW3 (Documentation): Updated the coding guidelines. Somehow the changes I previously made for r3643 are lost, so here they are again. Relates to #5658

History

#1 Updated by Robert Lemke almost 10 years ago

  • Status changed from New to Accepted
  • Target version set to 1.0 alpha 7

#2 Updated by Robert Lemke almost 10 years ago

  • % Done changed from 100 to 50

#3 Updated by Robert Lemke almost 10 years ago

Attached script which I used to migrate the class names of the FLOW3 Base distribution.

#4 Updated by Robert Lemke almost 10 years ago

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

Applied in changeset r3643.

Also available in: Atom PDF