Skip to content

Reference cache adapters and IntegrationsHelper by FQCN instead of removed string aliases - #629

Draft
promptless-for-oss wants to merge 1 commit into
mautic:7.2from
Promptless:promptless/pr-17134-alias-fqcn
Draft

Reference cache adapters and IntegrationsHelper by FQCN instead of removed string aliases#629
promptless-for-oss wants to merge 1 commit into
mautic:7.2from
Promptless:promptless/pr-17134-alias-fqcn

Conversation

@promptless-for-oss

Copy link
Copy Markdown
Contributor

Open in Promptless

Mautic 8 removes several redundant mautic.* string service aliases and references the autowired class directly instead (mautic/mautic PR #17134). Three of the removed aliases appear in the plugin developer docs as service ids for plugin authors to use, so those references no longer resolve.

This updates two pages to reference the classes directly, matching the same FQCN convention used for the sibling alias-removal suggestions:

  • docs/plugins/cache.rst — the cache_adapter config examples and the "Delivered adapters" list now use \Mautic\CacheBundle\Cache\Adapter\FilesystemTagAwareAdapter and \Mautic\CacheBundle\Cache\Adapter\RedisAdapter in place of mautic.cache.adapter.filesystem and mautic.cache.adapter.redis.
  • docs/plugin_integrations/integrations_authentication.rst — the sentence on reading stored integration configuration now names \Mautic\IntegrationsBundle\Helper\IntegrationsHelper directly instead of the mautic.integrations.helper alias.

The class-id services are already autowired, so these references also resolve on the current 7.x line.

Trigger Events

…moved string aliases

mautic/mautic PR #17134 removes the mautic.cache.adapter.filesystem,
mautic.cache.adapter.redis, and mautic.integrations.helper string service
aliases and repoints consumers to the autowired class-id service. Update the
plugin cache and integrations authentication docs to reference the classes
directly so the examples resolve on current Mautic.
Comment thread docs/plugins/cache.rst
.. code-block:: php

'cache_adapter' => 'mautic.cache.adapter.filesystem',
'cache_adapter' => \Mautic\CacheBundle\Cache\Adapter\FilesystemTagAwareAdapter::class,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Confirms removed alias mautic.cache.adapter.filesystem pointed to Mautic\CacheBundle\Cache\Adapter\FilesystemTagAwareAdapter; alias removed in mautic/mautic PR #17134 (base 9300dce, head b4d6ae1), consumers now reference the class id directly.

Source: https://github.com/mautic/mautic/blob/9300dce8fc9247ad861bd811142b7d81164699f9/app/bundles/CacheBundle/Config/services.php#L25

Comment thread docs/plugins/cache.rst
.. code-block:: php

'cache_adapter' => 'mautic.cache.adapter.redis',
'cache_adapter' => \Mautic\CacheBundle\Cache\Adapter\RedisAdapter::class,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Confirms removed alias mautic.cache.adapter.redis pointed to Mautic\CacheBundle\Cache\Adapter\RedisAdapter (not RedisTagAwareAdapter, which was the separate mautic.cache.adapter.redis_tag_aware alias on line 38); alias removed in mautic/mautic PR #17134.

Source: https://github.com/mautic/mautic/blob/9300dce8fc9247ad861bd811142b7d81164699f9/app/bundles/CacheBundle/Config/services.php#L37

Comment thread docs/plugins/cache.rst
.. vale off

- ``mautic.cache.adapter.filesystem``
- ``\Mautic\CacheBundle\Cache\Adapter\FilesystemTagAwareAdapter``

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Confirms removed alias mautic.cache.adapter.filesystem pointed to Mautic\CacheBundle\Cache\Adapter\FilesystemTagAwareAdapter; alias removed in mautic/mautic PR #17134.

Source: https://github.com/mautic/mautic/blob/9300dce8fc9247ad861bd811142b7d81164699f9/app/bundles/CacheBundle/Config/services.php#L25

Comment thread docs/plugins/cache.rst
],

- ``mautic.cache.adapter.redis``
- ``\Mautic\CacheBundle\Cache\Adapter\RedisAdapter``

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Confirms removed alias mautic.cache.adapter.redis pointed to Mautic\CacheBundle\Cache\Adapter\RedisAdapter; alias removed in mautic/mautic PR #17134.

Source: https://github.com/mautic/mautic/blob/9300dce8fc9247ad861bd811142b7d81164699f9/app/bundles/CacheBundle/Config/services.php#L37

**The examples below use anonymous classes. Use Object Oriented Programming with services and factories to generate credential, configuration, and client classes.**

The best way to get configuration values such as username, password, consumer key, consumer secret, and so forth is by using the ``mautic.integrations.helper`` ``(\Mautic\IntegrationsBundle\Helper\IntegrationsHelper)`` service to leverage the configuration stored in the ``Integration`` entity's API keys.
The best way to get configuration values such as username, password, consumer key, consumer secret, and so forth is by using the ``\Mautic\IntegrationsBundle\Helper\IntegrationsHelper`` service to leverage the configuration stored in the ``Integration`` entity's API keys.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Confirms removed alias mautic.integrations.helper pointed to Mautic\IntegrationsBundle\Helper\IntegrationsHelper; alias removed in mautic/mautic PR #17134 (base 9300dce, head b4d6ae1).

Source: https://github.com/mautic/mautic/blob/9300dce8fc9247ad861bd811142b7d81164699f9/app/bundles/IntegrationsBundle/Config/services.php#L44

@promptless-for-oss

Copy link
Copy Markdown
Contributor Author

I noticed that some CI checks failed for this PR. I'm investigating whether the failures are caused by this suggestion. If they're unrelated or pre-existing, I'll leave this suggestion unchanged and create a separate suggestion if a standalone docs fix is needed.

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.

1 participant