Skip to content

Commit

Permalink
Merge pull request #176 from nick-vanpraet/fix/update-outdated-links
Browse files Browse the repository at this point in the history
Update outdated links
  • Loading branch information
RCheesley authored Feb 1, 2024
2 parents cf066c9 + b15cf25 commit 89275e7
Show file tree
Hide file tree
Showing 45 changed files with 104 additions and 130 deletions.
6 changes: 3 additions & 3 deletions docs/components/campaigns.rst
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ Campaign Action definition
* - ``formType``
- no
- string
- :xref:`Symfony form type class<Symfony 4 custom form field type tag>` for the Event's configuration.
- :xref:`Symfony form type class<Symfony custom form field type tag>` for the Event's configuration.
* - ``formTypeOptions``
- no
- array
Expand Down Expand Up @@ -235,7 +235,7 @@ Campaign Condition definition
* - ``formType``
- no
- string
- :xref:`Symfony form type class<Symfony 4 custom form field type tag>` for the Event's configuration.
- :xref:`Symfony form type class<Symfony custom form field type tag>` for the Event's configuration.
* - ``formTypeOptions``
- no
- array
Expand Down Expand Up @@ -344,7 +344,7 @@ Campaign Decision definition
* - ``formType``
- no
- string
- :xref:`Symfony form type class<Symfony 4 custom form field type tag>` for the Event's configuration.
- :xref:`Symfony form type class<Symfony custom form field type tag>` for the Event's configuration.
* - ``formTypeOptions``
- no
- array
Expand Down
14 changes: 7 additions & 7 deletions docs/components/forms_advanced.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Forms - advanced
################

Sometimes you might have more complex requirements for your Forms. You might already be aware that Mautic builds upon the Symfony framework, so there's lots of Form-related features available to you.
You can read more about this here: :xref:`Symfony 4 form classes`. This section highlights a few complex but common use cases:
You can read more about this here: :xref:`Symfony form classes`. This section highlights a few complex but common use cases:

- Custom Form Types that deviate from Symfony's wide array of standard Form types, like text fields, choice fields, etc.
- Data sanitizing
Expand All @@ -17,15 +17,15 @@ Custom Form types
.. vale on
As stated in Symfony's documentation as referenced in the preceding section, Form type classes are the best way to go.
Mautic makes it easy to register :xref:`Form type services<Symfony 4 custom Form field type>` through the bundle's config file.
Mautic makes it easy to register :xref:`Form type services<Symfony custom Form field type>` through the bundle's config file.
Refer to the :ref:`plugins/config:Service config items` section.

Data sanitizing
***************

Form data isn't automatically sanitized. Mautic provides a Form event subscriber to handle this.

In your :xref:`Form type class<Symfony 4 form classes>`, register the ``Mautic\CoreBundle\Form\EventListener\CleanFormSubscriber`` event subscriber.
In your :xref:`Form type class<Symfony form classes>`, register the ``Mautic\CoreBundle\Form\EventListener\CleanFormSubscriber`` event subscriber.

The array provided to ``CleanFormSubscriber`` should contain the names of the Form Fields as keys and the values the masks to use to sanitize the data. Any unspecified Form Field uses the ``clean`` mask by default.

Expand Down Expand Up @@ -66,12 +66,12 @@ Dynamic Form modification
If you need to manipulate a Form based on submitted data, use a Form event listener.
This is useful in cases like changing defined fields, adjust constraints, or changing select choices based on submitted values.
Refer to Symfony's documentation on this: :xref:`Symfony 4 dynamic form modification`
Refer to Symfony's documentation on this: :xref:`Symfony dynamic form modification`

Data validation
***************

Review Symfony's Form validation documentation for a general overview: :xref:`Symfony 4 form validation`
Review Symfony's Form validation documentation for a general overview: :xref:`Symfony form validation`

There are two common means of validating Form data.

Expand All @@ -81,7 +81,7 @@ Using entity static callback
If the underlying data of a Form is an Entity object you can define a static method ``loadValidatorMetadata`` in the Entity class.
This automatically gets called when Symfony is processing Form data.

A Form can also use :xref:`validation_groups<Symfony 4 Form validation groups>` to change the order of data to validate or only validate if certain criteria is true.
A Form can also use :xref:`validation_groups<Symfony 5 Form validation groups>` to change the order of data to validate or only validate if certain criteria is true.
For example, only validate a password confirmation field if the first password field passes validation.
When registering a validation group in the Form type class, you can use a static callback to determine what validation groups Symfony should use.

Expand Down Expand Up @@ -154,7 +154,7 @@ When registering a validation group in the Form type class, you can use a static
Using constraints
=================

A :xref:`Form type service<Symfony 4 custom Form field type>` can also register :xref:`Constraints<Symfony 4 Form constraints>` when defining the Form Fields.
A :xref:`Form type service<Symfony custom Form field type>` can also register :xref:`Constraints<Symfony Form constraints>` when defining the Form Fields.

.. code-block:: php
Expand Down
2 changes: 1 addition & 1 deletion docs/components/translator.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Translation domains organize translations into files. The following are defined
* - ``flashes``
- Default domain for translations for the ``\Mautic\CoreBundle\Service\FlashBag`` service.
* - ``validators``
- Default domain for constraint messages for validations in :xref:`Symfony form field types<Symfony 4 custom form field type tag>`.
- Default domain for constraint messages for validations in :xref:`Symfony form field types<Symfony custom form field type tag>`.

Translation strings
*******************
Expand Down
2 changes: 0 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,6 @@
# Please add links here that do not pass the "make checklinks" check.
# A little context on the reason for ignoring is greatly appreciated!
linkcheck_ignore = [
# Incorrectly reported as 'Anchor "webhooks" not found' so ignoring this
'https://docs.mautic.org/en/setup/cron-jobs#webhooks',
# github anchors cause failures, so do not check any github url with an anchor
r'^https://github.com/.*#.*'
]
Expand Down
4 changes: 2 additions & 2 deletions docs/development-environment/environments.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Environments
############

:xref:`Symfony 4 environment conventions`
:xref:`Symfony environment conventions`

In all environments, Mautic loads the following files if they exist,
the latter taking precedence over the former:
Expand All @@ -16,7 +16,7 @@ Real environment variables win over ``.env`` files.
.. warning:: Don't define secrets in this file, or any other committed files. Set secrets via environment variables, or through other secret management tools.

Run ``composer dump-env prod`` to compile .env files for production use (``requires symfony/flex >=1.2``). Read more about
:xref:`Symfony 4 best practices environment variables`.
:xref:`best practices<Symfony best practices environment variables>`.

By default the structure come with 3 environments
``.env``
Expand Down
2 changes: 1 addition & 1 deletion docs/links/action_based_di.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

link_name = "action_based_di"
link_text = "action-based dependency injection"
link_url = "https://symfony.com/doc/5.4/controller.html#controller-accessing-services"
link_url = "https://symfony.com/doc/5.x/controller.html#controller-accessing-services"

link.xref_links.update({link_name: (link_text, link_url)})
2 changes: 1 addition & 1 deletion docs/links/builder_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

link_name = "Builder documentation"
link_text = "Builder documentation"
link_url = "https://docs.mautic.org/en/builders"
link_url = "https://docs.mautic.org/en/5.x/builders/email_landing_page.html"

link.xref_links.update({link_name: (link_text, link_url)})
2 changes: 1 addition & 1 deletion docs/links/invokable_controllers.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

link_name = "invokable_controllers"
link_text = "invokable controllers"
link_url = "https://symfony.com/doc/5.4/controller/service.html#invokable-controllers"
link_url = "https://symfony.com/doc/5.x/controller/service.html#invokable-controllers"

link.xref_links.update({link_name: (link_text, link_url)})
2 changes: 1 addition & 1 deletion docs/links/manually_wiring_arguments.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

link_name = "manually_wiring_arguments"
link_text = "Symfony docs"
link_url = "https://symfony.com/doc/5.4/service_container.html#manually-wiring-arguments"
link_url = "https://symfony.com/doc/5.x/service_container.html#manually-wiring-arguments"

link.xref_links.update({link_name: (link_text, link_url)})
2 changes: 1 addition & 1 deletion docs/links/mautic_docs_mtc_js.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

link_name = "Mautic tracking script docs"
link_text = "Mautic tracking script docs"
link_url = "https://docs.mautic.org/en/setup/install-mautic-tracking-script"
link_url = "https://docs.mautic.org/en/5.x/configuration/cron_jobs.html#tracking-script"

link.xref_links.update({link_name: (link_text, link_url)})
2 changes: 1 addition & 1 deletion docs/links/mautic_end_user_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

link_name = "Mautic End User Docs"
link_text = "end-user documentation"
link_url = "https://docs.mautic.org"
link_url = "https://docs.mautic.org/en/5.x/index.html"

link.xref_links.update({link_name: (link_text, link_url)})
7 changes: 7 additions & 0 deletions docs/links/mautic_upgrade_guide.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from . import link

link_name = "UPGRADE_GUIDE"
link_text = "UPGRADE-5.0.md guide"
link_url = "https://github.com/mautic/mautic/blob/5.x/UPGRADE-5.0.md"

link.xref_links.update({link_name: (link_text, link_url)})
2 changes: 1 addition & 1 deletion docs/links/symfony_autoconfigure.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

link_name = "symfony-autoconfigure"
link_text = "autoconfigure"
link_url = "https://symfony.com/doc/5.4/service_container.html#the-autoconfigure-option"
link_url = "https://symfony.com/doc/5.x/service_container.html#the-autoconfigure-option"

link.xref_links.update({link_name: (link_text, link_url)})
2 changes: 1 addition & 1 deletion docs/links/symfony_autowiring.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

link_name = "symfony-autowiring"
link_text = "autowiring"
link_url = "https://symfony.com/doc/5.4/service_container/autowiring.html"
link_url = "https://symfony.com/doc/5.x/service_container/autowiring.html"

link.xref_links.update({link_name: (link_text, link_url)})
2 changes: 1 addition & 1 deletion docs/links/symfony_best_practices.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

link_name = "Symfony best practices"
link_text = "Symfony best practices"
link_url = "https://symfony.com/doc/current/best_practices.html"
link_url = "https://symfony.com/doc/5.x/best_practices.html"

link.xref_links.update({link_name: (link_text, link_url)})
2 changes: 1 addition & 1 deletion docs/links/symfony_coding_standards.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

link_name = "Symfony coding standards"
link_text = "Symfony coding standards"
link_url = "https://symfony.com/doc/current/contributing/code/standards.html"
link_url = "https://symfony.com/doc/5.x/contributing/code/standards.html"

link.xref_links.update({link_name: (link_text, link_url)})
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from . import link

link_name = "Symfony 5 documentation"
link_name = "Symfony documentation"
link_text = "Symfony 5 documentation"
link_url = "https://symfony.com/doc/5.x/index.html"

Expand Down
7 changes: 0 additions & 7 deletions docs/links/symfony_docs_4.py

This file was deleted.

6 changes: 3 additions & 3 deletions docs/links/symfony_docs_best_pratice_environments.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from . import link

link_name = "Symfony 4 best practices environment variables"
link_text = "best practices"
link_url = "https://symfony.com/doc/current/best_practices.html#use-environment-variables-for-infrastructure-configuration"
link_name = "Symfony best practices environment variables"
link_text = "Symfony 5 best practices for environment variables"
link_url = "https://symfony.com/doc/5.x/best_practices.html#use-environment-variables-for-infrastructure-configuration"

link.xref_links.update({link_name: (link_text, link_url)})
6 changes: 3 additions & 3 deletions docs/links/symfony_docs_configuration_environments.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from . import link

link_name = "Symfony 4 environment conventions"
link_text = "Mautic follows the Symfony 4.4 environment conventions:"
link_url = "https://symfony.com/doc/4.4/index.html"
link_name = "Symfony environment conventions"
link_text = "Mautic follows the Symfony 5.5 environment conventions:"
link_url = "https://symfony.com/doc/5.x/index.html"

link.xref_links.update({link_name: (link_text, link_url)})
6 changes: 3 additions & 3 deletions docs/links/symfony_docs_constraints.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from . import link

link_name = "Symfony 4 Form constraints"
link_text = "Symfony 4 Form constraints"
link_url = "https://symfony.com/doc/4.4/reference/constraints.html"
link_name = "Symfony Form constraints"
link_text = "Symfony 5 Form constraints"
link_url = "https://symfony.com/doc/5.x/reference/constraints.html"

link.xref_links.update({link_name: (link_text, link_url)})
7 changes: 0 additions & 7 deletions docs/links/symfony_docs_custom_form_fields.py

This file was deleted.

6 changes: 3 additions & 3 deletions docs/links/symfony_docs_custom_form_fields_type.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from . import link

link_name = "Symfony 4 custom Form field type"
link_text = "Symfony 4 custom Form field type"
link_url = "https://symfony.com/doc/4.4/form/create_custom_field_type.html#defining-the-form-type"
link_name = "Symfony custom Form field type"
link_text = "Symfony 5 custom Form field type"
link_url = "https://symfony.com/doc/5.x/form/create_custom_field_type.html#defining-the-form-type"

link.xref_links.update({link_name: (link_text, link_url)})
6 changes: 3 additions & 3 deletions docs/links/symfony_docs_dynamic_form_modification.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from . import link

link_name = "Symfony 4 dynamic form modification"
link_text = "Symfony 4 dynamic form modification"
link_url = "https://symfony.com/doc/4.4/form/dynamic_form_modification.html"
link_name = "Symfony dynamic form modification"
link_text = "Symfony 5 dynamic form modification"
link_url = "https://symfony.com/doc/5.x/form/dynamic_form_modification.html"

link.xref_links.update({link_name: (link_text, link_url)})
6 changes: 3 additions & 3 deletions docs/links/symfony_docs_form_classes.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from . import link

link_name = "Symfony 4 form classes"
link_text = "Symfony 4 form classes"
link_url = "https://symfony.com/doc/4.4/forms.html#creating-form-classes"
link_name = "Symfony form classes"
link_text = "Symfony 5 form classes"
link_url = "https://symfony.com/doc/5.x/forms.html#creating-form-classes"

