myparcelnl / pdk

MyParcel Plugin Development Kit
0 stars 0 forks source link

APCu installed but not enabled throws exception in php-di #223

Closed EdieLemoine closed 9 months ago

EdieLemoine commented 10 months ago

What went wrong?

When the APCu extension is present but not enabled, an error is thrown in the ContainerBuilder.

Reproduction steps

  1. Have apcu extension but not enabled (?)
  2. Attempt to use the pdk
  3. Get error

Relevant log output

Fatal error: Uncaught Exception: APCu is not enabled, PHP-DI cannot use it as a cache in /xxx/vendor/php-di/php-di/src/ContainerBuilder.php:138

Stack trace:

#0 /xxx/pdk/src/Base/Factory/PdkFactory.php(88): MyParcelNL\DI\ContainerBuilder->build()
#1 /xxx/pdk/src/Base/Factory/PdkFactory.php(34): MyParcelNL\Pdk\Base\Factory\PdkFactory->setupContainer()
#2 /xxx/pdk/src/Base/PdkBootstrapper.php(57): MyParcelNL\Pdk\Base\Factory\PdkFactory::create()
#3 /xxx/pdk/src/Base/PdkBootstrapper.php(41): MyParcelNL\Pdk\Base\PdkBootstrapper->createPdkInstance()

// Rest of the stack trace omitted

thrown in /xxx/vendor/php-di/php-di/src/ContainerBuilder.php on line 138
EdieLemoine commented 9 months ago

Fixed in #239