mogilvie / EncryptBundle

Encryption bundle
82 stars 27 forks source link

Last update broke symfony <6.1 support #49

Closed achterin closed 1 month ago

achterin commented 9 months ago

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

unbreak commented 4 months ago

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

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

and it worked

achterin commented 1 month ago

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" !! } !! } !! } !! }

Seros commented 1 month ago

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

mogilvie commented 1 month ago

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

mogilvie commented 1 month ago

@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.

achterin commented 1 month ago

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