link.xref_links.update({link_name: (link_text, link_url)})
6 changes: 3 additions & 3 deletions docs/links/symfony_docs_form_validation.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from . import link

link_name = "Symfony 4 form validation"
link_text = "Symfony 4 form validation"
link_url = "https://symfony.com/doc/4.4/forms.html#validating-forms"
link_name = "Symfony form validation"
link_text = "Symfony 5 form validation"
link_url = "https://symfony.com/doc/5.x/forms.html#validating-forms"

link.xref_links.update({link_name: (link_text, link_url)})
6 changes: 3 additions & 3 deletions docs/links/symfony_docs_form_validation_groups.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from . import link

link_name = "Symfony 4 Form validation groups"
link_text = "Symfony 4 Form validation groups"
link_url = "https://symfony.com/doc/4.4/form/validation_groups.html"
link_name = "Symfony 5 Form validation groups"
link_text = "Symfony 5 Form validation groups"
link_url = "https://symfony.com/doc/5.x/form/validation_groups.html"

link.xref_links.update({link_name: (link_text, link_url)})
6 changes: 3 additions & 3 deletions docs/links/symfony_docs_service_configurators.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from . import link

link_name = "Symfony 4 service configurators"
link_text = "Symfony 4 service configurators"
link_url = "https://symfony.com/doc/4.4/service_container/configurators.html"
link_name = "Symfony service configurators"
link_text = "Symfony 5 service configurators"
link_url = "https://symfony.com/doc/5.x/service_container/configurators.html"

link.xref_links.update({link_name: (link_text, link_url)})
6 changes: 3 additions & 3 deletions docs/links/symfony_docs_service_decoration.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from . import link

link_name = "Symfony 4 service decoration"
link_text = "Symfony 4 service decoration"
link_url = "https://symfony.com/doc/4.4/service_container/service_decoration.html"
link_name = "Symfony service decoration"
link_text = "Symfony 5 service decoration"
link_url = "https://symfony.com/doc/5.x/service_container/service_decoration.html"

link.xref_links.update({link_name: (link_text, link_url)})
6 changes: 3 additions & 3 deletions docs/links/symfony_docs_service_factories.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from . import link

link_name = "Symfony 4 factories"
link_text = "Symfony 4 factories"
link_url = "https://symfony.com/doc/4.4/service_container/factories.html"
link_name = "Symfony factories"
link_text = "Symfony 5 factories"
link_url = "https://symfony.com/doc/5.x/service_container/factories.html"

link.xref_links.update({link_name: (link_text, link_url)})
6 changes: 3 additions & 3 deletions docs/links/symfony_docs_service_sythetic_services.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from . import link

link_name = "Symfony 4 synthetic services"
link_text = "Symfony 4 synthetic services"
link_url = "https://symfony.com/doc/4.4/service_container/synthetic_services.html"
link_name = "Symfony synthetic services"
link_text = "Symfony 5 synthetic services"
link_url = "https://symfony.com/doc/5.x/service_container/synthetic_services.html"

link.xref_links.update({link_name: (link_text, link_url)})
6 changes: 3 additions & 3 deletions docs/links/symfony_docs_service_tags.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from . import link

link_name = "Symfony 4 service tags"
link_text = "Symfony 4 service tags"
link_url = "https://symfony.com/index.php/doc/4.4/service_container/tags.html"
link_name = "Symfony service tags"
link_text = "Symfony 5 service tags"
link_url = "https://symfony.com/doc/5.x/service_container/tags.html"

link.xref_links.update({link_name: (link_text, link_url)})
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from . import link

link_name = "Symfony 4 requiring a file before loading a service"
link_text = "Symfony 4 requiring a file before loading a service"
link_url = "https://symfony.com/doc/4.4/service_container/definitions.html#requiring-files"
link_name = "Symfony requiring a file before loading a service"
link_text = "Symfony 5 requiring a file before loading a service"
link_url = "https://symfony.com/doc/5.x/service_container/definitions.html#requiring-files"

link.xref_links.update({link_name: (link_text, link_url)})
6 changes: 3 additions & 3 deletions docs/links/symfony_tag_console_command.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from . import link

link_name = "Symfony 4 console command tag"
link_text = "Symfony 4 console command tag"
link_url = "https://symfony.com/doc/4.4/reference/dic_tags.html#console-command"
link_name = "Symfony console command tag"
link_text = "Symfony 5 console command tag"
link_url = "https://symfony.com/doc/5.x/reference/dic_tags.html#console-command"

link.xref_links.update({link_name: (link_text, link_url)})
Loading

0 comments on commit 89275e7

Please sign in to comment.