heimrichhannot / contao-utils-bundle

This bundle offers various utility functionality for the Contao CMS.
GNU Lesser General Public License v3.0
8 stars 4 forks source link

Error by installing Contao 5.4.1 #85

Closed LIVID-Media closed 3 weeks ago

LIVID-Media commented 2 months ago

Context Contao version: 5.4.1 Bundle version: 3.4.0 PHP version: 8.2

Description By updating Contao 5.3.13 to 5.4.1 there is an error:

In CheckExceptionOnInvalidReferenceBehaviorPass.php line 119: The service "security.helper" in the container provided to "HeimrichHannot\UtilsBundle\EventListener\DcaField\DcaAuthorListener" has a dependency on a non-existent service "Symfony\Component\Security\Core\Security".

The used \Symfony\Component\Security\Core in \src\EventListener\DcaFields\DcaAuthorListener.php is deprecated. It has been replaced with \Symfony\Bundle\SecurityBundle\Security. After replacing the folder in the use line it works.

UPDATE: I found another error in \src\Command\EntityFinderCommand.php by running cronjobs:

[WARNING] Some commands could not be registered: The command defined in "HeimrichHannot\UtilsBundle\Command\EntityFinderCommand" cannot have an empty name.

For now I could fix it by adding the following lines:

use Symfony\Component\Console\Attribute\AsCommand;

[AsCommand(name: 'huh:utils:entity_finder')]

class EntityFinderCommand extends Command {

UPDATE 2: I found a new error in combination with Symfony 7.*.

In ResolveInstanceofConditionalsPass.php line 163: "Symfony\Component\DependencyInjection\ContainerAwareInterface" is set as an "instanceof" conditional, but it does not exist.

The ContainerAwareInterface instanced in the services.yml is removed since Symfony 7.0. See also: https://github.com/symfony/symfony/blob/7.1/UPGRADE-7.0.md

koertho commented 3 weeks ago

Fixed in 3.4.1, thanks for reporting!