Skip to content
This repository has been archived by the owner on Dec 7, 2019. It is now read-only.

Create classmap on Windows OS #132

Open
dafap opened this issue Aug 15, 2016 · 2 comments
Open

Create classmap on Windows OS #132

dafap opened this issue Aug 15, 2016 · 2 comments
Labels

Comments

@dafap
Copy link

dafap commented Aug 15, 2016

On windows, command php vendor\zendframework\zftool\zf.php classmap generate module/DafapMail -w product wrong file autoload_classmap.php :

return array(
'DafapMail\Module'                                    => __DIR__ . '/../../../../../../../D:\dafap\Developpements Eclipse\sbm\sources\module\DafapMail/D:/dafap/Developpements Eclipse/sbm/sources/module/DafapMail/Module.php',
'DafapMail\Controller\IndexController'                => __DIR__ . '/../../../../../../../D:\dafap\Developpements Eclipse\sbm\sources\module\DafapMail/D:/dafap/Developpements Eclipse/sbm/sources/module/DafapMail/src/DafapMail/Controller/IndexController.php',
'DafapMail\Controller\Service\IndexControllerFactory' => __DIR__ . '/../../../../../../../D:\dafap\Developpements Eclipse\sbm\sources\module\DafapMail/D:/dafap/Developpements Eclipse/sbm/sources/module/DafapMail/src/DafapMail/Controller/Service/IndexControllerFactory.php',
'DafapMail\Form\Mail'                                 => __DIR__ . '/../../../../../../../D:\dafap\Developpements Eclipse\sbm\sources\module\DafapMail/D:/dafap/Developpements Eclipse/sbm/sources/module/DafapMail/src/DafapMail/Form/Mail.php',
'DafapMail\Model\EnvoiMail'                           => __DIR__ . '/../../../../../../../D:\dafap\Developpements Eclipse\sbm\sources\module\DafapMail/D:/dafap/Developpements Eclipse/sbm/sources/module/DafapMail/src/DafapMail/Model/EnvoiMail.php',
'DafapMail\Model\Exception'                           => __DIR__ . '/../../../../../../../D:\dafap\Developpements Eclipse\sbm\sources\module\DafapMail/D:/dafap/Developpements Eclipse/sbm/sources/module/DafapMail/src/DafapMail/Model/Exception.php',
'DafapMail\Model\Service\ConfigServiceFactory'        => __DIR__ . '/../../../../../../../D:\dafap\Developpements Eclipse\sbm\sources\module\DafapMail/D:/dafap/Developpements Eclipse/sbm/sources/module/DafapMail/src/DafapMail/Model/Service/ConfigServiceFactory.php',
'DafapMail\Model\Service\EnvoiMailFactory'            => __DIR__ . '/../../../../../../../D:\dafap\Developpements Eclipse\sbm\sources\module\DafapMail/D:/dafap/Developpements Eclipse/sbm/sources/module/DafapMail/src/DafapMail/Model/Service/EnvoiMailFactory.php',
'DafapMail\Model\Template'                            => __DIR__ . '/../../../../../../../D:\dafap\Developpements Eclipse\sbm\sources\module\DafapMail/D:/dafap/Developpements Eclipse/sbm/sources/module/DafapMail/src/DafapMail/Model/Template.php',
);

Path is wrong.

The problem is calculating on $relativePath because DIRECTORY_SEPARATOR is not '/'.

@adamlundrigan
Copy link
Contributor

That does appear to be the problem. There are quite a few places in ClassmapController::generate where the directory separator is hard-coded to forward-slash.

Honestly, this module doesn't appear to be actively maintained and in the intervening time ZF has moved from Zend\Loader to Composer for it's autoloading. I would suggest adding your module namespace to the autoload section of your project's composer.json instead, or check out this nifty new tool on the zfcampus side which automates the task: https://github.com/zfcampus/zf-composer-autoloading

@dafap
Copy link
Author

dafap commented Aug 17, 2016

Thank you for your advice. So I registered my namespaces in composer.json
Best regard.

Alain POMIROL
DAFAP Informatique
Tel. 06 07 87 94 44

----- Mail original -----
De: "Adam Lundrigan" notifications@github.com
À: "zendframework/ZFTool" ZFTool@noreply.github.com
Cc: "Pomirol Alain" dafap@free.fr, "Author" author@noreply.github.com
Envoyé: Lundi 15 Août 2016 23:43:27
Objet: Re: [zendframework/ZFTool] Create classmap on Windows OS (#132)

That does appear to be the problem. There are quite a few places in ClassmapController::generate where the directory separator is hard-coded to forward-slash.

Honestly, this module doesn't appear to be actively maintained and in the intervening time ZF has moved from Zend\Loader to Composer for it's autoloading. I would suggest adding your module namespace to the autoload section of your project's composer.json instead, or check out this nifty new tool on the zfcampus side which automates the task: https://github.com/zfcampus/zf-composer-autoloading


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub , or mute the thread .

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants