EncryptBundle icon indicating copy to clipboard operation
EncryptBundle copied to clipboard

Last update broke symfony <6.1 support

Open achterin opened this issue 1 year ago • 1 comments

Since this bundle is now extenting AbstractBundle support for symfony versions prior 6.1 is broken. The symfony documentation states:

If your bundle must be compatible with previous Symfony versions you have to extend from the Bundle instead.

As AbstractBundle was introduced in v6.1 you'll get the following error trying to install the latest version on older symfony versions:

[critical] Uncaught Error: Class "Symfony\Component\HttpKernel\Bundle\AbstractBundle" not found

achterin avatar Sep 18 '23 11:09 achterin

@achterin i've changed in composer.json to:

"specshaper/encrypt-bundle": "3.0.2"`

and it worked

unbreak avatar Feb 26 '24 18:02 unbreak

Why was this issue closed? The latest release is still not compatible with symfony < 6.1.

!! Symfony\Component\ErrorHandler\Error\ClassNotFoundError {#75 !! #message: """ !! Attempted to load class "AbstractBundle" from namespace "Symfony\Component\HttpKernel\Bundle".\n !! Did you forget a "use" statement for another namespace? !! """ !! #code: 0 !! #file: "./vendor/specshaper/encrypt-bundle/src/SpecShaperEncryptBundle.php" !! #line: 16 !! trace: { !! ./vendor/specshaper/encrypt-bundle/src/SpecShaperEncryptBundle.php:16 { …} !! ./vendor/symfony/error-handler/DebugClassLoader.php:290 { …} !! ./vendor/symfony/framework-bundle/Kernel/MicroKernelTrait.php:132 { …} !! ./vendor/symfony/http-kernel/Kernel.php:386 { …} !! ./vendor/symfony/http-kernel/Kernel.php:788 { …} !! ./vendor/symfony/http-kernel/Kernel.php:128 { …} !! ./vendor/symfony/framework-bundle/Console/Application.php:168 { …} !! ./vendor/symfony/framework-bundle/Console/Application.php:74 { …} !! ./vendor/symfony/console/Application.php:171 { …} !! ./vendor/symfony/runtime/Runner/Symfony/ConsoleApplicationRunner.php:54 { …} !! ./vendor/autoload_runtime.php:35 { …} !! ./bin/console:11 { !! › !! › require_once dirname(DIR).'/vendor/autoload_runtime.php'; !! › !! arguments: { !! "/app/vendor/autoload_runtime.php" !! } !! } !! } !! }

achterin avatar May 28 '24 09:05 achterin

Hey ^^ I just checked and I can confirm that with Symfony ^5.4 and specshaper/encrypt-bundle ^3.1 I get the mentioned error. So some fix would be highly appreciated

Seros avatar May 28 '24 13:05 Seros

Resolved in dev-master, will push to v3.2 in next few days.

mogilvie avatar May 28 '24 19:05 mogilvie

@achterin please check with your package. I don't run anything in 5.4 anymore, although the latest dev-master appears to work successfully on a symfony 5.4 skeleton that I have just tested on.

mogilvie avatar May 28 '24 20:05 mogilvie

@mogilvie installing dev-master works fine now, thanks for the quick response and fix!

achterin avatar May 29 '24 10:05 achterin