Giter Club home page Giter Club logo

builder's People

Contributors

bjo3rnf avatar cedricziel avatar coding46 avatar cweiske avatar des-mbischof avatar exakayem avatar jereth avatar jmverges avatar namelesscoder avatar neufeind avatar outdoorsman avatar pfeiferbit avatar pkerling avatar wolv-dev avatar xf- avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

builder's Issues

unstated vhs dependency

Hi,
The BE module fails with this error on analysing an extension:
#1289386765: Could not analyse class:Tx_Vhs_ViewHelpers_Form_SelectViewHelper maybe not loaded or no autoloader? (More information)

TYPO3\CMS\Extbase\Object\Container\Exception\UnknownObjectException thrown in file
/var/www/typo3_src-6.2.0/typo3/sysext/extbase/Classes/Object/Container/ClassInfoFactory.php in line 51.

Builder 0.11.0 (TER)
TYPO3 6.2.1
I installed VHS and the error disappears.
HTH

Strings not escaped

When building a provider from the backend module, the strings for title and description should be escaped correctly. Entering e.g. an apostrophe (') in those text fields will break both the generated ext_emconf.php and ext_tables.php.

[TYPO3 7] Provider extension locallang.xlf not working

Hey guys,

I don't know where to post this but I need help with the translation of my provider extension.
I created one with the builder and added a ´de.locallang.xlf´ in the ´Resources/Public/Language´ folder.
But the translation of the ´de.locallang.xlf´ don't get respected. F.E. my content element has the label "Content" in English and should have "Inhalt" in German. My backend language is German too. I can't get it to work that the label gets translated in German.
The ´locallang.xlf´ is always the English one, right? I copied my locallang.xlf files from my old provider extension of TYPO3 6.2.x and changed the product-name. It worked fine there.

Do I have a misconfiguration anywhere or is that a bug?

My locallang.xlf files look like this:

locallang.xlf:

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<xliff version="1.0">
    <file source-language="en" datatype="plaintext" original="messages" product-name="aw_test" date="2015-10-15T17:12:43+02:00">
        <header/>
        <body>
            <trans-unit id="content">
                <source>Content</source>
            </trans-unit>
        </body>
    </file>
</xliff>

de.locallang.xlf:

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<xliff version="1.0">
    <file source-language="en" target-language="de" datatype="plaintext" original="messages" product-name="aw_test" date="2015-10-15T17:12:43+02:00">
        <header/>
        <body>
            <trans-unit id="content">
                <source>Content</source>
                <target state="translated">Inhalt</target>
            </trans-unit>
        </body>
    </file>
</xliff>

Would be nice if anyone could reproduce this.

Thanks in advance!

Future of builder

Hi!
Even the last commit is roughly two years old I need to ask: Is there a future for this extension?
Today I searched for it because I want to scan the fluid templates on a project, and realized that either you nor others are offering this anymore. Thats a pity!

Just asking :-)

[BUGFIX] Travis Integration

Shouldnt the option "Create Travis continuous integration configuration file" build a .travis.yml file?
When building an extension, its says: Create Travis continuous integration configuration file : yes.
But there is no such file... ? Did i get something wrong?

extbase: Classname arrayValidator is no valid Validator

[error] http://the.domain/ - extbase: Classname arrayValidator is no valid Validator., referer: http://the.domain/typo3/mod.php?M=tools_BuilderTxBuilderModule

occurs on master while running a Check PHP file syntax & Check Fluid template syntax html on BE module on a plain providerextension

Provider extension builder shows weird form validation errors / TYPO3 9.5.1

Filling out the Form at Provider extension builder causes weird form errors.
A correct E-Mail filled with my name-email combination is marked with "You shoud follow the pattern "Vendor.ExtensionKey".... at the same time the Extension Key input is correct too.
message seems to appear randomly, possible on next try id did not appear.
Changing in both fields do not have any affect, Message is not removed either.
Reload of form required. Another try with exakt same data works. Tried multiple times (> 10x)
builder-screen

Unit test refactoring

This is a check-list for refactoring our current unit test setup into tests which do not require a TYPO3 context beside that which the composer autoloader can provide.

composer.json

In order to correctly bootstrap an environment that includes TYPO3 sources and phpunit we need to modify composer.json to include a require-dev statement. This will not be used by TYPO3 CMS so we can safely depend on this to only happen when users install using CLI without --no-dev.

    "require-dev": {
        "satooshi/php-coveralls": "dev-master",
        "typo3/cms": "~6.2.5",
        "phpunit/phpunit": "4.2.*",
        "mikey179/vfsStream": "~1.3.0"
    },
    "autoload": {
              "psr-4": {
                     "FluidTYPO3\\Builder\\": "Classes/"
              },
              "classmap": [
                     "Tests/",
                     "vendor/typo3/cms/typo3/sysext"
              ]
       },

bootstrap.php

Then, in order to run the tests, a small bootstrap.php script is required by phpunit to instanciate a minimal set of TYPO3 dependencies - mainly site constants and inclusion of system extensions' definitions in ext_* files.

// Register composer autoloader
if (!file_exists(__DIR__ . '/../vendor/autoload.php')) {
    throw new \RuntimeException(
        'Could not find vendor/autoload.php, make sure you ran composer.'
    );
}

require_once __DIR__ . '/../vendor/autoload.php';

define('PATH_thisScript', realpath('vendor/typo3/cms/typo3/index.php'));
define('TYPO3_MODE', 'BE');
putenv('TYPO3_CONTEXT=Development');

\TYPO3\CMS\Core\Core\Bootstrap::getInstance()
    ->baseSetup('typo3/')
    ->loadConfigurationAndInitialize(FALSE)
    ->loadTypo3LoadedExtAndExtLocalconf(FALSE)
    ->initializeLanguageObject()
;

This bootstrap is then referenced from the phpunit.xml file:

<phpunit bootstrap="./bootstrap.php"
...

Using these components, a build script can install all required dependencies and execute unit tests using two simple commands:

composer install
./vendor/bin/phpunit -c TestsRewrite/phpunit.xml

Pitfalls

Common problems with unit tests which indicate a refactoring and additional mocking is needed:

  • Code uses $GLOBALS['TYPO3_DB'] without a getConnection() wrapper method on the class which could be mocked.
  • Code depends on $GLOBALS['TSFE'] and must be refactored to at the very least retrieve this instance from a wrapper method that can be mocked.
  • Code uses ExtensionManagementUtility without wrapping and mocking, or ConfigurationManager without mocking.
  • Code writes files in typo3temp and unit tests do not create a VFS and/or code requires refactoring to be able to receive VFS urls.
  • Code depends on an active Extbase or Fluid context but does not sufficiently/correctly mock the injected classes and ends up triggering DB reads, cache activity etc.
  • Code depends on extension resource files (with or without ExtensionManagementUtility) and is unable to receive VFS urls when under test, code must be refactored.

Check-list

  • Modify composer.json to include CMS as dependency
  • Create a complete backup of the entire Tests folder to TestsRewrite so that TYPO3's phpunit extension will continue to run our complete, coverage-friendly tests so we don't lose our safetly net while tests are being decoupled.
  • Create the bootstrap.php file with the minimally required bootstrapping.
  • Begin running tests and identify those individual test functions that are unable to run, and:
    • Delete all failing test functions in the TestsRewrite version of the test case.
    • Add a comment to the original test case in Tests for tests which fail about the reported failure.
  • Begin refactoring the previous tests while judging if the tests makes sense as a true unit test. Those tests that do not tests units but rather large chunks, we avoid refactoring and instead plan to write actual unit tests to cover the previously (loosely) covered code.

Static Template file not registered when Provider Extension installed.

I'm using the current builder development branch on TYPO3 8.7.3.

