From 404409e6554826ba9df38425078dac63b56a2f55 Mon Sep 17 00:00:00 2001 From: Nico de Haen Date: Thu, 17 Apr 2014 08:39:53 +0200 Subject: [PATCH] [TASK] Preparation for TER release Remove legacy stuff related to not supported versions Releases: 6.2 Change-Id: Iab70beb2fd8e5068401990063dc19e6043e9b91e Reviewed-on: https://review.typo3.org/29528 Reviewed-by: Nico de Haen Tested-by: Nico de Haen --- ChangeLog | 375 ++++++++++-------- Classes/Domain/Model/Extension.php | 2 +- README.md | 21 - .../Private/Backend/Partials/formErrors.htmlt | 21 +- .../Private/Partials/formErrors.htmlt | 21 +- .../Private/Backend/Partials/FormErrors.html | 25 +- .../Private/Partials/FormErrors.html | 25 +- ext_emconf.php | 2 +- ext_tables.php | 2 +- locallang_db.xml | 37 -- 10 files changed, 238 insertions(+), 293 deletions(-) delete mode 100644 README.md delete mode 100644 locallang_db.xml diff --git a/ChangeLog b/ChangeLog index abf54d15..ee7ea221 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,168 +1,211 @@ -[BUGFIX] Tablename for parent class was wrong resolved -Resolves: #45232 -[BUGFIX] Switchable Controller actions were not loaded -Resolves: #44995 -Reviewed-on: https://review.typo3.org/18315 -[TASK] Fix broken compatibility test -Reviewed-on: https://review.typo3.org/18312 -[Bugfix] Fix unsufficient comparison of domain object names -Since CamelCase names result in a non underscored tablename it is not allowed to have a CamelCase and a non Camelcase model name in the same extension -They would both be stored in a tabvle called domain_model_camelcase -Reviewed-on: https://review.typo3.org/18311 -[TASK] Adapt target versions to v6 -Reviewed-on: https://review.typo3.org/18310 -[BUGFIX] parse correct tablename from class name -The new namespaces can have 4 or 5 parts -Fix mixup between qualified and full qualified class names -Reviewed-on: https://review.typo3.org/18309 -[TASK] Improve MappingViewHelper -In certain configurations the mapping of the record type was insufficient. -- removes also the support for locallang xml format -Reviewed-on: https://review.typo3.org/18308 -[TASK] Remove logging line -[TASK] Do not list "old" extensions -Since the extension builder can't convert old extensions to new ones they -should not be listed to be loaded -[TASK] Add missing language files in fixtures extension -[TASK] Fix non fully qualified typeHints -There is no way to distinct between fully qualified and non fully qualified namespaces in type hints for method parameter -So we add a trailing back slash always -Tests are adapted so all are green again!! -[TASK] Adapt ObjectStorage class name -[TASK] Removed wrong suggest position in em_conf.php -[TASK] Tablenames should not include namespace of the extension +[TASK] Enable merging of xliff files +This patch enables "merging" of xliff localization files. +Manually added key/label pairs are preserved on rewriting +the files, but changes made in the modeler are applied. +When renaming a model or a property the old id/label is +not removed, since we would have to load all labels from +the previous version of the extension to identify renamed +items. +Support for xml format is dropped. +Resolves: #57688 +[TASK] Remove old doc/manual.sxw +[TASK] Include new Extension Manual +Resolves: #57853 +[TASK] Enable property type specific options +Prepare TCA partials for FAL properties +Since the TCA for FAL is generated by a method that returns an array, +we have to rearrange the template for the domain objects TCA file. +All Partials define an array now, not only the key value pairs +[BUGFIX] Set correct default values +Resolves: #57738 +[TASK] Use sortable in inline appearance +Resolves: #55682 +[TASK] Add rte_transform to rte options +Resolves: #53479 +[FEATURE] Enable DB Updates in modeler +Resolves: #57654 +[TASK] Adapt unit tests +Extend non deprecated UnitTestCase +tests controller->addFlashMessage +Resolves: #28769 +[TASK] Dont create a Controller class if no actions are defined +Resolves: #57687 +[TASK] Add warning and link to WIKI in all write actions +Also includes some improvements in the generated Templates +Resolves: #57686 +[TASK] Followup: Use t3skin-icons for DomainObject-editor +Previous commit mixed up save- and close-icons. +Resolves: #57432 +[TASK] Add option to make domainobjects categorizable +Default-name for category-field is "categories". +Description how categorization is enabled: +http://wiki.typo3.org/TYPO3_6.0#Category +Resolves: #56968 +[TASK] Use t3skin-icons for DomainObject-editor +Space in the heading of that box is limited. +Replace words like "Cancel" with an icon. +Use icons from t3skin. +Resolves: #57432 +[BUGFIX] Refactor TCA rendering +Resolves: #50064 +[FEATURE] Toggle extended configuration options +To enable a simple interface but more options for the +experienced developer there is an advancedMode which +toggles additional options in the interface +Access key is "a" +Also removes 3 Javascript files that were not used +Resolves: #57423 +[BUGFIX] Wrong type field lists +The showitem lists in TCA had wrong commas introduced in https://review.typo3.org/#/c/28450/ +If all optional fields are added, the list starts with ' ,hidden' +Resolves: #56965 +[BUGFIX] Fix some styling issues +Resolves: #56094 +[TASK] DomainObject: Add options to make default-fields optional +By default the fields deleted, disabled (in db: hidden) as well +as starttime/endtime are added to a domain-object. Allow to +turn them of on per object and have files properly be generated. +Resolves: #56965 +[BUGFIX] Missing clearfix for plugins and persons +Thanks to Robert Vock for the patch +Resolves: #56093 +[BUGFIX] Autoloader fails on Windows +str_replace fails because of different directory-separator +Windows uses. +Resolves: #56619 +[TASK] Cleanup Ajax URL generation +The Ajax URL generation is cleaned up to +match the current state in TYPO3 master (6.2) +The compatibility for < 6.2 is still retained. +Related: #57096 +[TASK] Introduce advancedMode setting +The advanced mode flag should enable to fulfill the needs of a +"first time" user and an advanced user in extension development +Also added missing TYPO3 versions to Extension configuration panel +in the modeler +Resolves: #57201 +[TASK] Use new docheader for backend template +Thanks to Robert Vock for the patch +Resolves: #56091 +[BUGFIX] Add dontvalidate to default editAction +This will allow opening a record that might not pass validators +to edit and update it once it is adjusted. +Resolves: #53398 +Resources/Private/PHP/tmp added as empty directory with .gitignore inside +Resources/Private/PHP/tmp was added as submodule without submodule +[BUGFIX] Missing quotes in class_exists parameter +Resolves: #56512 +[TASK] Use appropriate SQL handler class +Resolves: #56477 +[BUGFIX] Fix date format in code templates +Removes also a wrong trailing slash in CompatibilityTest +Resolves: #56476 +[BUGFIX] Make Extension Builder work with current master +In the current TYPO3 master branch (6.2) all modules +require a module token to avoid CSRF attacks. +Because of that, we need to change the smd endpoint +URL to be dynamic to generate the target URL +properly. +The change will make it work in master branch +but is still compatible with older TYPO3 versions. +Resolves: #56465 +[TASK] Integrate PHP-Parser +Use PHP-Parser based on tokenizer. +Single line comments are now restricted to appear before +nodes, otherwise they will be lost. +Needs still extensive testing to cover more possible coding +styles. +In general the handling of whitespaces and comments is sometimes +difficult; I adapted the printer to keep linebreaks in array +definitions and in method parameters +Resolves: #55686 +[FEATURE] Open in new window link +The link will appear on the upper right corner if the +module is not shown in it's own window +The issue is only party fixed, the print mode will be skipped +for now. Please open a new issue if you still think it is needed +Resolves: #53230 +[BUGFIX] Avoid error in EXT.Direct +Resolves: #55337 +[TASK] Remove wrong trailing backslashes +Resolves: #53775 +[BUGFIX] Replace wrong method call +There was a wrong call to the new method getFullyQualifiedClassName +[TASK] Replace non namespaced class references +Follow up to #54620 +[TASK] Generate UnitTests for default ControllerActions +Resolves: #54636 +[BUGFIX] Fix missing getter/setter tests +Creates getter/setter tests for 1:1 and n:1 relations +and properties of type \DateTime. +Resolves: #54713 +[BUGFIX] Replace non namespaced class call +Resolves: #54865 +[TASK] Use objectStorage mock in generated Domain Model Tests +Resolves: #54441 +[BUGFIX] Add missing backslash to namespace +Resolves: #54714 +[BUGFIX] Fix getter assertions in template for domain model tests +Resolves: #54712 +[TASK] Namespaced classes +Resolves: #54620 +[WIP] Add default values in declaration of class properties +Resolves: #54175 +[BUGFIX] Fix errors reported by UnitTests +phpunit 3.7 reported errors that were not detected +bei 3.6 +Resolves: #54658 +[TASK] Optimize modeler view +Various css modifications, to use less space per model +and to have bigger textfields and textareas +Resolves: #54440 +[TASK] Add cascade remove annotation +Zero to many relations should have a cascade remove annotation +Resolves: #53289 +[TASK] Remove getter dependency in domain model unit tests +Resolves: #54176 +[BUGFIX] Fix cropped primitive types in unit test names +Follow-up to 511a73969f709adc71860c5eee687645313ef247 +Resolves: #54170 +[TASK] Format copyright holders with ViewHelper +Resolves: #50400 +[TASK] Remove unused RenderViewHelper +[BUGFIX] Fix wrong namespace in test class templates +Resolves: #54058 +[TASK] Remove closing tags +[FEATURE] Use Standalone View for rendering +Resolves: #53877 +[BUGFIX] Remove leading \ from primitive types +Resolves: #53859 +Replace fixture with subject in CodeTemplates for Tests +Resolves: #53452 +[TASK] Prevent empty/dumb documentation to be sent to TER +Resolves: #50497 +[TASK] Synchronize sample documentation with template +Resolves: #51320 +[TASK] Fix non-namespaced class names +Resolves: #50390 +[TASK] Remove superfluous whitespace +Resolves: #50388 +[TASK] Write test for string-getters in model +While this test only checks for the default value NULL for string-typed +properties of a model, it's easy enough to adjust once one has a real +default value. +Resolves: #50367 +[BUGFIX] Add whitespace to inline-comments +Resolves: #50365 [TASK] Remove package annotations -Resolves:#43116 Thanks to Tilo Baller for the patch -[TASK] Updated target version and removed xml support -[BUGFIX] Renamed wrong default parent repository class -[TASK] Replaced old ExtensionManager class name -[BUGFIX] Fixed wrong defaultExtras configuration for RTE -Resolves:#42765 -[BUGFIX] getDocInstance can not be called in constructor -Resolves: #42448 -[TASK] Fix CGL violations InlineCommentWrongStyle -Resolves: #42365 -Added parser test for multiple interfaces -[TASK] TYPO3v6.0 compatibility Part 3 -Enable roundtrip/edit mode as it worked before (hopefully) -[TASK] TYPO3v6.0 compatibility Part 2 -Now the generated extensions are namespaced! Also a vendor name is added and can be modified in the GUI. -Edit (roundtrip) mode is NOT supported yet. (So there will be a part 3 of compatibility update) -Somehow the generated plugins can create,delete, list and show models, but not update. -I guess that's a extbase bug, since the repository update does not result in updated models. -[TASK] Compatibility with 6.0 Part 1(!) -All tests are green again. Removed all usage of deprecated class names in extension_builder. -This is called part 1 since the generated extensions are not yet namespaced!! -This will happen in part 2. This revision's edit mode should be compatible with 4.7 generated extensions! -The next revision will generate namespaced extensions and the edit mode will be only applicable for -extensions generated with that revision (or later) -Added missing arguments in Tests -[TASK] Minor CGL cleanups -- Uses tabs for indent in flexform XML -- Removes trailing space for storagePid -[BUGFIX] Adds default error styles for textareas, like inputs. -When extension builder generates the typoscript for an extension, -it includes default css that turns input elements red on form -error (class: 'f3-form-error'). This should also apply to textareas -as well. They, too, receive the error class, but the styles have -always been missing. -[BUGFIX] Fix wrong flexform reference -Resolves: #39270 -[TASK] Fixed broken unit test -String 'true' is not equal to TRUE -Uploaded v2.4 to TER -[TASK] Fix broken unit test -Example extension needed some updates -[TASK] Added searchfields to TCA -Enable the searching over fields of new created domain objects in backend list view -[BUGFIX] Replaced wrong inline configuration -It should be collapseAll instead of collapse in appearance TCA -Resolves: #38371 -[BUGFIX] Reapplied xlf replacements -[BUGFIX] static typoscript had wrong conditions -The condition testing only the classHirarchy was not sufficient in certain cases, -since the configuration has to be created also, if a model was only mapped to another table -[TASK] Prepare default reST Documentation [TASK] Reflect overwrite settings in mkdir_deep -[BUGFIX] Parameter for action methods had wrong type hint -Fixed some unit tests (Typoscript setup for features and lowercase classnames in parameter type hints) -[TASK] Enable sorting of models -Resolves: ##29110 -[TASK] Replaced locallang.xml with xlf in templates -Resolves: #37945 -[{BUGFIX] Correct var type for Date property -Resolves: #36520 -[BUGFIX] Removes typos in locallang_mod.xlft -Resolves: #36552 -[TASK] Changed error type to warning for wrong type field It should be possible to save an extension, even if the table that should be extended has a wrong typefield column data type. (Like the pages table) -[TASK] add hint about rewritten property mapper in generated TypoScript Setup -[TASK] Fix missing type hint in Class Building -[BUGFIX] Fix generated TCA for Single-Table Inheritance -we need to use require() instead of require_once() to include the subclass -TCA reliably. I just had the case that in some circumstances, the TCA -is loaded multiple times (for example when having multiple plugins -on the same page). For the first time, the TCA is complete, i.e. contains -both the parent and the sub-class fields. However, at the second load, -only the parent class is loaded because require_once skips the subclasses -as PHP had them already loaded. -That's a really hard-to-track-down issue which we should solve in the -Extension Builder. -[RELEASE] Uploaded Version 2.3 to TER -{TASK] Added locallang_db.xlf file -[TASK] Remove unused FlashMessage in Layout -[TASK] Fix broken function test -[BUGFIX] Lazy loading tag was not set -Resolves: #35040 -[BUGFIX] Change storagePid constant type to string -Resolves: #35685 -[TASK] It should be possible to add TYPO3 specific property names -Fields like crdate, sorting etc. should be possible as model properties. -This will result in a warning now, not in an error. -[BUGFIX] Column type check was not dbal compatible -Not sure if the result of "DESCRIBE" is the same on other database engines -Related to #34320 -[BUGFIX] Wrong conditions generated warnings -If no actions were configured there was a warning even if no Plugin or Backend module was added -Merge "[BUGFIX] Parent class settings were not reflected" -[BUGFIX] Parent class settings were not reflected -Fix errors in Tx_ExtensionBuilder_Configuration_ConfigurationManager->getParentClassForEntityObject -[BUGFIX] RTE fields not rendered on backend -Relates #34919 -[BUGFIX] Foud 2 more missing form temple partials -[BUGFIX] Delete action still had a true default value -[BUGFIX] Removed wrong slashes to avoid parser warning -[TASK] Add a check for the type fields type -The type field column may not be of type INT with single table inheritance -since the field can not be used to store the record type -Resolves: #34320 -[BUGFIX] Change parent class if a domain objects type changes -Resolves: #34651 -[BUGFIX] Remove method="post" argument from form viewhelper in generated templates -Resolves #34484 -[TASK] !!!Boolean property defaults to FALSE now -To avoid error messages generated by the fluid form.checkbox view helper, boolean properties default value is FALSE now. -This might be a breaking change in case there is a distinction between -isset() and FALSE in conditions (which is no good code style anyway...) -Resolves: #34537 -[TASK] Added missing property types templates -Also the not yet in extbase implemented property types are marked now -Resolves: #34687 -[TASK] Enable target versions and xliff files -Create xliff files for target versions > 4.5 -Merging of xlif files not yet supported! -Resolves #32027 -Resolves #29263 -[TASK] Added xlf files for language labels -The locallang.xml will remain for being compatible with TYPO3 v 4.5 -[TASK] Refactored CodeGenerator -[TASK] Refactoring Controller, Introduced Repository -[BUGFIX] added condition to avoid calling non existent method -Resolves #34310 -The method setUseExtendedRelationTableName may only be called on -Tx_ExtensionBuilder_Domain_Model_DomainObject_Relation_AnyToManyRelations -[TASK] Disable actions by default -If all actions are enabled by default, this might result in superflous action methods in the Controller and thus in a security risk, if the developer might not be aware of them ---HOW TO CREATE THE CHANGELOG ---=========================== --- ---git log 4b2ae6abc8bfafde..HEAD --pretty=format:"%s%n%b%n" | grep -v "^$" | grep -v "Change-Id*" \ No newline at end of file +Resolves: #43118; +[BUGFIX] Fix order of defining typefield +There were some use cases where the single table inheritance caused +wrong TCA definitions. +To avoid that, the order of TCA definitions is changed and the TCA +for children of DomainObjects is defined now in ext_tables.php +instead in a single TCA file. +Resolves: #46893, #45860; +Support native dates + --HOW TO CREATE THE CHANGELOG + --=========================== + -- + --git log 18e07320c8aac..HEAD --pretty=format:"%s%n%b%n" | grep -v "^$" | grep -v "Change-Id*\|Reviewed-by*\|Reviewed-on*\|Tested-by*\|Releases*" > ChangeLog \ No newline at end of file diff --git a/Classes/Domain/Model/Extension.php b/Classes/Domain/Model/Extension.php index 4bb30b84..172ebe21 100644 --- a/Classes/Domain/Model/Extension.php +++ b/Classes/Domain/Model/Extension.php @@ -178,7 +178,7 @@ class Extension { * the lowest required TYPO3 version * @var float */ - private $targetVersion = 4.5; + private $targetVersion = 6.0; /** * diff --git a/README.md b/README.md deleted file mode 100644 index 518fd36d..00000000 --- a/README.md +++ /dev/null @@ -1,21 +0,0 @@ - -This is a preview of the ExtensionBuilder with integrated [`PHP-Parser`][1] - -The whole PHP parsing and code generation is much more reliable and controllable now, but there are some drawbacks: - -Since the whole syntax is parsed into a node tree and comments are attached to nodes, single line comments which are -not related to a syntax node will be lost. - -Whitespaces like linebreaks, tabs etc. are ignored in the original Parser. The PrinterService extends the original -printer class, to enable at least multi-line method parameter and a multi-line notation of arrays. But there is no way -to preserve the original number of indentations of the parsed source code. - -On the other hand, we can modify the output according to the TYPO3 CGL. For example an if-statement with missing space -like if($foo) is printed as if ($foo) - the missing space is added by the printer. - -You will find several tests in [`Tests/Functional/ParseAndPrint.php`][2]. There you can easily add Tests if you want to -test a certain formatting. The PrinterService can be overriden by the default Extbase object registration to enable -custom format conventions. - - [1]: https://github.com/nikic/PHP-Parser - [2]: https://github.com/nicodh/extension_builder/blob/php-parser/Tests/Functional/ParseAndPrintTest.php \ No newline at end of file diff --git a/Resources/Private/CodeTemplates/Extbase/Resources/Private/Backend/Partials/formErrors.htmlt b/Resources/Private/CodeTemplates/Extbase/Resources/Private/Backend/Partials/formErrors.htmlt index 20fcca5e..09435b88 100644 --- a/Resources/Private/CodeTemplates/Extbase/Resources/Private/Backend/Partials/formErrors.htmlt +++ b/Resources/Private/CodeTemplates/Extbase/Resources/Private/Backend/Partials/formErrors.htmlt @@ -1,21 +1,4 @@ {namespace k=EBT\ExtensionBuilder\ViewHelpers} - - - f:form.errors -
- error.message - f:if condition="error.propertyName" -

- error.propertyName: - f:for each="error.errors" as="errorDetail" - errorDetail.message - /f:for -

- /f:if -
-/f:form.errors -
- f:form.validationResults for="object" f:if condition="validationResults.flattenedErrors"
    @@ -27,6 +10,4 @@ /f:for
/f:if -/f:form.validationResults -
-
+/f:form.validationResults \ No newline at end of file diff --git a/Resources/Private/CodeTemplates/Extbase/Resources/Private/Partials/formErrors.htmlt b/Resources/Private/CodeTemplates/Extbase/Resources/Private/Partials/formErrors.htmlt index 20fcca5e..09435b88 100644 --- a/Resources/Private/CodeTemplates/Extbase/Resources/Private/Partials/formErrors.htmlt +++ b/Resources/Private/CodeTemplates/Extbase/Resources/Private/Partials/formErrors.htmlt @@ -1,21 +1,4 @@ {namespace k=EBT\ExtensionBuilder\ViewHelpers} - - - f:form.errors -
- error.message - f:if condition="error.propertyName" -

- error.propertyName: - f:for each="error.errors" as="errorDetail" - errorDetail.message - /f:for -

- /f:if -
-/f:form.errors -
- f:form.validationResults for="object" f:if condition="validationResults.flattenedErrors"
    @@ -27,6 +10,4 @@ /f:for
/f:if -/f:form.validationResults -
-
+/f:form.validationResults \ No newline at end of file diff --git a/Tests/Fixtures/TestExtensions/test_extension_v3/Resources/Private/Backend/Partials/FormErrors.html b/Tests/Fixtures/TestExtensions/test_extension_v3/Resources/Private/Backend/Partials/FormErrors.html index b19c6ce1..0d83422e 100644 --- a/Tests/Fixtures/TestExtensions/test_extension_v3/Resources/Private/Backend/Partials/FormErrors.html +++ b/Tests/Fixtures/TestExtensions/test_extension_v3/Resources/Private/Backend/Partials/FormErrors.html @@ -1,13 +1,12 @@ - -
- {error.message} - -

- {error.propertyName}: - - {errorDetail.message} - -

-
-
-
\ No newline at end of file + + +
    + +
  • + {propertyPath}:
      +
    • {error}
    • +
    +
  • +
+
+
\ No newline at end of file diff --git a/Tests/Fixtures/TestExtensions/test_extension_v3/Resources/Private/Partials/FormErrors.html b/Tests/Fixtures/TestExtensions/test_extension_v3/Resources/Private/Partials/FormErrors.html index b19c6ce1..0d83422e 100644 --- a/Tests/Fixtures/TestExtensions/test_extension_v3/Resources/Private/Partials/FormErrors.html +++ b/Tests/Fixtures/TestExtensions/test_extension_v3/Resources/Private/Partials/FormErrors.html @@ -1,13 +1,12 @@ - -
- {error.message} - -

- {error.propertyName}: - - {errorDetail.message} - -

-
-
-
\ No newline at end of file + + +
    + +
  • + {propertyPath}:
      +
    • {error}
    • +
    +
  • +
+
+
\ No newline at end of file diff --git a/ext_emconf.php b/ext_emconf.php index c3995fd7..9e501999 100755 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -29,7 +29,7 @@ 'clearCacheOnLoad' => 0, 'lockType' => '', 'author_company' => '', - 'version' => '2.5.2', + 'version' => '6.1', 'constraints' => array( 'depends' => array( 'typo3' => '6.0-6.2.99', diff --git a/ext_tables.php b/ext_tables.php index 18da5e30..932c2c89 100644 --- a/ext_tables.php +++ b/ext_tables.php @@ -21,7 +21,7 @@ array( 'access' => 'user,group', 'icon' => 'EXT:extension_builder/ext_icon.gif', - 'labels' => 'LLL:EXT:extension_builder/Resources/Private/Language/locallang_mod.xml', + 'labels' => 'LLL:EXT:extension_builder/Resources/Private/Language/locallang_mod.xlf', ) ); diff --git a/locallang_db.xml b/locallang_db.xml deleted file mode 100644 index db4fead9..00000000 --- a/locallang_db.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - database - Language labels for database tables/fields belonging to extension 'extension_builder' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file