Swedbank-SPP / swedbank-payment-portal

Swedbank Payment Portal API library for PHP
Other
36 stars 21 forks source link

Symfony\Component\Debug\Exception\FatalThrowableError: Type error: Return value of Doctrine\Common\Annotations\AnnotationRegistry::registerLoader() must be an instance of Doctrine\Common\Annotations\void, none returned #15

Open code-quantum opened 6 years ago

code-quantum commented 6 years ago

this code throw exception:

        $auth = new Authentication($this->login, $this->password);
        $options = new ServiceOptions(
            new CommunicationOptions($this->endpoint),
            $auth
        );
        SwedbankPaymentPortal::init($options);   // it`s line 88 of PaymentService.php

[2017-10-10 21:01:16] production.ERROR: Symfony\Component\Debug\Exception\FatalThrowableError: Type error: Return value of Doctrine\Common\Annotations\AnnotationRegistry::registerLoader() must be an instance of Doctrine\Common\Annotations\void, none returned in /var/www/lk_intergaz/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationRegistry.php:117 Stack trace:

0 /var/www/lk_intergaz/vendor/swedbank-spp/swedbank-payment-portal/src/Container.php(32): Doctrine\Common\Annotations\AnnotationRegistry::registerLoader('class_exists')

1 /var/www/lk_intergaz/vendor/swedbank-spp/swedbank-payment-portal/src/SwedbankPaymentPortal.php(39): SwedbankPaymentPortal\Container->getContainer(Object(SwedbankPaymentPortal\Options\ServiceOptions))

2 /var/www/lk_intergaz/vendor/swedbank-spp/swedbank-payment-portal/src/SwedbankPaymentPortal.php(54): SwedbankPaymentPortal\SwedbankPaymentPortal->__construct(Object(SwedbankPaymentPortal\Options\ServiceOptions))

3 /var/www/lk_intergaz/app/Services/Payments/PaymentService.php(88): SwedbankPaymentPortal\SwedbankPaymentPortal::init(Object(SwedbankPaymentPortal\Options\ServiceOptions))

code-quantum commented 6 years ago

solved by update php version to 7.1)

lkallas commented 6 years ago

What version did you use before updating to 7.1 ? I'm using PHP 5.6.31 and never encountered such problem.

code-quantum commented 6 years ago

PHP 7.0