Adding logic to check module dependencies at module loading time#3443
Adding logic to check module dependencies at module loading time#3443Ocramius wants to merge 2 commits into
Conversation
|
If this one is okay (from the logic perspective/coding), please let me know and don't merge until I wrote the docs for it (I noticed it's the only way to get me to write docs =_= ) |
|
What if two modules depend on each other? |
|
@marc-mabe makes no real sense since modules have a loading order. The feature can be turned off at any time btw. It's just a safety check before letting the spaceship starts the engines. |
|
@Ocramius As it's only a check does it make sense to check it after loading. |
|
@marc-mabe loading (including init triggers) may depend on other modules anyway. That's why I do it so early. Even tempted to handle it before autoloading eventually. |
|
@Ocramius Is the loading process not known the list of modules for loading - isn't it? Does this make sense ? |
|
@marc-mabe no, my point is exactly to AVOID any kind of magic here. It's just a check. If you know what you're doing, you can turn it off and handle dependencies as you wish. This is just a very important thing for people who may (example) install And yes, it would just help discovering circular dependencies. Doesn't mean it has to solve 'em :) |
Adding description of how the ModuleDependencyIndicatorInterface works and how the listener associated to it behaves
|
@Ocramius I'm on you. Because it's a development feature and can be disabled - circular dependencies aren't a must-have and too much magic isn't good. |
|
AFAIK, this is complete |
There was a problem hiding this comment.
This one should extend Zend\ModuleManager\Exception\RuntimeException, not the base exception class.
|
Implementation looks straightforward. I like it. Good work! |
|
Done, rebased |
|
Looks good. The only issue I have is similar to what @prolic says: |
|
Merged -- see a087928 |
Documenting feature proposed at zendframework/zendframework#3443
…tModuleDependencies
Close zendframework/zendframework#3443 Modified original to rename getDependencyModules to getModuleDependencies.
Provides implementation for #3427