(Not only) FTP users will not have the bin/console command and likely not have git as well.
Deployment process does not involve GIT in every environment.
You can pull the Kimai version via PHP constants directly:
And I'd remove the "git rev-parse HEAD" call completely or at least make sure to catch possible exceptions and write an empty string if it couldn't be fetched.
(Not only) FTP users will not have the bin/console command and likely not have git as well. Deployment process does not involve GIT in every environment.
You can pull the Kimai version via PHP constants directly:
And I'd remove the "git rev-parse HEAD" call completely or at least make sure to catch possible exceptions and write an empty string if it couldn't be fetched.