After creating and installing my provider extension, I didn't have a static template file available to include in my site template.

The solution was to rename ext_localconf.php to ext_tables.php in my provider extension.

Error in ext_tables.php

The written string in ext_tables.php
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility\ExtensionManagementUtility::addStaticFile() is wront.
Double ExtensionManagementUtility

Builder can not be loaded via runtimeActivatedPackages

If I try to load the extension in my development-enviroment via $GLOBALS['TYPO3_CONF_VARS']['EXT']['runtimeActivatedPackages'], I always get the following error.

#1289386765: Could not analyse class:Tx_Builder_Controller_BackendController maybe not loaded or no autoloader?

I think there is a problem with loading the Migrations/Code/ClassAliasMap.php in this case.

Broken Page Layout Icon

The page layout icon on the appearance tab links to the filesystem path rather than the absolute URL.

Missing class VersionUtility (from flux)

The FluidTYPO3/Flux is required because its VersionUtlity is required by the SyntaxService:30 but not marked as dependency in composer.json.

This raises the following exception when running the builder:fluidsyntax task:

 [ Error ]                                                              
 Class 'FluidTYPO3\Flux\Utility\VersionUtility' not found               
 thrown in file typo3conf/ext/builder/Classes/Service/SyntaxService.php 
 in line 192                                                            
                                                                        

Exception trace:
#0 FluidTYPO3\Builder\Service\SyntaxService::getTemplateParser()
   typo3conf/ext/builder/Classes/Service/SyntaxService.php:86
#1 FluidTYPO3\Builder\Service\SyntaxService::syntaxCheckFluidTemplateFile()
   typo3conf/ext/builder/Classes/Command/BuilderCommandController.php:121
#2 FluidTYPO3\Builder\Command\BuilderCommandController::fluidSyntaxCommand()
#3 call_user_func_array()
   typo3/sysext/extbase/Classes/Mvc/Controller/CommandController.php:256
#4 TYPO3\CMS\Extbase\Mvc\Controller\CommandController::callCommandMethod()
   typo3/sysext/extbase/Classes/Mvc/Controller/CommandController.php:135
#5 TYPO3\CMS\Extbase\Mvc\Controller\CommandController::processRequest()
   typo3/sysext/extbase/Classes/Mvc/Dispatcher.php:85
#6 TYPO3\CMS\Extbase\Mvc\Dispatcher::dispatch()
   vendor/helhum/typo3-console/Classes/Mvc/Cli/RequestHandler.php:80
#7 Helhum\Typo3Console\Mvc\Cli\RequestHandler::handleRequest()
   vendor/helhum/typo3-console/Classes/Core/ConsoleBootstrap.php:111
#8 Helhum\Typo3Console\Core\ConsoleBootstrap::run()
   vendor/helhum/typo3-console/Scripts/typo3cms.php:65
#9 {closure}()
   vendor/helhum/typo3-console/Scripts/typo3cms.php:66
#10 require()
   vendor/helhum/typo3-console/Scripts/typo3cms:4

Uncaught TYPO3 Exception - T3 V8.6.0

TYPO3 8.6.0

Backend-Error

Uncaught TYPO3 Exception
Undeclared arguments passed to ViewHelper TYPO3\CMS\Fluid\ViewHelpers\FlashMessagesViewHelper: class

TYPO3Fluid\Fluid\Core\ViewHelper\Exception thrown in file
/html/typo3/typo3_src-8.6.0/vendor/typo3fluid/fluid/src/Core/ViewHelper/AbstractViewHelper.php in line 456.

extension-key is ignored

when creating providerextension, i get extension with key "1":

./typo3/cli_dispatch.phpsh extbase builder:providerextension --title "corlate" --description "Using corlate template" --use-vhs "1" --pages "1" --content "1" --backend "1" --controllers "1" --git "1" --extension-key "somekey" --author "any author ..."

[BUG] XLF fluidcontent description is missing and double fluidpage

double page description and no content description

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<xliff version="1.0">
    <file source-language="en" datatype="plaintext" original="messages" product-name="XXX" date="2014-11-05T19:25:57+01:00">
        <header/>
        <body>
            <trans-unit id="flux.fluidcontent">
                <source>Fluid content element example</source>
            </trans-unit>
            <trans-unit id="flux.fluidpage.description">
                <source>Description can be entered in LLL file locallang.xlf of extension XXX</source>
            </trans-unit>
            <trans-unit id="flux.fluidpage">
                <source>Standard fluid page</source>
            </trans-unit>
            <trans-unit id="flux.fluidpage.description">
                <source>Description can be entered in LLL file locallang.xlf of extension XXX</source>
            </trans-unit>
        </body>
    </file>
</xliff>

[BUGFIX] Required argument "git" is not set.

1298012500: Required argument "git" is not set. (More information)

TYPO3\CMS\Extbase\Mvc\Controller\Exception\RequiredArgumentMissingException thrown in file
/var/www/typo3_src/typo3/sysext/extbase/Classes/Mvc/Controller/AbstractController.php in line 401.

[FEATURE] Template Path validation

To quote a wise man:

EXT:builder might be extended with a "template path set validation" routine which inspects the view configuration for an extension. Given an extension key it might check
1.) if native view paths exist and are valid, if not give a warning,
2.) if it registers itself for use with content, pages, backend and if there is a valid TS counterpart (checking legacy path, giving warning, checking collections usage, giving notice, checking native view path) such a feature would have to fetch all root TS templates and perform the full set of checks on each one.

It would imply manually processing the TS from the record (since it needs CLI support in which TS is untrustworthy).

DI by Annotation

Hi y'all

