Hi Ralf,

Maybe I can help you this time :-)

On 21.09.2012 22:24, Ralf Eggert wrote:
> return array(
>     'modules' => array(
>         'Application',
>         'travello',
>     ),
>     'module_listener_options' => array(
>         'config_glob_paths'    => array(
>             'config/autoload/{,*.}{global,local}.php',
>         ),
>         'module_paths' => array(
>             './module',
>             './vendor',
>             './vendor/ralfeggert',
>         ),
>     ),
> );
> ------------------------------------------------------------------
> 
> It works, but feels wrong. What am I missing?

I have a very similar setup. You have something wrong in one of the
composer.json files.

I have the following structure:
vendor/cwd/Admin
vendor/cwd/Common

Admin is a module, Common is just a library.

in the application.config.php it looks like:
    'modules' => array(
        'Application',
        'cwdAdmin',
        'Admin',
        [some other modules]
    )

the important part,
the composer.json of cwdCommon (shortend):
        "name" : "cwd/Common",
        "type" : "library",
        "autoload" : {
                "psr-0" : {
                        "cwdCommon" : "src/"
                }
        }
the composer.json of cwdAdmin (shortend):
        "name" : "cwd/Admin",
        "require": {
                "php": ">=5.3.0",
                "cwd/Common" : "master"
        },
        "autoload" : {
                "psr-0" : {
                        "cwdAdmin" : "src/"
                },
                "classmap" : [
                        "./Module.php"
                ]
         }

this will generate a autoload_namespaces.php with:
// autoload_namespaces.php generated by Composer

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

return array(
    'cwdCommon' => $vendorDir . '/cwd/Common/src/',
    'cwdAdmin' => $vendorDir . '/cwd/Admin/src/',

and the autoload_classmap.php
// autoload_classmap.php generated by Composer

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

return array(
    'cwdAdmin\Module' => $baseDir . '/vendor/cwd/Admin/Module.php',


--------------------------------------------------------------

maybe this help you.

Ludwig

-- 
Ludwig Ruderstaller
http://www.cwd.at

-- 
List: [email protected]
Info: http://framework.zend.com/archives
Unsubscribe: [email protected]


Reply via email to