tobybatch / kimai2

Docker containers for the kimai2 web application including docker-compose and kubernetes/helm deployment.
MIT License
183 stars 96 forks source link

[BUG] Unable to upgrade Kimai from apache-1.30.11-prod to 2.x #565

Closed enekux closed 6 months ago

enekux commented 6 months ago

Describe the bug I am unable to upgrade Kimai from apache-1.30.11-prod to 2.x since March 2023.

I see many issues somehow related (#488, #492, #498, #499) but none with the exact error as I am seeing:

PHP Fatal error:  Uncaught Error: Class "Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle" not found in /opt/kimai/src/Kernel.php:59

Any ideas, I am stuck in this old version.

Thank you and regards,

kevinpapst commented 6 months ago

Delete your cache folder in the var/ mount and retry

enekux commented 6 months ago

nope, I get the next error:

[Wed Dec 27 15:26:23.464602 2023] [php:error] [pid 57] [client 10.10.1.101:48234] PHP Fatal error:  Uncaught Error: Class "Sensio\\Bundle\\FrameworkExtraBundle\\SensioFrameworkExtraBundle" not found in /opt/kimai/src/Kernel.php:59\nStack trace:\n#0 /opt/kimai/vendor/symfony/http-kernel/Kernel.php(346): App\\Kernel->registerBundles()\n#1 /opt/kimai/vendor/symfony/http-kernel/Kernel.php(762): Symfony\\Component\\HttpKernel\\Kernel->initializeBundles()\n#2 /opt/kimai/vendor/symfony/http-kernel/Kernel.php(185): Symfony\\Component\\HttpKernel\\Kernel->preBoot()\n#3 /opt/kimai/vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php(35): Symfony\\Component\\HttpKernel\\Kernel->handle()\n#4 /opt/kimai/vendor/autoload_runtime.php(29): Symfony\\Component\\Runtime\\Runner\\Symfony\\HttpKernelRunner->run()\n#5 /opt/kimai/public/index.php(5): require_once('...')\n#6 {main}\n  thrown in /opt/kimai/src/Kernel.php on line 59
kevinpapst commented 6 months ago

Something is fishy, the code ist still trying to load the bundle. So either the Kimai code update failed or you did something weird. Backup, then kill the entire image and restart with a fresh one. Copy & paste the DATABASE_URL to the new one.

enekux commented 6 months ago

I did not do anything particular... how can I do the backup?

enekux commented 6 months ago

Ok, as I am using volumes to store the kimai's app data and config, I have stopped the container, removed the volume and recreate the volume and now it seems to work. It has upgraded and the data from the database is still there. Thanks

enekux commented 6 months ago

I am getting next warnings in the logs now:

[2023-12-28T09:11:23.458601+00:00] deprecation.INFO: User Deprecated: Since symfony/validator 6.4: Method "Symfony\Component\Validator\ValidatorBuilder::setDoctrineAnnotationReader()" is deprecated without replacement. {"exception":"[object] (ErrorException(code: 0): User Deprecated: Since symfony/validator 6.4: Method \"Symfony\\Component\\Validator\\ValidatorBuilder::setDoctrineAnnotationReader()\" is deprecated without replacement. at /opt/kimai/vendor/symfony/validator/ValidatorBuilder.php:252)"} {"channel":"deprecation"}
tobybatch commented 6 months ago

@enekux Are you still having issues with this? If you are, can you open a new ticket on the kimai repo please, we are archiving this repo.