Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/plugin_extensions/emails.rst
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ The most important thing here is to create a service that's tagged as ``mautic.e
'class' => \MauticPlugin\HelloWorldBundle\Swiftmailer\Transport\HelloWorldApiTransport::class,
'serviceAlias' => 'swiftmailer.mailer.transport.%s',
'arguments' => [
'mautic.helper.core_parameters',
\Mautic\CoreBundle\Helper\CoreParametersHelper::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.

Mautic 8.x PR #17124 (merge commit dc0a515) dropped the mautic.helper.core_parameters alias from CoreBundle/Config/services.php (previously aliased at old line ~94) and switched the sole internal consumer to service(Mautic\CoreBundle\Helper\CoreParametersHelper::class). CoreParametersHelper.php is not in MauticCoreExtension::DEFAULT_EXCLUDES nor CoreBundle's local excludes, so it remains auto-registered/autowirable under its FQCN via the bundle's services->load() call. Confirms the doc's FQCN reference is the correct current way to reference this service.

Source: https://github.com/mautic/mautic/blob/dc0a5159d316dd5f0189be9aa6f158a5702ca2a0/app/bundles/CoreBundle/Config/services.php#L140

],
'tag' => 'mautic.email_transport',
'tagArguments' => [
Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/cache.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ From Symfony 3.4, the cache uses tag-aware adapters. If you want to clear all re
.. code-block:: php

/** @var CacheProvider $cache */
$cache = $this->get('mautic.cache.provider');
$cache = $this->get(\Mautic\CacheBundle\Cache\CacheProvider::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.

Mautic 8.x PR #17124 (merge commit dc0a515) dropped the mautic.cache.provider alias from CacheBundle/Config/services.php (previously at old line ~30, aliasing 'mautic.cache.provider' to Mautic\CacheBundle\Cache\CacheProvider::class). Mautic\CacheBundle\Cache\CacheProvider is still a registered service (see the surviving alias of CacheProviderInterface::class to CacheProvider::class on L36, and CacheProvider.php is not excluded from the bundle's services->load() autoregistration), confirming CacheProvider::class resolves as a valid service id. Note: the doc sample omits a use Mautic\CacheBundle\Cache\CacheProvider; import or leading backslash, unlike the other two FQCN replacements in this PR — flagged separately as a prose correction.

Source: https://github.com/mautic/mautic/blob/dc0a5159d316dd5f0189be9aa6f158a5702ca2a0/app/bundles/CacheBundle/Config/services.php#L36

/** @var CacheItemInterface $item */
$item = $cache->getItem('test_tagged_Item');
$item->set('yesa!!!');
Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ Services define the Plugin's classes and their dependencies with Mautic and Symf
'helloworld.mars.validator' => [
'class' => MauticPlugin\HelloWorldBundle\Form\Validator\Constraints\MarsValidator::class,
'arguments' => [
'mautic.helper.core_parameters',
\Mautic\CoreBundle\Helper\CoreParametersHelper::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.

Same evidence as emails.rst:574 — PR #17124 removed the mautic.helper.core_parameters string alias on 8.x; Mautic\CoreBundle\Helper\CoreParametersHelper remains registered/autowirable under its FQCN (see services.php load() call and DEFAULT_EXCLUDES), so \Mautic\CoreBundle\Helper\CoreParametersHelper::class is the correct current reference.

Source: https://github.com/mautic/mautic/blob/dc0a5159d316dd5f0189be9aa6f158a5702ca2a0/app/bundles/CoreBundle/Config/services.php#L140

'helloworld.helper.world',
],
'tag' => 'validator.constraint_validator',
Expand Down
Loading