helhum
Repos
92
Followers
179
Following
1

Console command for TYPO3 CMS

265
121

Makes values from a .env file available as environment variables for composer based projects

143
17

Render a TypoScript path by URL, especially useful for Ajax dispatching

66
28

Manage TYPO3 configuration for multiple environments or contexts with ease

35
15

Secure your TYPO3 installation by only exposing public files

56
10

Improved command scheduling for TYPO3

26
4

Events

Documentation is treated as extension

To clarify: Technically, since a very long time, packages with a type that starts with typo3-cms- are TYPO3 extensions and are treated the same for a very long time already.

Created at 6 hours ago
Documentation is treated as extension

Thanks. Hm, I have multiple questions:

  • What is the use case to install those packages alongside TYPO3?
  • In which folders were they installed then before?
  • What was/ is the expectation they should be installed?
  • Didn't you get deprecation messages before, that those packages need an extension key?
Created at 6 hours ago
helhum create tag v5.0.0
Created at 3 days ago
helhum delete branch prepare-v5-release
Created at 3 days ago

[TASK] Remove conflict with composer/installers

Since no installers are shipped any more, there is no conflict with other installers.

[TASK] Mark main branch as alias for v5

[TASK] Require at least PHP 8.1

Merge pull request #138 from helhum/prepare-v5-release

Created at 3 days ago
pull request closed
[TASK] Require at least PHP 8.1
Created at 3 days ago
pull request opened
[TASK] Require at least PHP 8.1
Created at 3 days ago
helhum create branch prepare-v5-release
Created at 3 days ago

Update extension based on commit dc724d3eeb1863bd59212b10fa467dbcc3053fca

Created at 1 week ago
Two separate container instances used for DI of Commands

Bug Report

Current Behavior I encountered issues with a command that were caused by the fact, that two separate instances of singleton classes were used. I found out that two containers were instanciated:

  • the first one in Helhum\Typo3Console\Core\Kernel::initialize,
  • the second one in Helhum\Typo3Console\Core\Booting\Scripts::initializeExtensionConfiguration.

In my case the problems seems to be caused by TYPO3\CMS\Core\Console\CommandRegistry->container holding the first container instance (created in Helhum\Typo3Console\Core\Kernel::initialize) while the second container instance is forced on the GeneralUtility via BootService::makeCurrent. Therefore dependencies injected into my command class do not come from the same container as those created later on.

Expected behavior/output No matter where I use dependency injection in my extension code, I always get instances from the same container. After BootService::makeCurrent the old container must not be used anymore.

Environment

  • TYPO3 Console version(s): 7.1.2
  • TYPO3 version(s): 11.5.16
  • PHP version(s): 8.1.10
  • Is your TYPO3 installation set up with Composer (Composer Mode): yes
  • OS: Arch Linux
Created at 1 week ago
delete branch
helhum delete branch fix-container-for-commands
Created at 1 week ago

[BUGFIX] Add prophecy as dependency

Newer bugfix versions of phpunit require this package to be installed

[TASK] Disable tests agains TYPO3 main branch

This branch isn't supported for now anyway

[BUGFIX] Make sure commands are instantiated with correct container

Fixes #1073

Merge pull request #1074 from helhum/fix-container-for-commands

Created at 1 week ago
pull request closed
[BUGFIX] Make sure commands are instantiated with correct container

Fixes #1073

Created at 1 week ago
typo3cms cache flush issue

Big thank you for your investigations so far!

Created at 1 week ago
typo3cms cache flush issue

Hi,

im pretty new on typo3 (v11.5.12) and typo3cms (v7.1.2). I use typo3 on docker and all the setup/configuration happens over typo3 console. For some reason $ ./typo3cms cache:flush dont working, i get one exception (see down). If i run the same command with $ ./typo3 cache:flush everything works fine. Its really strange because i use $ ./typo3cms install:setup ..., $ ./typo3cms language:update and few other commands and everything working fine. Is this a bug or i miss some configuration?

any help would be appreciated

Kind Regards Christos

www-data@96d36e9191da:~/html/vendor/bin$ ./typo3 cache:flush -vvv
www-data@96d36e9191da:~/html/vendor/bin$ ./typo3cms cache:flush -vvv


  [ TYPO3\CMS\Core\Error\Exception ]
  Warning: rename(): The first argument to copy() function cannot be a directory in /var/www/html/public/typo3/sysext/core/Classes/Cache/Backend/SimpleFileBackend.php line 314


Exception code: 1

Exception trace:
#0 ()
   vendor/helhum/typo3-console/Classes/Console/Error/ErrorHandler.php:88
#1 Helhum\Typo3Console\Error\ErrorHandler->handleError()
#2 rename()
   typo3/sysext/core/Classes/Cache/Backend/SimpleFileBackend.php:314
#3 TYPO3\CMS\Core\Cache\Backend\SimpleFileBackend->flush()
   typo3/sysext/core/Classes/DependencyInjection/Cache/ContainerBackend.php:41
#4 TYPO3\CMS\Core\DependencyInjection\Cache\ContainerBackend->forceFlush()
   typo3/sysext/core/Classes/Command/CacheFlushCommand.php:101
#5 TYPO3\CMS\Core\Command\CacheFlushCommand->flushDependencyInjectionCaches()
   typo3/sysext/core/Classes/Command/CacheFlushCommand.php:68
#6 TYPO3\CMS\Core\Command\CacheFlushCommand->execute()
   vendor/symfony/console/Command/Command.php:298
#7 Symfony\Component\Console\Command\Command->run()
   vendor/symfony/console/Application.php:1024
#8 Symfony\Component\Console\Application->doRunCommand()
   vendor/helhum/typo3-console/Classes/Console/Mvc/Cli/Symfony/Application.php:189
#9 Helhum\Typo3Console\Mvc\Cli\Symfony\Application->doRunCommand()
   vendor/symfony/console/Application.php:299
#10 Symfony\Component\Console\Application->doRun()
   vendor/symfony/console/Application.php:171
#11 Symfony\Component\Console\Application->run()
   vendor/helhum/typo3-console/Classes/Console/Core/Kernel.php:114
#12 Helhum\Typo3Console\Core\Kernel->handle()
   vendor/helhum/typo3-console/Scripts/typo3-console.php:18
#13 {closure}()
   vendor/helhum/typo3-console/Scripts/typo3-console.php:20
#14 require()
   vendor/helhum/typo3-console/typo3cms:3
#15 include()
   vendor/bin/typo3cms:120

cache:flush [-g|--group [GROUP]]

www-data@96d36e9191da:~/html/vendor/bin$ ./typo3cms list
TYPO3 Console 7.1.2
TYPO3 CMS 11.5.12 (Application Context: Production)
Created at 1 week ago
typo3cms cache flush issue

To me this does not seem to be a TYPO3 Console issue, but seems to be something wrong within your docker setup. The code errors out during an operation that is legitimate. Maybe there are permission issues with the filesystem, or some inconsistent mounts? Also: Sure this only happens with php vendor/bin/typo3cms cache:flush and not with php vendor/bin/typo3 cache:flush?

Maybe this report helps a bit to find the culprit?

Other than that, I have no clue. If you find out something, please let me know.

Since I have no clue how to reproduce it, or whether this is an issue with code within this repo, I will close the issue.

Feel free to comment further or open a new report with new insights though.

Created at 1 week ago
issue comment
[BUG] Type errors when using pdo_mysql driver

@dkd-kaehm

Here are my settings (in yaml format):

DB:
    Connections:
        Default:
            driver: pdo_mysql
            driverOptions:
                20: true

Seems like this only happens, when prepared queries are emulated.

Created at 1 week ago
typo3cms cache flush issue

@optior that setup won't start for me for other reasons:

failed to solve: rpc error: code = Unknown desc = failed to solve with frontend dockerfile.v0: failed to create LLB definition: no match for platform in manifest sha256:bbe0e2b0a33ef5c3a983e490dcb3c1a42d623db1d5679e82f65cce3f32c8f254: not found

IIRC it's a folder inside var that's causing the error.

Which folder?

If I install that locally (without docker) cache:flush works without issues. cache:flush works without issues in other project setups (different docker setups, local setups, remote docker or non docker environments)

So would be great if you provide more information here.

Created at 1 week ago
typo3cms cache flush issue

@optior @devkoa I don't quite understand your setup and can't reproduce it in any of my setups.

Can you also debug and post the directory name that is passed to the copy function, that will cause the error?

Created at 2 weeks ago
opened issue
[BUG] Type errors when using pdo_mysql driver

Describe the bug When using pdo_mysql values of integer columns are not of type integer in PHP, therefore values from such columns must be casted to integer.

To Reproduce Steps to reproduce the behavior:

  1. set DB.Connections.Default.driver to pdo_mysql
  2. Perform a search e.g. in frontend
  3. Return value of ApacheSolrForTypo3\Solr\System\Page\Rootline::getRootPageId() must be of the type int, string returned

Expected behavior No fatal error

Screenshots

in /var/www/html/private/typo3conf/ext/solr/Classes/System/Page/Rootline.php line 92
                break;
            }
        }

        return $rootPageId;
    }

    /**
     * Returns an array of the pageUids in the rootline.

Used versions (please complete the following information):

  • TYPO3 Version: 11.5.15
  • Browser: n/a
  • EXT:solr Version: 11.5.0
  • Used Apache Solr Version: m/a
  • PHP Version: 7.4.30
  • MariaDB Version: 10.4.25

A typecast to int should be done in places where integer columns from DB must be integer in PHP

Created at 2 weeks ago
Two separate container instances used for DI of Commands

Never mind. Please verify if #1074 fixes the issue for you.

Thanks again for the detailed report! Got me on the right track eventually

Created at 2 weeks ago

[BUGFIX] Add prophecy as dependency

Newer bugfix versions of phpunit require this package to be installed

[TASK] Disable tests agains TYPO3 main branch

This branch isn't supported for now anyway

[BUGFIX] Make sure commands are instantiated with correct container

Fixes #1073

Created at 2 weeks ago

[TASK] Disable tests agains TYPO3 main branch

This branch isn't supported for now anyway

Created at 2 weeks ago

[BUGFIX] Add prophecy as dependency

Newer bugfix versions of phpunit require this package to be installed

Created at 2 weeks ago
pull request opened
[BUGFIX] Make sure commands are instantiated with correct container

Fixes #1073

Created at 2 weeks ago
create branch
helhum create branch fix-container-for-commands
Created at 2 weeks ago

Remove conflicts

Time has passed, so users will likely not run into issues with these outdated packages any more.

Merge pull request #1070 from helhum/remove-conflicts

Created at 2 weeks ago
Two separate container instances used for DI of Commands

Thanks for the report. Can you elaborate a bit more?

  • How exactly you register the command?
  • What dependencies are you injecting into your command?
  • Are you maybe facing the same issue when using the TYPO3 built in typo3 cli binary?

From just reading the code, what you describe should not happen. I will have a look though

Created at 2 weeks ago
helhum create tag v2.0.0-BETA1
Created at 3 weeks ago