Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

[3.x] Disable Zend\Loader by default and add option to enable it #17

Closed
wants to merge 1 commit into from
Closed

[3.x] Disable Zend\Loader by default and add option to enable it #17

wants to merge 1 commit into from

Conversation

Xerkus
Copy link
Member

@Xerkus Xerkus commented Dec 1, 2015

This is breaking change
@weierophinney I need your input on this PR.

Disable dependency on zendframework/zend-loader by default and disable related features in favor of other means of autoloading. Eg Composer, which is now de-facto industry standard.

New use_zend_loader module manager option controls if Zend\Loader should be used.
Both ModuleAutoloader and AutoloaderProvider features are affected.

Example of config/application.config.php using zendframework/zend-loader:

<?php

return [
    'modules' => [
        'Application',
    ],
    'module_listener_options' => [
        'use_zend_loader' => true,
        // note that module paths only make sense if zend-loader is used
        'module_paths' => [
            './module',
            './vendor',
        ],
        'config_glob_paths' => [
            'config/autoload/{{,*.}global,{,*.}local}.php',
        ],
    ],
];

This PR replaces #4
Waiting for docs for the component to be merged.

Disable dependecy on zendframework/zend-loader by default and disable
related features in favor of other means of autoloading. Eg Composer,
which is now de-facto industry standard.

New `use_zend_loader` module manager option controls if Zend\Loader
should be used.
Both ModuleAutoloader and AutoloaderProvider features are affected.

Example of config/application.config.php using zendframework/zend-loader:

<?php

return [
    'modules' => [
        'Application',
    ],
    'module_listener_options' => [
        'use_zend_loader' => true,
        // note that module paths only make sense if zend-loader is used
        'module_paths' => [
            './module',
            './vendor',
        ],
        'config_glob_paths' => [
            'config/autoload/{{,*.}global,{,*.}local}.php',
        ],
    ],
];
@RalfEggert
Copy link
Contributor

I really like this important change.

Just a quick note: please don't forget to add some docs for this new flag and explain how to configure composer to do the auto loading of the modules.

@Xerkus Xerkus closed this Mar 31, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants