Skip to content

Instantly share code, notes, and snippets.

@bnf
Created September 8, 2017 19:32
Show Gist options
  • Save bnf/568bd5d0ae40520273463d8935efd869 to your computer and use it in GitHub Desktop.
Save bnf/568bd5d0ae40520273463d8935efd869 to your computer and use it in GitHub Desktop.
typo3-console 4.8.0 dce incompatibility

During install:generatepackagestates typo3_console calls cache:flush which loads configuration from ext_localconf.php. DCE tries to generate caches when ext_localconf.php is loaded. They'll initializend initializes Output of composer install

$ php70 /usr/bin/composer install
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 20 installs, 0 updates, 0 removals
  - Installing typo3/cms-composer-installers (1.4.2): Loading from cache
  - Installing typo3/class-alias-loader (1.0.0): Loading from cache
  - Installing helhum/typo3-console-plugin (2.0.2): Loading from cache
  - Installing symfony/process (v3.3.8): Loading from cache
  - Installing psr/log (1.0.2): Loading from cache
  - Installing symfony/debug (v3.0.9): Loading from cache
  - Installing symfony/polyfill-mbstring (v1.5.0): Loading from cache
  - Installing symfony/console (v2.8.27): Loading from cache
  - Installing mso/idna-convert (v0.9.1): Loading from cache
  - Installing cogpowered/finediff (0.3.1): Loading from cache
  - Installing psr/http-message (1.0.1): Loading from cache
  - Installing doctrine/instantiator (1.0.5): Loading from cache
  - Installing symfony/finder (v2.8.27): Loading from cache
  - Installing swiftmailer/swiftmailer (v5.4.8): Loading from cache
  - Installing pear/pear_exception (v1.0.0): Loading from cache
  - Installing pear/net_url2 (v2.2.2): Loading from cache
  - Installing pear/http_request2 (v2.3.0): Loading from cache
  - Installing typo3/cms (v7.6.22): Loading from cache
  - Installing helhum/typo3-console (4.8.0): Loading from cache
  - Installing arminvieweg/dce (1.4.8): Loading from cache
symfony/console suggests installing symfony/event-dispatcher ()
Writing lock file
Generating autoload files
> mkdir -p web/typo3conf
> @php vendor/helhum/typo3-console/Scripts/typo3cms install:generatepackagestates

                                                                      
 [ Helhum\Typo3Console\Mvc\Cli\FailedSubProcessCommandException ]     
 #1485130941: Executing command "cache:flush" failed (exit code: "1") 
 thrown in file Classes/Command/InstallCommandController.php          
 in line 135                                                          
                                                                      

Command line:
'/opt/remi/php70/root/usr/bin/php' 'vendor/helhum/typo3-console/Scripts/typo3cms' 'cache:flush' '--files-only' '1'

Exception trace:
#0 Helhum\Typo3Console\Mvc\Cli\CommandDispatcher::executeCommand()
   Classes/Command/InstallCommandController.php:135
#1 Helhum\Typo3Console\Command\InstallCommandController::generatePackageStatesCommand()
#2 call_user_func_array()
   Classes/Mvc/Controller/CommandController.php:252
#3 Helhum\Typo3Console\Mvc\Controller\CommandController::callCommandMethod()
   Classes/Mvc/Controller/CommandController.php:137
#4 Helhum\Typo3Console\Mvc\Controller\CommandController::processRequest()
   t/extbase/Classes/Mvc/Dispatcher.php:86
#5 TYPO3\CMS\Extbase\Mvc\Dispatcher::dispatch()
   Classes/Mvc/Cli/RequestHandler.php:80
#6 Helhum\Typo3Console\Mvc\Cli\RequestHandler::handleRequest()
   Classes/Core/ConsoleBootstrap.php:111
#7 Helhum\Typo3Console\Core\ConsoleBootstrap::run()
   Scripts/typo3cms.php:65
#8 {closure}()
   Scripts/typo3cms.php:66
#9 require()
   Scripts/typo3cms:4

                                                                                         
 [ Sub-process exception: Helhum\Typo3Console\Mvc\Cli\FailedSubProcessCommandException ] 
 #1485130941: Executing command "cache:flushcomplete" failed (exit code: "1")            
 thrown in file Classes/Command/CacheCommandController.php                               
 in line 73                                                                              
                                                                                         

Exception trace:
#0 Helhum\Typo3Console\Mvc\Cli\FailedSubProcessCommandException::forProcess()
   Classes/Mvc/Cli/CommandDispatcher.php:187
#1 Helhum\Typo3Console\Mvc\Cli\CommandDispatcher::executeCommand()
   Classes/Command/CacheCommandController.php:73
#2 Helhum\Typo3Console\Command\CacheCommandController::flushCommand()
#3 call_user_func_array()
   Classes/Mvc/Controller/CommandController.php:252
#4 Helhum\Typo3Console\Mvc\Controller\CommandController::callCommandMethod()
   Classes/Mvc/Controller/CommandController.php:137
#5 Helhum\Typo3Console\Mvc\Controller\CommandController::processRequest()
   t/extbase/Classes/Mvc/Dispatcher.php:86
#6 TYPO3\CMS\Extbase\Mvc\Dispatcher::dispatch()
   Classes/Mvc/Cli/RequestHandler.php:80
#7 Helhum\Typo3Console\Mvc\Cli\RequestHandler::handleRequest()
   Classes/Core/ConsoleBootstrap.php:111
#8 Helhum\Typo3Console\Core\ConsoleBootstrap::run()
   Scripts/typo3cms.php:65
#9 {closure}()
   Scripts/typo3cms.php:66
#10 require()
   Scripts/typo3cms:4

                                                                                                                                                                                                                                           
 [ Sub-process exception (2): TYPO3\CMS\Core\Error\Exception ]                                                                                                                                                                             
 #1: Warning: mysqli::real_connect(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/ben/tmp/typo3-console-dce-fail/vendor/typo3/cms/typo3/sysext/core/Classes/Database/DatabaseConnection.php line 1314 
 thrown in file Classes/Error/ErrorHandler.php                                                                                                                                                                                             
 in line 68                                                                                                                                                                                                                                
                                                                                                                                                                                                                                           

Exception trace:
#0 Helhum\Typo3Console\Mvc\Cli\SubProcessException::createFromArray()
   Classes/Mvc/Cli/FailedSubProcessCommandException.php:72
#1 Helhum\Typo3Console\Mvc\Cli\FailedSubProcessCommandException::__construct()
   Classes/Mvc/Cli/FailedSubProcessCommandException.php:54
#2 Helhum\Typo3Console\Mvc\Cli\FailedSubProcessCommandException::forProcess()
   Classes/Mvc/Cli/CommandDispatcher.php:187
#3 Helhum\Typo3Console\Mvc\Cli\CommandDispatcher::executeCommand()
   Classes/Command/CacheCommandController.php:73
#4 Helhum\Typo3Console\Command\CacheCommandController::flushCommand()
#5 call_user_func_array()
   Classes/Mvc/Controller/CommandController.php:252
#6 Helhum\Typo3Console\Mvc\Controller\CommandController::callCommandMethod()
   Classes/Mvc/Controller/CommandController.php:137
#7 Helhum\Typo3Console\Mvc\Controller\CommandController::processRequest()
   t/extbase/Classes/Mvc/Dispatcher.php:86
#8 TYPO3\CMS\Extbase\Mvc\Dispatcher::dispatch()
   Classes/Mvc/Cli/RequestHandler.php:80
#9 Helhum\Typo3Console\Mvc\Cli\RequestHandler::handleRequest()
   Classes/Core/ConsoleBootstrap.php:111
#10 Helhum\Typo3Console\Core\ConsoleBootstrap::run()
   Scripts/typo3cms.php:65
#11 {closure}()
   Scripts/typo3cms.php:66
#12 require()
   Scripts/typo3cms:4

Script @php vendor/helhum/typo3-console/Scripts/typo3cms install:generatepackagestates handling the package-states event returned with error code 1
$ vendor/bin/typo3cms cache:flush --files-only 1

                                                                              
 [ Helhum\Typo3Console\Mvc\Cli\FailedSubProcessCommandException ]             
 #1485130941: Executing command "cache:flushcomplete" failed (exit code: "1") 
 thrown in file Classes/Command/CacheCommandController.php                    
 in line 73                                                                   
                                                                              

Command line:
'/usr/bin/php' 'vendor/bin/typo3cms' 'cache:flushcomplete' '--files-only' '1'

Exception trace:
#0 Helhum\Typo3Console\Mvc\Cli\CommandDispatcher::executeCommand()
   Classes/Command/CacheCommandController.php:73
#1 Helhum\Typo3Console\Command\CacheCommandController::flushCommand()
#2 call_user_func_array()
   Classes/Mvc/Controller/CommandController.php:252
#3 Helhum\Typo3Console\Mvc\Controller\CommandController::callCommandMethod()
   Classes/Mvc/Controller/CommandController.php:137
#4 Helhum\Typo3Console\Mvc\Controller\CommandController::processRequest()
   t/extbase/Classes/Mvc/Dispatcher.php:86
#5 TYPO3\CMS\Extbase\Mvc\Dispatcher::dispatch()
   Classes/Mvc/Cli/RequestHandler.php:80
#6 Helhum\Typo3Console\Mvc\Cli\RequestHandler::handleRequest()
   Classes/Core/ConsoleBootstrap.php:111
#7 Helhum\Typo3Console\Core\ConsoleBootstrap::run()
   Scripts/typo3cms.php:65
#8 {closure}()
   Scripts/typo3cms.php:66
#9 require()
   Scripts/typo3cms:4

                                                                                                                                                                                                                                           
 [ Sub-process exception: TYPO3\CMS\Core\Error\Exception ]                                                                                                                                                                                 
 #1: Warning: mysqli::real_connect(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/ben/tmp/typo3-console-dce-fail/vendor/typo3/cms/typo3/sysext/core/Classes/Database/DatabaseConnection.php line 1314 
 thrown in file Classes/Error/ErrorHandler.php                                                                                                                                                                                             
 in line 68                                                                                                                                                                                                                                
                                                                                                                                                                                                                                           

Exception trace:
#0 Helhum\Typo3Console\Error\ErrorHandler::handleError()
#1 mysqli::real_connect()
   t/core/Classes/Database/DatabaseConnection.php:1314
#2 TYPO3\CMS\Core\Database\DatabaseConnection::sql_pconnect()
   t/core/Classes/Database/DatabaseConnection.php:1660
#3 TYPO3\CMS\Core\Database\DatabaseConnection::connectDB()
   t/core/Classes/Database/DatabaseConnection.php:493
#4 TYPO3\CMS\Core\Database\DatabaseConnection::query()
   t/core/Classes/Database/DatabaseConnection.php:1448
#5 TYPO3\CMS\Core\Database\DatabaseConnection::admin_get_fields()
   s/Cache.php:111
#6 ArminVieweg\Dce\Cache::isDatabaseValid()
   s/Cache.php:63
#7 ArminVieweg\Dce\Cache::createLocalconf()
   calconf.php:121
#8 TYPO3\CMS\Core\Utility\ExtensionManagementUtility::{closure}()
   calconf.php:128
#9 require()
   t/core/Classes/Utility/ExtensionManagementUtility.php:1653
#10 TYPO3\CMS\Core\Utility\ExtensionManagementUtility::loadSingleExtLocalconfFiles()
   t/core/Classes/Utility/ExtensionManagementUtility.php:1628
#11 TYPO3\CMS\Core\Utility\ExtensionManagementUtility::loadExtLocalconf()
   Classes/Core/Booting/Scripts.php:153
#12 Helhum\Typo3Console\Core\Booting\Scripts::initializeExtensionConfiguration()
#13 call_user_func()
   Classes/Core/Booting/Step.php:53
#14 Helhum\Typo3Console\Core\Booting\Step::__invoke()
   Classes/Core/Booting/Sequence.php:108
#15 Helhum\Typo3Console\Core\Booting\Sequence::invokeStep()
   Classes/Core/Booting/Sequence.php:92
#16 Helhum\Typo3Console\Core\Booting\Sequence::invoke()
   Classes/Mvc/Cli/RequestHandler.php:92
#17 Helhum\Typo3Console\Mvc\Cli\RequestHandler::boot()
   Classes/Mvc/Cli/RequestHandler.php:77
#18 Helhum\Typo3Console\Mvc\Cli\RequestHandler::handleRequest()
   Classes/Core/ConsoleBootstrap.php:111
#19 Helhum\Typo3Console\Core\ConsoleBootstrap::run()
   Scripts/typo3cms.php:65
#20 {closure}()
   Scripts/typo3cms.php:66
#21 require()
   Scripts/typo3cms:4
{
"type": "project",
"license": "GPL-2.0+",
"require": {
"typo3/cms": "^7.6",
"typo3/cms-about": "^7.6",
"typo3/cms-aboutmodules": "^7.6",
"typo3/cms-belog": "^7.6",
"typo3/cms-beuser": "^7.6",
"typo3/cms-context-help": "^7.6",
"typo3/cms-documentation": "^7.6",
"typo3/cms-felogin": "^7.6",
"typo3/cms-filelist": "^7.6",
"typo3/cms-css-styled-content": "^7.6",
"typo3/cms-form": "^7.6",
"typo3/cms-func": "^7.6",
"typo3/cms-impexp": "^7.6",
"typo3/cms-info": "^7.6",
"typo3/cms-info-pagetsconfig": "^7.6",
"typo3/cms-lowlevel": "^7.6",
"typo3/cms-recycler": "^7.6",
"typo3/cms-reports": "^7.6",
"typo3/cms-rsaauth": "^7.6",
"typo3/cms-rtehtmlarea": "^7.6",
"typo3/cms-setup": "^7.6",
"typo3/cms-tstemplate": "^7.6",
"typo3/cms-version": "^7.6",
"typo3/cms-viewpage": "^7.6",
"typo3/cms-wizard-crpages": "^7.6",
"typo3/cms-wizard-sortpages": "^7.6",
"typo3/cms-workspaces": "^7.6",
"typo3/cms-sys-note": "^7.6",
"typo3/cms-t3editor": "^7.6",
"helhum/typo3-console": "^4.8",
"arminvieweg/dce": "^1.4"
},
"scripts": {
"package-states": [
"mkdir -p web/typo3conf",
"@php vendor/helhum/typo3-console/Scripts/typo3cms install:generatepackagestates"
],
"folder-structure": [
"@php vendor/helhum/typo3-console/Scripts/typo3cms install:fixfolderstructure"
],
"extension-setup": [
"@php vendor/helhum/typo3-console/Scripts/typo3cms install:extensionsetupifpossible"
],
"post-autoload-dump": [
"@package-states",
"@folder-structure",
"@extension-setup"
]
},
"extra": {
"typo3/cms": {
"cms-package-dir": "{$vendor-dir}/typo3/cms",
"web-dir": "web"
},
"helhum/typo3-console": {
"install-extension-dummy": false
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment