Skip to content
This repository was archived by the owner on Sep 26, 2024. It is now read-only.
This repository was archived by the owner on Sep 26, 2024. It is now read-only.

Plugin integration services must start with mautic.integration. (undocumented) #194

@dennisameling

Description

@dennisameling

Just broke my head for two hours over why my plugin icon + settings didn't show up in Mautic's plugin page.

Turns out that every integration HAS to be registered as mautic.integration.NAME (EXAMPLE), and it's currently mentioned incorrectly in the Integration Framework docs:

image

These names need to be the EXACT same for it to work:

  • mautic.integration.helloworld (lowercase) in Config/config.php
  • File name: Integration/HelloWorldIntegration.php (including the class name HelloWorldIntegration)

Without proper naming, the plugin IS registered and activated, but has the default icon because the integration isn't recognized (note: the config options also don't show up):

image

With proper naming, the plugin is correctly recognized as an integration and things like the icon/config options all show up:

image

This is the code in Mautic that's responsible for this behavior:

https://github.com/mautic/mautic/blob/7a2875bc16a6de50a1803fbc41b64278ae9b5428/app/bundles/PluginBundle/Helper/IntegrationHelper.php#L292-L300

Since integrations should now be tagged with mautic.basic_integration in the IntegrationBundle, we could simply get all services that are tagged with mautic.basic.integration in the container, and get their keys dynamically. This would be a breaking change that we could introduce in Mautic 4. What do you think @alanhartless?


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions