dmitrirussu / php-sepa-xml-generator

SEPA SDD XML Generator recommended to see. PHP SEPA XML Generator, (Single Euro Payments Area ISO20022 SDD V1_0 20122009) (SEPA)(PHP5)
https://github.com/dmitrirussu/PHP-SEPA-XML-GENERATOR
MIT License
53 stars 36 forks source link

I can't autoload php-sepa-xml-generator with composer #12

Closed PhoneixS closed 10 years ago

PhoneixS commented 10 years ago

I'm trying to use the library with composer but I always get Class 'SEPA\Factory\XMLGeneratorFactory' not found exception.

For example in a file like bellow, it throw it.

<!DOCTYPE HTML >
<head>
    <title>Prueba</title>
</head>
<body>
<?php

    $l = require 'vendor/autoload.php';

    $a = SEPA\Factory\XmlGeneratorFactory::createXmlGeneratorObject();

?>
</body>

Debugging, I have found that $l->S->SEPA have the value /home/jabellota/Proyectos/wsAptana/PaginaPublica/vendor/dmitrirussu/php-sepa-xml-generator/lib, which is (I think incorrect).

The actual folder structure is something like (my root is in /home/jabellota/Proyectos/wsAptana/PaginaPublica/):

dmitrirussu folder and bellow are automatically made by composer when installing the dependency.

Also note that the autoload_namespaces.php file have this content:

<?php

// autoload_namespaces.php @generated by Composer

$vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);

return array(
    'SEPA' => array($vendorDir . '/dmitrirussu/php-sepa-xml-generator/lib'),
);
PhoneixS commented 10 years ago

Well, debuging I have found two problems.

After correcting this two things, it load correctly.

PhoneixS commented 10 years ago

I think it was resolved in d44053b22fa0d47a3af7eb2a6c5af17d344c7a3b.