Reference cache adapters and IntegrationsHelper by FQCN instead of removed string aliases - #629
Conversation
…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.
| .. code-block:: php | ||
|
|
||
| 'cache_adapter' => 'mautic.cache.adapter.filesystem', | ||
| 'cache_adapter' => \Mautic\CacheBundle\Cache\Adapter\FilesystemTagAwareAdapter::class, |
There was a problem hiding this comment.
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.
| .. code-block:: php | ||
|
|
||
| 'cache_adapter' => 'mautic.cache.adapter.redis', | ||
| 'cache_adapter' => \Mautic\CacheBundle\Cache\Adapter\RedisAdapter::class, |
There was a problem hiding this comment.
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.
| .. vale off | ||
|
|
||
| - ``mautic.cache.adapter.filesystem`` | ||
| - ``\Mautic\CacheBundle\Cache\Adapter\FilesystemTagAwareAdapter`` |
There was a problem hiding this comment.
Confirms removed alias mautic.cache.adapter.filesystem pointed to Mautic\CacheBundle\Cache\Adapter\FilesystemTagAwareAdapter; alias removed in mautic/mautic PR #17134.
| ], | ||
|
|
||
| - ``mautic.cache.adapter.redis`` | ||
| - ``\Mautic\CacheBundle\Cache\Adapter\RedisAdapter`` |
There was a problem hiding this comment.
Confirms removed alias mautic.cache.adapter.redis pointed to Mautic\CacheBundle\Cache\Adapter\RedisAdapter; alias removed in mautic/mautic PR #17134.
| **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. |
There was a problem hiding this comment.
Confirms removed alias mautic.integrations.helper pointed to Mautic\IntegrationsBundle\Helper\IntegrationsHelper; alias removed in mautic/mautic PR #17134 (base 9300dce, head b4d6ae1).
|
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. |
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— thecache_adapterconfig examples and the "Delivered adapters" list now use\Mautic\CacheBundle\Cache\Adapter\FilesystemTagAwareAdapterand\Mautic\CacheBundle\Cache\Adapter\RedisAdapterin place ofmautic.cache.adapter.filesystemandmautic.cache.adapter.redis.docs/plugin_integrations/integrations_authentication.rst— the sentence on reading stored integration configuration now names\Mautic\IntegrationsBundle\Helper\IntegrationsHelperdirectly instead of themautic.integrations.helperalias.The class-id services are already autowired, so these references also resolve on the current 7.x line.
Trigger Events