during fixing some namespace issues I discovered the following (last comment #26):

If we inject a dependency by annotation we must use the FQN of the class we'd link to inject

/**
 * @varTYPO3\CMS\Extbase\Object\ObjectManagerInterface
 * @inject
 */
 protected $objectManager;

Otherwise the Injection breaks.

This is a mismatch to the use of short class names in code comments. The automagic DI in Extbase seems to not getting the namespace into account.

A practical solution seems to be usage FQN of classes in comments. Maybe this is even better because PHPDocumentors will break at this point to with automagic link generation.

Greetings
Göran.

Create composer.json file

Since a lot of people using composer to install TYPO3 I think it would be great if the this EXT creates a composer.json for the newly created extension.

Overriding default sections from new default layout

I don't know if I'm right here but...

I use the Builder to setup an Extension to create custom content components.
Now in typo39 the new default content Layout for fluid styled content was introduced:
https://docs.typo3.org/typo3cms/extensions/core/8.7/Changelog/8.6/Feature-79622-NewDefaultLayoutForFluidStyledContent.html

So now every CE is wrapped inside an additional div for example.
But my problem is that when I set a Date on my Custom CE then the new default Template adds an Header.

In the Page linked above it explains how to override Optional Sections (for example the header). But this doesn't work. I just want to tell my CE that doesn't have to render the Header (just like in the example)

So my question is, how can I can achieve this? Is it a missing feature in Builder or somewhere else.

[FEATURE] List all extensions

Don't know how what is worth is but besides the "install" and "uninstall" command for extensions, it would be cool to be able to list all extensions.

# list all extensions
typo3/cli_dispatch.phpsh extbase builder:list

# list all extensions with more detail (active vs inactive, version number, ...)
typo3/cli_dispatch.phpsh extbase builder:list --detail

# list all active extensions
typo3/cli_dispatch.phpsh extbase builder:list --active

# list all inactive extensions
typo3/cli_dispatch.phpsh extbase builder:list --inactive

Wrong namespace for static function call addStaticFile in generated ext_tables.php

I got this error when using this extension with typo3 6.2

PHP Fatal error:  Class 'TYPO3\CMS\Core\Utility\ExtensionManagementUtility\ExtensionManagementUtility' not found in /var/www/domains/devbox.runengilde.de/web/typo3conf/ext/bdm_theme_awh/ext_tables.php on line 6

I thing the cause is here:

/typo3conf/ext/builder/Classes/CodeGeneration/Extension/ExtensionGenerator.php L:134

TYPO3\CMS\Core\Utility\ExtensionManagementUtility\ExtensionManagementUtility::addStaticFile should be TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile

Generated content element brings fatal errors

The generated content element has the following code inside:

<f:layout name="{v:extension.loaded(extensionName: 'fluidcontent_core', then: 'ContentCore', else: 'Content')}" />

This creates fatal errors in typo3:

Fatal error: Call to a member function getViewHelper() on null
in .../typo3temp/Cache/Code/fluid_template/MyFluidTest_Content_action_render_c0944f648354597d7e546dc495725d69b7a21978.php on line 17 

TYPO3 v11.5 compatibility

Hi @NamelessCoder ,

is EXT:builder still the preferred way to spin up a new provider extension? If so, are there any plans to make EXT:builder compatible with TYPO3 v11 in the near future? If not, what is your suggestion to create a new provider extension?

Thanks in advance!

Generated extension: Flux registration happens in ext_tables.php

The manual recommends to put the registration into ext_localconf.php:

On TYPO3 6.2 and above, you only need to add this in ext_localconf.php or ext_tables.php - which one you choose doesn't matter, but for consistency we recommend always using ext_localconf.php.

https://fluidtypo3.org/documentation/templating-manual/templating/provider-extension/registration-in-php.html

Registration code:

\FluidTYPO3\Flux\Core::registerProviderExtensionKey('Test.FluidTest', 'Page');
\FluidTYPO3\Flux\Core::registerProviderExtensionKey('Test.FluidTest', 'Content');

Fluidbackend is not working by default.

When I create myprovider extension I'm looking for creating a BackendModule.
builder creation

All files are created and module is included. However when I click on the module I'm getting:
exception

My first attempt to solve it was change the namespace to
namespace My\Myprovider2\Controller;
and change the register to:
\FluidTYPO3\Flux\Core::registerProviderExtensionKey('My.myprovider2', 'Backend');

then I'm not able to enter in the admin and I'm getting:
first attempt

Debugging I'm getting:
debug

is returning null and then it throw the exception:
dubug2

Removing the exception this is a debug screen
debug3

The result is
result

If anyone can confirm it, could be great.

Documentation about what to do when the extension has been created

It'd be nice if there was a step-by-step guide what to do after an extension has been created with builder.

For example:

should be mentioned there.

Generated extension: page: flux:grid outside flux:form

In a generated extension, the page layout's configuration section directly contains the flux:grid instead of having it inside flux:form as the documentation recommends:

https://fluidtypo3.org/documentation/templating-manual/templating/creating-templates/page-template.html:

<flux:form id="foo">

    [...]

    <!-- Backend layout grid (TYPO3 6.x and greater only) -->
    <flux:grid>
        <flux:grid.row>
            <flux:grid.column colPos="1" name="Sidebar" style="width: 25%" />
            <flux:grid.column colPos="0" name="Content" style="width: 75%" />
        </flux:grid.row>
    </flux:grid>

</flux:form>

Resources/Private/Templates/Page/Standard.html:

<f:section name="Configuration">
    <flux:form id="standard">
        <!-- Insert fields, sheets, grid, form section objects etc. here, in this flux:form tag -->
            <flux:field.input name="settings.pageClass" default="some-css-class" />
    </flux:form>
    <flux:grid>
        <!-- Edit this grid to change the "backend layout" structure -->
        <flux:grid.row>
        <flux:grid.column colPos="0" colspan="3" name="main" />
        <flux:grid.column colPos="1" name="right" />
        </flux:grid.row>
    </flux:grid>
</f:section>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.