kimai / kimai

Kimai is a web-based multi-user time-tracking application. Works great for everyone: freelancers, companies, organizations - everyone can track their times, generate reports, create invoices and do so much more. SaaS version available at https://www.kimai.cloud
https://www.kimai.org
GNU Affero General Public License v3.0
3.32k stars 590 forks source link

Fatal error on composer install due to missing dependency? #1689

Closed Jelle-S closed 4 years ago

Jelle-S commented 4 years ago

Describe the bug In https://github.com/kevinpapst/kimai2/commit/7b13ea860a6e5cbcd2a0d074a711a166b52d7a82, symfony/templating was removed. Now I'm getting

!!  PHP Fatal error:  During class fetch: Uncaught ReflectionException: Class "Symfony\Component\Templating\Helper\Helper" not found while loading "JMS\SerializerBundle\Templating\SerializerHelper". in /var/lib/jenkins/jobs/kimai-demo_deploy_test/workspace/web/vendor/symfony/config/Resource/ClassExistenceResource.php:181

on composer install on our Jenkins instance. The weird part is I can't seem to reproduce it on my local machine, even though the symfony/templating dependency is missing locally as well. Rolling back to 1.8 fixes the error. Both the Jenkins server and my local machine are on PHP 7.2

kevinpapst commented 4 years ago

Add a composer require symfony/templating to your CI job, if the CI thinks it is needed (it is not!). I installed 1.9 on a larger amount of different servers and Distros by now and that problem sounds like a local bug. Do you clear your Jenkins workspace before building? Flush your composer cache (Probably /var/lib/jenkins/.composer/)...

Jelle-S commented 4 years ago

Clearing the workspace & composer cache didn't fix it. Requiring symfony/templating did. So I'll keep it at that for the time being. It's still weird to me, but I don't understand where it's coming from.

kevinpapst commented 4 years ago

Which exact PHP version are you using? It shouldn't happen, as Kimai forces 7.2.9 but maybe its a version issue? Which composer version are you running on Jenkins?

Jelle-S commented 4 years ago
$ php -v
PHP 7.2.20 (cli) (built: Jul  2 2019 13:37:16) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.2.20, Copyright (c) 1999-2018, by Zend Technologies
$ composer --version
Composer version 1.9.3 2020-02-04 12:58:49
kevinpapst commented 4 years ago

@Jelle-S Are you able to test if the change/fix that was provided by @goetas in https://github.com/schmittjoh/JMSSerializerBundle/pull/800 works for you?

goetas commented 4 years ago

The fix has been merged in the master branch already

Jelle-S commented 4 years ago

Thank you! Requiring jms/serializer-bundle:dev-master fixes it!

goetas commented 4 years ago

Happy to hear that is solved 😊

kevinpapst commented 4 years ago

Thnks for the quick fix @goetas ! Now all we need is a 3.5.1 😁

kevinpapst commented 4 years ago

Closing here, as I can't do anything more. We just have to wait for the next release of the JMSSerializerBundle. Hopefully this happens soon, as the last release is half a year old 😊

github-actions[bot] commented 3 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. If you use Kimai on a daily basis, please consider donating to support further development of Kimai.