Add Mautic 8 Plugin upgrade guide for *Common class type changes - #616
Open
promptless-for-oss wants to merge 2 commits into
Open
Add Mautic 8 Plugin upgrade guide for *Common class type changes#616promptless-for-oss wants to merge 2 commits into
promptless-for-oss wants to merge 2 commits into
Conversation
Documents the backward-compatibility break from mautic/mautic PR #17005, which adds native PHP parameter/return/property types to widely-extended base classes (CommonRepository, AbstractIntegration, CrmAbstractIntegration, CommonApiController, FetchCommonApiController). Explains the four break kinds and the copy-the-parent-signature-exactly rule for Plugin/Integration authors.
…de guide Extend docs/plugins/update_m7_to_m8.rst with the two remaining break categories from mautic/mautic PR #17005 that plugin developers extend: AbstractPermissions (isGranted/add*FormFields now take array) and the MVC/form controllers CommonController and AbstractFormController. Also update the isGranted example in plugins/permissions.rst to the Mautic 8 signature so the cross-referenced example no longer triggers the TypeError the upgrade guide warns about.
promptless-for-oss
marked this pull request as ready for review
August 10, 2026 08:14
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Open in Promptless
Mautic 8 adds native PHP parameter, return, and property type declarations to the base and abstract classes that Plugins and Integrations commonly extend. The types are only made explicit — there's no runtime behavior change — but any subclass whose override or re-declared property no longer matches the parent's now-explicit signature throws a fatal
TypeErroror compile error on Mautic 8.This adds a new developer upgrade guide, "Update Plugins for Mautic 8" (
docs/plugins/update_m7_to_m8.rst), modeled on the existing "Update Plugins for Mautic 5" page. It explains the four kinds of break (added parameter type, added return type, added property type, removed property) and the governing "copy the parent signature exactly" rule, with before/after diff blocks for each affected base class the PR title names — controllers, repositories, permissions, and integrations:CommonRepositoryAbstractPermissions(isGranted()and theadd*FormFields()methods now takearray)AbstractIntegrationandCrmAbstractIntegrationCommonControllerandAbstractFormController(the MVC/form controllers Plugins extend for CRUD interfaces;AbstractStandardFormControllerfollows the same pattern)CommonApiController(including theprepareParametersForBindingfall-throughTypeErrortrap and the batch actions now returningResponse)FetchCommonApiController(typed properties plus the removed$parametersContainer)It also updates the
isGranted()example indocs/plugins/permissions.rstto the Mautic 8 signature, so the cross-referenced example no longer shows code that would trigger the exactTypeErrorthis upgrade guide warns about. The guide cross-references the existing repository, permissions, MVC, and API-controller extension examples and registers the page in the Plugins toctree.Trigger Events