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

Make Zend\Loader soft dependency #4

Closed
wants to merge 1 commit into from
Closed

Make Zend\Loader soft dependency #4

wants to merge 1 commit into from

Conversation

Xerkus
Copy link
Member

@Xerkus Xerkus commented Sep 6, 2015

This PR adds new use_zend_loader module manager option that controls if Zend\Loader should be used.
Option is enabled by default. Disabling it removes dependency on zendframework/zend-loader.
Setting it to false will disable both ModuleAutoloader and AutoloaderProvider feature.

Autoloading for vendor modules is already managed by Composer, for most of framework users at least, and application specific modules can be switched as easily.
In fact, letting all the modules be managed by composer provides small performance boost and makes setting up tests easier since application no longer needs to be bootstrapped.

no docs yet

Note: originally i wanted to check if Zend\Loader\ModuleAutoloader present but figured that will lead to too much frustration.

New `use_zend_loader` module manager option controls if Zend\Loader
should be used, it is enabled by default.
Disabling it removes dependency on zendframework/zend-loader.

This option is useful if alternative autoloading is used, eg Composer.
Setting it to false will also disable AutoloaderProvider feature.
@danizord
Copy link

danizord commented Sep 8, 2015

👍

@nuxwin
Copy link

nuxwin commented Dec 1, 2015

We need this enhancement. Right now we must install the zend-loader composer package, else, we get an exception... We use the composer loader for all our classes so here, the zend-loader is not needed.

By the way, either the autoloader provider feature should be disabled by default, either you should explicitely require the zend-loader module in the zend-modulemanager composer.json.

@Xerkus
Copy link
Member Author

Xerkus commented Dec 1, 2015

@nuxwin I would like that too but it can't be done in 2.x unfortunately

@Xerkus
Copy link
Member Author

Xerkus commented Dec 1, 2015

@weierophinney i am a bit confused. This PR was intended for 2.x, since develop is 3.x now should i reopen it against master?

@Maks3w
Copy link
Member

Maks3w commented Dec 1, 2015

With the current branch model new features must be target develop branch, no matter what version is under development.

@weierophinney weierophinney added this to the 2.8.0 milestone Jul 11, 2017
weierophinney added a commit that referenced this pull request Jul 11, 2017
weierophinney added a commit that referenced this pull request Jul 11, 2017
@weierophinney
Copy link
Member

Thanks, @Xerkus. I rebased against current develop, fixed up some issues, and am targeting it for the 2.8.0 release.

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.

None yet

5 participants