with a brand new installation of Contao 4.12.1 I've encountered the following problem:
$ /usr/bin/php7.4 -q -dmax_execution_time=0 -dmemory_limit=-1 -dallow_url_fopen=1 -ddisable_functions= -ddate.timezone=Europe/Berlin /var/www/html/contao/web/contao-manager.phar.php composer install --prefer-dist --no-dev --no-progress --no-ansi --no-interaction --optimize-autoloader
Installing dependencies from lock file
Verifying lock file contents can be installed on current platform.
Package operations: 10 installs, 0 updates, 0 removals
As there is no 'unzip' nor '7z' command installed zip files are being unpacked using the PHP zip extension.
This may cause invalid reports of corrupted archives. Besides, any UNIX permissions (e.g. executable) defined in the archives will be lost.
Installing 'unzip' or '7z' may remediate them.
Package league/uri-hostname-parser is abandoned, you should avoid using it. No replacement was suggested.
Package league/uri-schemes is abandoned, you should avoid using it. No replacement was suggested.
Package patchwork/utf8 is abandoned, you should avoid using it. Use symfony/polyfill-mbstring or symfony/string instead.
Generating optimized autoload files
composer/package-versions-deprecated: Generating version class...
composer/package-versions-deprecated: ...done generating version class
contao/manager-plugin: Generating plugin class...
contao/manager-plugin: ...done generating plugin class
Class League\Uri\Schemes\AbstractUri located in ./vendor/league/uri-schemes/src/Schemes/deprecated.php does not comply with psr-4 autoloading standard. Skipping.
Class League\Uri\Schemes\Data located in ./vendor/league/uri-schemes/src/Schemes/deprecated.php does not comply with psr-4 autoloading standard. Skipping.
Class League\Uri\Schemes\File located in ./vendor/league/uri-schemes/src/Schemes/deprecated.php does not comply with psr-4 autoloading standard. Skipping.
Class League\Uri\Schemes\Ftp located in ./vendor/league/uri-schemes/src/Schemes/deprecated.php does not comply with psr-4 autoloading standard. Skipping.
Class League\Uri\Schemes\Http located in ./vendor/league/uri-schemes/src/Schemes/deprecated.php does not comply with psr-4 autoloading standard. Skipping.
Class League\Uri\Schemes\Uri located in ./vendor/league/uri-schemes/src/Schemes/deprecated.php does not comply with psr-4 autoloading standard. Skipping.
Class League\Uri\Schemes\UriException located in ./vendor/league/uri-schemes/src/Schemes/deprecated.php does not comply with psr-4 autoloading standard. Skipping.
Class League\Uri\Schemes\Ws located in ./vendor/league/uri-schemes/src/Schemes/deprecated.php does not comply with psr-4 autoloading standard. Skipping.
99 packages you are using are looking for funding.
Use the composer fund command to find out more!
@php vendor/bin/contao-setup
Added the public/app.php file.
Added the public/preview.php file.
Added the public/index.php file.
// Clearing the cache for the prod environment with debug
// false
[OK] Cache for the "prod" environment (debug=false) was successfully cleared.
// Clearing the cache for the dev environment with debug
// true
[OK] Cache for the "dev" environment (debug=true) was successfully cleared.
// Warming up the cache for the prod environment with debug
// false
11:25:45 CRITICAL [console] Error thrown while running command "cache:warmup --env=prod --no-ansi". Message: "Class 'Symfony\Bundle\FrameworkBundle\Controller\Controller' not found" ["exception" => Error { …},"command" => "cache:warmup --env=prod --no-ansi","message" => "Class 'Symfony\Bundle\FrameworkBundle\Controller\Controller' not found"]
In BaseController.php line 23:
Attempted to load class "Controller" from namespace "Symfony\Bundle\FrameworkBundle\Controller".
Did you forget a "use" statement for another namespace?
cache:warmup [--no-optional-warmers]
11:25:46 CRITICAL [console] An error occurred while using the console. Message: "An error occurred while executing the "/usr/bin/php7.4 /var/www/html/contao/vendor/contao/manager-bundle/bin/contao-console cache:warmup --env=prod --no-ansi" command: 11:25:45 CRITICAL [console] Error thrown while running command "cache:warmup --env=prod --no-ansi". Message: "Class 'Symfony\Bundle\FrameworkBundle\Controller\Controller' not found" ["exception" => Error { …},"command" => "cache:warmup --env=prod --no-ansi","message" => "Class 'Symfony\Bundle\FrameworkBundle\Controller\Controller' not found"]
In BaseController.php line 23:
Attempted to load class "Controller" from namespace "Symfony\Bundle\FrameworkBundle\Controller".
Did you forget a "use" statement for another namespace?
cache:warmup [--no-optional-warmers]
" ["exception" => RuntimeException { …},"message" => """ An error occurred while executing the "/usr/bin/php7.4 /var/www/html/contao/vendor/contao/manager-bundle/bin/contao-console cache:warmup --env=prod --no-ansi" command: 11:25:45 CRITICAL [console] Error thrown while running command "cache:warmup --env=prod --no-ansi". Message: "Class 'Symfony\Bundle\FrameworkBundle\Controller\Controller' not found" ["exception" => Error { …},"command" => "cache:warmup --env=prod --no-ansi","message" => "Class 'Symfony\Bundle\FrameworkBundle\Controller\Controller' not found"]\n \n In BaseController.php line 23:\n \n Attempted to load class "Controller" from namespace "Symfony\Bundle\Framewo \n rkBundle\Controller". \n Did you forget a "use" statement for another namespace? \n \n \n cache:warmup [--no-optional-warmers]\n \n """]
In ContaoSetupCommand.php line 128:
An error occurred while executing the "/usr/bin/php7.4 /var/www/html/contao
/vendor/contao/manager-bundle/bin/contao-console cache:warmup --env=prod --
no-ansi" command: 11:25:45 CRITICAL [console] Error thrown while running c
ommand "cache:warmup --env=prod --no-ansi". Message: "Class 'Symfony\Bundle
\FrameworkBundle\Controller\Controller' not found" ["exception" => Error {
…},"command" => "cache:warmup --env=prod --no-ansi","message" => "Class 'Sy
mfony\Bundle\FrameworkBundle\Controller\Controller' not found"]
In BaseController.php line 23:
Attempted to load class "Controller" from namespace "Symfony\Bundle\FrameworkBundle\Controller".
Did you forget a "use" statement for another namespace?
cache:warmup [--no-optional-warmers]
contao:setup
Script @php vendor/bin/contao-setup handling the post-install-cmd event returned with error code 1
Process terminated with exit code 1
Result: General error
In my opinion there's a deprecated linked class to the Symfony Framework bundle. Sadly I'm not able to create a pull request because I'm not getting along with all these Composer and Symfony linkings and class constructs. However, I found the following inside the Symfony changelog:
Removed Controller, use AbstractController instead
Hi everyone,
with a brand new installation of Contao 4.12.1 I've encountered the following problem:
In my opinion there's a deprecated linked class to the Symfony Framework bundle. Sadly I'm not able to create a pull request because I'm not getting along with all these Composer and Symfony linkings and class constructs. However, I found the following inside the Symfony changelog:
Source: https://github.com/symfony/framework-bundle/blob/5.3/CHANGELOG.md#500
So I would suggest to edit https://github.com/Kuestenschmiede/CoreBundle/blob/721dddc9a775eccc66bb1166f9c5a162f3273ab6/Controller/BaseController.php#L18
and https://github.com/Kuestenschmiede/CoreBundle/blob/721dddc9a775eccc66bb1166f9c5a162f3273ab6/Controller/BaseController.php#L23
Greetings, Harry.