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

Refactor ExtensionsModule to Core-2.0 (except Plugin handling). #2773

Merged
merged 1 commit into from Mar 2, 2016

Conversation

craigh
Copy link
Member

@craigh craigh commented Feb 16, 2016

Refactor ExtensionsModule to Core-2.0 (except Plugin handling).

Q A
Bug fix? yes
New feature? yes
BC breaks? no
Deprecations? yes
Tests pass? yes
Fixed tickets #2600
Refs tickets #1753
License MIT
Doc PR -
Changelog updated yes

@craigh craigh added the Task label Feb 16, 2016
@craigh craigh self-assigned this Feb 16, 2016
@craigh craigh added this to the 1.4.2 milestone Feb 16, 2016
$extensionsInFileSystem = $this->get('zikula_extensions_module.bundle_sync_helper')->scanForBundles();
$this->get('zikula_extensions_module.bundle_sync_helper')->syncExtensions($extensionsInFileSystem);
}

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ping @Guite above, you can see how I would prefer to handle the coupling with MultiSitesModule. There are other instances in this PR also. Here, MultiSites would simply implement and event handler that does whatever checks it needs and then if it wishes to prevent (veto) the regeneration of extensions (modules) then simply stop propagation of the event.

In current code, this is what the MultiSitesModule is checking for this specific instance (the veto would need to actually invert this logic):

        if ($this->serviceManager['multisites.enabled'] != 1
            || ($this->serviceManager['multisites.mainsiteurl'] == $request->query->get('sitedns', null)
                && $this->serviceManager['multisites.based_on_domains'] == 0)
            || ($this->serviceManager['multisites.mainsiteurl'] == $_SERVER['HTTP_HOST']
                && $this->serviceManager['multisites.based_on_domains'] == 1)) {

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So Multisites would also use this sync helper for fetching the bundles and process them individually, right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no. As I said above, Multisites would use an event handler to veto the regeneration of modules.

@craigh craigh force-pushed the extensionmodule-refactor branch 3 times, most recently from c2d7775 to 6fa7ff7 Compare February 23, 2016 21:54
@craigh craigh force-pushed the extensionmodule-refactor branch 5 times, most recently from 846efe7 to 826cadd Compare March 2, 2016 12:49
@craigh craigh changed the title [WIP] begin process of refactoring extensions module. Refactor ExtensionsModule to Core-2.0 (except Plugin handling). Mar 2, 2016
| Q                 | A
| ----------------- | ---
| Bug fix?          | yes
| New feature?      | yes
| BC breaks?        | no
| Deprecations?     | yes
| Tests pass?       | yes
| Fixed tickets     | #2600
| Refs tickets      | #1753
| License           | MIT
| Doc PR            | -
| Changelog updated | yes

 - Upgrade ExtensionsModule to Core-2.0 spec except the handling of module and system plugins.
 - Consolidate all hook-related classes and files into new HookBundle
 - Correct issue with hook display requiring smarty - fixes #2600
 - Add 'info' type of flash message
craigh added a commit that referenced this pull request Mar 2, 2016
Refactor ExtensionsModule to Core-2.0 (except Plugin handling).
@craigh craigh merged commit 5ec5606 into 1.4 Mar 2, 2016
@craigh craigh deleted the extensionmodule-refactor branch March 2, 2016 21:53
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.

None yet

3 participants