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

2.0.0 Extension Model/Standard #2500

Closed
craigh opened this issue Jun 17, 2015 · 18 comments
Closed

2.0.0 Extension Model/Standard #2500

craigh opened this issue Jun 17, 2015 · 18 comments

Comments

@craigh
Copy link
Member

craigh commented Jun 17, 2015

This ticket is meant to encourage a discussion and (eventual) finalization of a model/standard/prototype/pattern for Core 2.0.0 Extension Bundles.

current 1.4.0 standard is documented here

Core 2.0.0 will 'evolve' this standard but is not required to maintain Backward Compatibility.

Easy agreement on the following:

  • Extends \Zikula\Core\AbstractBundle which extends \Symfony\Component\HttpKernel\Bundle\Bundle
    • This implies certain Bundle functionality as a Symfony Bundle.
  • PSR-4 required (PSR-0 is deprecated)
@craigh craigh added this to the 2.0.0 milestone Jun 17, 2015
@craigh craigh added the meta label Jun 17, 2015
@craigh
Copy link
Member Author

craigh commented Jun 17, 2015

Current questions in my mind:

Version

  • I think we can move this data to the composer.json file
    • how/where?
  • HookBundle Setup might be moved to Service Container tags with a compiler pass to gather them.

Installer

  • Create an Interface instead of an Abstract class.
<?php
interface InstallerInterface
{
    public function setBundle(Bundle $bundle);
    public function install();
    public function upgrade($oldVersion);
    public function remove();
}
  • Most Installer implementations will also implement the ContainerAwareInterface, although, the container can currently be extracted from the Bundle also. Discussion here, I suppose on best way to handle this. (The bundle does not include the container until post-install)

Bundle class

  • could expand this to directly set Installer class and extract Version info from composer file

Hooks

  • I'm wondering if it is possible to use Service Container Tags (see above) for all hooks instead of persisting them.

AdminInterface

Zikula\Core\Api\AbstractApi

@cmfcmf
Copy link
Contributor

cmfcmf commented Jun 17, 2015

Regarding the

AdminAuthInterface / AdminAuthListener

This is something cool for 1.4, but will most definitely be replaced by "a proper thing" in 2.0:
http://symfony.com/doc/current/book/security.html#securing-controllers-and-other-code

/**
 * @Security("has_role('ROLE_ADMIN')")
 */

This cannot be done in 1.4, because Symfony Users and Security models are not yet adopted.

@craigh
Copy link
Member Author

craigh commented Jun 18, 2015

but will most definitely be replaced by "a proper thing" in 2.0:

One of the 'highlights' of Zikula over the years has been the security and permissions system. I'm sure Symfony is awesome, but we should consider how we might leverage what we have in addition to symfony's features. We don't have to always replace, replace, replace. If we do that, then we can just eliminate zikula and use symfony 😄 Anyway - I just think it is a discussion worth expansion.

@Guite - maybe we can add some time on the agenda at the camp to discuss this ticket and related topics.

@Guite
Copy link
Member

Guite commented Jun 18, 2015

added to list of topics on last keynote slide ;-)

craigh added a commit that referenced this issue Jun 18, 2015
…tallerInterface and abstract some of the functionality to avoid code duplication. refs #2500
craigh added a commit to zikula-modules/Pages that referenced this issue Jun 18, 2015
@craigh
Copy link
Member Author

craigh commented Jun 18, 2015

@Kaik
Copy link
Contributor

Kaik commented Jun 18, 2015

Hi, quick one so permissions system and users. Same as @craigh I think our perms system is what defines Zikula and make it special. We may want to review it make it more user friendly. I have read sf docs about auth some time ago and I do not know if this is replaceable with our perms system I think it work in different layers/scopes you know more about that than me... Users I do not know yet how sf users works but I think anything will be better than our current profile/users module.

@cmfcmf
Copy link
Contributor

cmfcmf commented Jun 18, 2015

I really didn't intend to say: "Remove all the Zikula stuff and replace it by Symfony". What I really meant was: "Review all the cool and good working Zikula stuff and see if we can build bridges to the Symfony counterparts".

@craigh
Copy link
Member Author

craigh commented Jun 19, 2015

Version Capabilities

in composer.json

  • string keys
    • searchable
    • hook_subscriber
    • hook_provider
    • admin
    • user

values for each are arrays, but I think these can be standardized and made more useful. for example:

  "capabilities": {
    "hook_subscriber": {"class": "Zikula\\FooModule\\Hooks\\Definition"},
    "searchable": {"class": "Zikula\\FooModule\\Helper\\SearchHelper"},
    "admin": {"route": "zikulafoomodule_admin_index"}
  }

@cmfcmf
Copy link
Contributor

cmfcmf commented Jun 21, 2015

There also is the question where to place these new classes and interfaces:

  • in new Bundles (Zikula\Core\Bundle\Bar)
  • in new Components, like Symfony does (Zikula\Component\Foo)
  • directly under Zikula\Core

@cmfcmf
Copy link
Contributor

cmfcmf commented Jun 21, 2015

When moving the Hooks from the version class into the composer.json file, #236 should also be considered.

@cmfcmf
Copy link
Contributor

cmfcmf commented Jun 21, 2015

Also #249 (Module dependencies with an or) might be taken into account - although I think we could also close that one.

@cmfcmf
Copy link
Contributor

cmfcmf commented Jun 21, 2015

#411 (Category Entity Support) and #418 (Plugin dependency) should also be considered.

@cmfcmf
Copy link
Contributor

cmfcmf commented Jun 21, 2015

Also see #1286 (drak's 'What Modules can do')

@craigh
Copy link
Member Author

craigh commented Jun 23, 2015

I've created a SpecModule to enable further discussion

https://github.com/zikula/SpecModule

craigh added a commit that referenced this issue Jun 23, 2015
…tallerInterface and abstract some of the functionality to avoid code duplication. refs #2500
craigh added a commit that referenced this issue Jun 23, 2015
…tallerInterface and abstract some of the functionality to avoid code duplication. refs #2500
craigh added a commit that referenced this issue Jul 19, 2015
… DI. refs #2500 and refs #2494

will require documentation.

see companion commit in Pages module (FC-features branch) for implementation.

/cc @cmfcmf
craigh added a commit that referenced this issue Jul 24, 2015
…tallerInterface and abstract some of the functionality to avoid code duplication. refs #2500
craigh added a commit that referenced this issue Jul 24, 2015
… DI. refs #2500 and refs #2494

will require documentation.

see companion commit in Pages module (FC-features branch) for implementation.

/cc @cmfcmf
craigh added a commit that referenced this issue Jul 25, 2015
…tallerInterface and abstract some of the functionality to avoid code duplication. refs #2500
craigh added a commit that referenced this issue Jul 25, 2015
… DI. refs #2500 and refs #2494

will require documentation.

see companion commit in Pages module (FC-features branch) for implementation.

/cc @cmfcmf
craigh added a commit that referenced this issue Jul 28, 2015
…tallerInterface and abstract some of the functionality to avoid code duplication. refs #2500
craigh added a commit that referenced this issue Jul 28, 2015
… DI. refs #2500 and refs #2494

will require documentation.

see companion commit in Pages module (FC-features branch) for implementation.

/cc @cmfcmf
craigh added a commit that referenced this issue Jul 30, 2015
…tallerInterface and abstract some of the functionality to avoid code duplication. refs #2500
craigh added a commit that referenced this issue Jul 30, 2015
… DI. refs #2500 and refs #2494

will require documentation.

see companion commit in Pages module (FC-features branch) for implementation.

/cc @cmfcmf
craigh added a commit that referenced this issue Aug 11, 2015
…tallerInterface and abstract some of the functionality to avoid code duplication. refs #2500
craigh added a commit that referenced this issue Aug 11, 2015
… DI. refs #2500 and refs #2494

will require documentation.

see companion commit in Pages module (FC-features branch) for implementation.

/cc @cmfcmf
@Guite
Copy link
Member

Guite commented Jan 14, 2016

Closed as completed in the 1.4 FC layer. Feel free to reopen if you disagree.

@Guite Guite closed this as completed Jan 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants