sveawebpay / php-integration

SDK for Sveas payment methods (standalone and Svea Checkout)
Other
15 stars 19 forks source link

Error upgrading from 3.0.0 to 3.1.1 #72

Closed timint closed 6 years ago

timint commented 7 years ago

Warning: require_once(Svea\Checkout\Transport\Connector.inc.php): failed to open stream: No such file or directory

Triggered via ConfigurationService.php

namespace Svea\WebPay\Config;

use Svea\Checkout\Transport\Connector;

Any clues?

timint commented 7 years ago

Anyone?

nlii commented 7 years ago

Could you please specify more information about how to reproduce this issue, like php version, platform, operating system, composer etc. The file Connector.inc.php does not exist in our php-checkout library. Do you use a custom configuration? Please email support-webpay@sveaekonomi.se with more details.

timint commented 7 years ago

I was using the 3.0.0 master release configured using Config/config_prod.php.

My autoloader looks like this:

function __autoload_svea_php_integration_library_classes($className)
{
    if (!preg_match('#^(Svea\\\\WebPay)#', $className)) return;

    $fullPath = preg_replace('#^(Svea\\\\WebPay)#', __DIR__, $className) . '.php';
    $fullPath = str_replace(array('/', '\\'), DIRECTORY_SEPARATOR, $fullPath);

    require $fullPath;
}
spl_autoload_register('__autoload_svea_php_integration_library_classes', false, true);

The only files modified are config_prod.php and config_test.php.

timint commented 7 years ago

Ping

sveateam commented 7 years ago

Hi, the problem could be, looking into this autoload part of code, that checkout package is not loaded anywhere. This library use Checkout library, so you will need that library and autoload for that as well. Usually composer looks after this things and all package dependencies. Hopefully this will fix your problem.

timint commented 7 years ago

We am not using Svea Checkout. No plans for using it neither.

If Svea Checkout is a dependancy for the old regular payment methods card, invoice, etc. It might be a brilliant idea to merge this repository with Checkout.

TXC commented 7 years ago

@timint this repository is using "Svea Checkout" as a dependency in composer.json, so if you are using composer is should solve itself.

fre-sund commented 6 years ago

No changes to how dependencies of the integration packages work is planned as of now. Closing this for now.