LiaraAlis / kimai2-SmallBusinessRuleBundle

This plugin provides the possibility to use the small business regulation, as it can be applied in Germany and Austria, when creating invoices in Kimai.
4 stars 1 forks source link

Undefined constant TAG_INVOICE_CALCULATOR #10

Closed sawi-ws closed 5 months ago

sawi-ws commented 5 months ago

Hello,

i have this error in my Logfile. Did i install anything wrong? Which data do you need? Kimai is running in a Docker container.

image

maccanid commented 5 months ago

I found the following workaround: you have to change /plugins/SmallBusinessRuleBundle/DependencyInjection/Compiler/SmallBusinessDecoratorPass.php

add a private constant

class SmallBusinessDecoratorPass implements CompilerPassInterface
{
    private  const TAG_INVOICE_CALCULATOR = 'invoice.calculator';

and change
$taggedServices = $container->findTaggedServiceIds(Kernel::TAG_INVOICE_CALCULATOR); to
$taggedServices = $container->findTaggedServiceIds(self::TAG_INVOICE_CALCULATOR);

LiaraAlis commented 5 months ago

Thanks for reporting. I can confirm that this issue occurs starting with Kimai v2.7.0. I will provide a fix shortly.