Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow module dependencies to not be "hard" dependencies. #19

Closed

Conversation

colinmollenhour
Copy link

It would sometimes be very helpful to use the module "depends" feature to force ordering of module loading, without explicitly requiring the other modules. For example, if module A breaks when module B is loaded after module A, but A works fine if B is not present, then it would be nice for module A to have a "soft" dependency on module B. That is, do not require module B to be loaded, but if it is loaded, make sure module B is loaded first.

In the xml this would look like:

<config>
  <modules>
    <Module_A>
      <active>true</active>
      <codePool>community</codePool>
      <depends>
        <Module_B type="soft" />
        <Module_C />
      </depends>
    </Module_A>
  </modules>
</config>

Although this is a pull request I understand that you may want different attribute naming, xml semantics, etc. Please let me know what you think or if you want me to make any changes. Thanks!

@colinmollenhour
Copy link
Author

Oh, forgot to mention the commit is not tested.. :-o

@magento-team
Copy link
Contributor

The feature has been implemented in the development repository along with tests, it will become available with the next Github updates.

magento-team added a commit that referenced this pull request Jun 7, 2012
* Fixed various crashes of visual design editor
* Fixed some layouts that caused visual design editor toolbar disappearing, also fixed some confusing page type labels
* Eliminated "after commit callback" workaround from integration tests by implementing "transparent transactions" capability in integration testing framework
* Refactored admin authentication/authorization in RSS module. Removed program termination and covered the controllers with tests
* Removed HTML-report feature of copy-paste detector which never worked anyway (`dev/tests/static/framework/Inspection/CopyPasteDetector/html_report.xslt` and all related code)
* Github requests:
** [#19](#19) Implemented "soft" dependency between modules and performed several improvements in the related code, covered with tests
@magento-team
Copy link
Contributor

Closing request as implemented. Thank you for the suggestion.

@jivanrij
Copy link

Posted a link to this page from my blog. Great explanation.

http://webdev.vanrij.org/index.php/2013/08/19/replayce-old-javascript-version-in-magento/

@sivajik34 sivajik34 mentioned this pull request Jan 2, 2015
This was referenced Mar 4, 2015
@stevieyu stevieyu mentioned this pull request Apr 3, 2015
magento-devops-reposync-svc pushed a commit that referenced this pull request Aug 31, 2022
[Amigos] Community Contributions – Patch 8
@nabeelfocus nabeelfocus mentioned this pull request Jan 3, 2024
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants