From 2a9103c1f1c5a6e22a706f6b008939cfef9a2c71 Mon Sep 17 00:00:00 2001 From: Nyholm Date: Tue, 20 Apr 2021 18:21:48 +0200 Subject: [PATCH] Fixed syntax errors on 4.4 --- components/console/helpers/formatterhelper.rst | 8 ++++++-- components/console/helpers/table.rst | 4 ++-- components/dom_crawler.rst | 4 +++- components/event_dispatcher.rst | 2 +- components/filesystem.rst | 2 +- components/http_foundation.rst | 2 +- components/intl.rst | 10 +++++----- components/lock.rst | 4 ++-- components/options_resolver.rst | 2 +- components/phpunit_bridge.rst | 4 ++-- components/security/authorization.rst | 2 +- components/serializer.rst | 4 +++- components/validator/resources.rst | 2 +- components/workflow.rst | 4 ++-- configuration/override_dir_structure.rst | 2 +- configuration/using_parameters_in_dic.rst | 4 ++-- contributing/code/conventions.rst | 8 ++++++-- controller/soap_web_service.rst | 2 +- create_framework/front_controller.rst | 4 +++- create_framework/routing.rst | 8 ++++++-- doctrine/custom_dql_functions.rst | 18 ++++++++---------- form/create_form_type_extension.rst | 4 ---- form/data_transformers.rst | 2 +- form/type_guesser.rst | 2 +- form/validation_group_service_resolver.rst | 2 +- forms.rst | 2 +- http_client.rst | 2 +- introduction/from_flat_php_to_symfony.rst | 2 +- mercure.rst | 7 ++++--- migration.rst | 4 ++-- reference/configuration/framework.rst | 8 ++++++-- reference/constraints/Traverse.rst | 2 +- service_container.rst | 18 +++++++++++------- setup/homestead.rst | 4 +++- templating/PHP.rst | 12 +++++++++--- templating/hinclude.rst | 2 +- testing.rst | 2 +- translation.rst | 4 +++- 38 files changed, 105 insertions(+), 74 deletions(-) diff --git a/components/console/helpers/formatterhelper.rst b/components/console/helpers/formatterhelper.rst index ba3c2743d24..ad2bded040b 100644 --- a/components/console/helpers/formatterhelper.rst +++ b/components/console/helpers/formatterhelper.rst @@ -78,7 +78,9 @@ you can write:: $truncatedMessage = $formatter->truncate($message, 7); $output->writeln($truncatedMessage); -And the output will be:: +And the output will be: + +.. code-block:: text This is... @@ -93,7 +95,9 @@ from the end of the string:: $truncatedMessage = $formatter->truncate($message, -5); -This will result in:: +This will result in: + +.. code-block:: text This is a very long message, which should be trun... diff --git a/components/console/helpers/table.rst b/components/console/helpers/table.rst index 45336c1175e..b59abe1d73a 100644 --- a/components/console/helpers/table.rst +++ b/components/console/helpers/table.rst @@ -72,8 +72,8 @@ You can add a table separator anywhere in the output by passing an instance of You can optionally display titles at the top and the bottom of the table:: // ... - $table->setHeaderTitle('Books') - $table->setFooterTitle('Page 1/2') + $table->setHeaderTitle('Books'); + $table->setFooterTitle('Page 1/2'); $table->render(); .. code-block:: terminal diff --git a/components/dom_crawler.rst b/components/dom_crawler.rst index 93aba242eaf..fd35b5e7fd8 100644 --- a/components/dom_crawler.rst +++ b/components/dom_crawler.rst @@ -555,7 +555,9 @@ You can virtually set and get values on the form:: // where "registration" is its own array $values = $form->getPhpValues(); -To work with multi-dimensional fields:: +To work with multi-dimensional fields: + +.. code-block:: html
diff --git a/components/event_dispatcher.rst b/components/event_dispatcher.rst index ef0392e6dfc..0331c3320be 100644 --- a/components/event_dispatcher.rst +++ b/components/event_dispatcher.rst @@ -238,7 +238,7 @@ determine which instance is passed. $containerBuilder->addCompilerPass(new AddEventAliasesPass([ \AcmeFooActionEvent::class => 'acme.foo.action', ])); - $containerBuilder->addCompilerPass(new RegisterListenersPass(), PassConfig::TYPE_BEFORE_REMOVING) + $containerBuilder->addCompilerPass(new RegisterListenersPass(), PassConfig::TYPE_BEFORE_REMOVING); $containerBuilder->register('event_dispatcher', EventDispatcher::class); diff --git a/components/filesystem.rst b/components/filesystem.rst index 4b09bc4cd7e..d43632b9de6 100644 --- a/components/filesystem.rst +++ b/components/filesystem.rst @@ -252,7 +252,7 @@ absolute paths and returns the relative path from the second path to the first o '/var/lib/symfony/src/Symfony/Component' ); // returns 'videos/' - $filesystem->makePathRelative('/tmp/videos', '/tmp') + $filesystem->makePathRelative('/tmp/videos', '/tmp'); ``mirror`` ~~~~~~~~~~ diff --git a/components/http_foundation.rst b/components/http_foundation.rst index cbb1742dad1..4ebce4526f0 100644 --- a/components/http_foundation.rst +++ b/components/http_foundation.rst @@ -547,7 +547,7 @@ represented by a PHP callable instead of a string:: header in the response:: // disables FastCGI buffering in nginx only for this response - $response->headers->set('X-Accel-Buffering', 'no') + $response->headers->set('X-Accel-Buffering', 'no'); .. _component-http-foundation-serving-files: diff --git a/components/intl.rst b/components/intl.rst index dae70440cf5..d66370218c9 100644 --- a/components/intl.rst +++ b/components/intl.rst @@ -11,7 +11,7 @@ The Intl Component .. caution:: The replacement layer is limited to the ``en`` locale. If you want to use - other locales, you should `install the intl extension`_. There is no conflict + other locales, you should `install the intl extension`_. There is no conflict between the two because, even if you use the extension, this package can still be useful to access the ICU data. @@ -231,9 +231,9 @@ Locales ~~~~~~~ A locale is the combination of a language, a region and some parameters that -define the interface preferences of the user. For example, "Chinese" is the -language and ``zh_Hans_MO`` is the locale for "Chinese" (language) + "Simplified" -(script) + "Macau SAR China" (region). The ``Locales`` class provides access to +define the interface preferences of the user. For example, "Chinese" is the +language and ``zh_Hans_MO`` is the locale for "Chinese" (language) + "Simplified" +(script) + "Macau SAR China" (region). The ``Locales`` class provides access to the name of all locales:: use Symfony\Component\Intl\Locales; @@ -351,7 +351,7 @@ translate into any locale with the ``getName()`` method shown earlier:: The reverse lookup is also possible thanks to the ``getCountryCode()`` method, which returns the code of the country where the given timezone ID belongs to:: - $countryCode = Timezones::getCountryCode('America/Vancouver') + $countryCode = Timezones::getCountryCode('America/Vancouver'); // => $countryCode = 'CA' (CA = Canada) The `UTC/GMT time offsets`_ of all timezones are provided by ``getRawOffset()`` diff --git a/components/lock.rst b/components/lock.rst index e0baecd9560..25ad931a4e4 100644 --- a/components/lock.rst +++ b/components/lock.rst @@ -63,7 +63,7 @@ method can be safely called repeatedly, even if the lock is already acquired. Unlike other implementations, the Lock Component distinguishes lock instances even when they are created for the same resource. It means that for - a given scope and resource one lock instance can be acquired multiple times. + a given scope and resource one lock instance can be acquired multiple times. If a lock has to be used by several services, they should share the same ``Lock`` instance returned by the ``LockFactory::createLock`` method. @@ -223,7 +223,7 @@ Lock will be released automatically as soon as one process finishes:: sleep(30); } else { // Child process - echo 'The lock will be released now.' + echo 'The lock will be released now.'; exit(0); } // ... diff --git a/components/options_resolver.rst b/components/options_resolver.rst index a88c9f95d31..7fda38acc07 100644 --- a/components/options_resolver.rst +++ b/components/options_resolver.rst @@ -511,7 +511,7 @@ the closure:: $resolver->setDefault('host', function (Options $options, $previousValue) { if ('ssl' === $options['encryption']) { - return 'secure.example.org' + return 'secure.example.org'; } // Take default value configured in the base class diff --git a/components/phpunit_bridge.rst b/components/phpunit_bridge.rst index 284dae4d816..e9b98f7501d 100644 --- a/components/phpunit_bridge.rst +++ b/components/phpunit_bridge.rst @@ -629,7 +629,7 @@ constraint to test the validity of the email domain:: { public function testEmail() { - $validator = ... + $validator = ...; $constraint = new Email(['checkMX' => true]); $result = $validator->validate('foo@example.com', $constraint); @@ -654,7 +654,7 @@ the data you expect to get for the given hosts:: { DnsMock::withMockedHosts(['example.com' => [['type' => 'MX']]]); - $validator = ... + $validator = ...; $constraint = new Email(['checkMX' => true]); $result = $validator->validate('foo@example.com', $constraint); diff --git a/components/security/authorization.rst b/components/security/authorization.rst index f6a8776aa7b..d1df7d1f8bb 100644 --- a/components/security/authorization.rst +++ b/components/security/authorization.rst @@ -188,7 +188,7 @@ expressions have access to a number of $expression = new Expression( '"ROLE_ADMIN" in roles or (not is_anonymous() and user.isSuperAdmin())' - ) + ); $vote = $expressionVoter->vote($token, $object, [$expression]); diff --git a/components/serializer.rst b/components/serializer.rst index 783f293e83d..bae2c262213 100644 --- a/components/serializer.rst +++ b/components/serializer.rst @@ -901,7 +901,9 @@ For example, take an object normalized as following:: ['foo' => [1, 2], 'bar' => true]; -The ``XmlEncoder`` will encode this object like that:: +The ``XmlEncoder`` will encode this object like that: + +.. code-block:: xml diff --git a/components/validator/resources.rst b/components/validator/resources.rst index 1455c2518bc..4de84a7cb49 100644 --- a/components/validator/resources.rst +++ b/components/validator/resources.rst @@ -155,7 +155,7 @@ implement the PSR-6 interface :class:`Psr\\Cache\\CacheItemPoolInterface`):: $validator = Validation::createValidatorBuilder() // ... add loaders - ->setMappingCache(new SomePsr6Cache()); + ->setMappingCache(new SomePsr6Cache()) ->getValidator(); .. versionadded:: 4.4 diff --git a/components/workflow.rst b/components/workflow.rst index 493b4230124..67b00730b69 100644 --- a/components/workflow.rst +++ b/components/workflow.rst @@ -68,8 +68,8 @@ are trying to use it with:: use Symfony\Component\Workflow\Registry; use Symfony\Component\Workflow\SupportStrategy\InstanceOfSupportStrategy; - $blogPostWorkflow = ... - $newsletterWorkflow = ... + $blogPostWorkflow = ...; + $newsletterWorkflow = ...; $registry = new Registry(); $registry->addWorkflow($blogPostWorkflow, new InstanceOfSupportStrategy(BlogPost::class)); diff --git a/configuration/override_dir_structure.rst b/configuration/override_dir_structure.rst index e832daeb030..050b5d58653 100644 --- a/configuration/override_dir_structure.rst +++ b/configuration/override_dir_structure.rst @@ -230,7 +230,7 @@ option in your ``composer.json`` file like this: "config": { "bin-dir": "bin", "vendor-dir": "/some/dir/vendor" - }, + } } .. tip:: diff --git a/configuration/using_parameters_in_dic.rst b/configuration/using_parameters_in_dic.rst index 329061a137f..6bdf07ff886 100644 --- a/configuration/using_parameters_in_dic.rst +++ b/configuration/using_parameters_in_dic.rst @@ -85,8 +85,8 @@ Now, examine the results to see this closely: // true/false (depends on 2nd parameter of Kernel), // as expected, because %kernel.debug% inside configuration // gets evaluated before being passed to the extension - ) - ]; + ] + ); $container->loadFromExtension('my_bundle'); // passes the string "%kernel.debug%". diff --git a/contributing/code/conventions.rst b/contributing/code/conventions.rst index 62bf4217044..e09fc3fbabb 100644 --- a/contributing/code/conventions.rst +++ b/contributing/code/conventions.rst @@ -188,7 +188,9 @@ after the use declarations, like in this example from .. _`ServiceRouterLoader`: https://github.com/symfony/symfony/blob/4.4/src/Symfony/Component/Routing/Loader/DependencyInjection/ServiceRouterLoader.php -The deprecation must be added to the ``CHANGELOG.md`` file of the impacted component:: +The deprecation must be added to the ``CHANGELOG.md`` file of the impacted component: + +.. code-block:: markdown 4.4 --- @@ -196,7 +198,9 @@ The deprecation must be added to the ``CHANGELOG.md`` file of the impacted compo * Deprecate the `Deprecated` class, use `Replacement` instead It must also be added to the ``UPGRADE.md`` file of the targeted minor version -(``UPGRADE-4.4.md`` in our example):: +(``UPGRADE-4.4.md`` in our example): + +.. code-block:: markdown DependencyInjection ------------------- diff --git a/controller/soap_web_service.rst b/controller/soap_web_service.rst index 37c72316878..12d01cd0ec1 100644 --- a/controller/soap_web_service.rst +++ b/controller/soap_web_service.rst @@ -39,7 +39,7 @@ In this case, the SOAP service will allow the client to call a method called public function hello($name) { - $message = new \Swift_Message('Hello Service') + $message = (new \Swift_Message('Hello Service')) ->setTo('me@example.com') ->setBody($name.' says hi!'); diff --git a/create_framework/front_controller.rst b/create_framework/front_controller.rst index e6a7293fa6b..e14f9f16d07 100644 --- a/create_framework/front_controller.rst +++ b/create_framework/front_controller.rst @@ -185,7 +185,9 @@ the ``setContent()`` directly from the front controller script:: // ... -And the ``hello.php`` script can now be converted to a template:: +And the ``hello.php`` script can now be converted to a template: + +.. code-block:: html+php get('name', 'World') ?> diff --git a/create_framework/routing.rst b/create_framework/routing.rst index d381daed2eb..f76167ec2fb 100644 --- a/create_framework/routing.rst +++ b/create_framework/routing.rst @@ -30,7 +30,9 @@ framework just a little to make templates even more readable:: $response->send(); As we now extract the request query parameters, simplify the ``hello.php`` -template as follows:: +template as follows: + +.. code-block:: html+php Hello @@ -161,7 +163,9 @@ There are a few new things in the code: * ``500`` errors are now managed correctly; -* Request attributes are extracted to keep our templates simple:: +* Request attributes are extracted to keep our templates simple: + +.. code-block:: html+php // example.com/src/pages/hello.php Hello diff --git a/doctrine/custom_dql_functions.rst b/doctrine/custom_dql_functions.rst index 9485509da49..ee11967da47 100644 --- a/doctrine/custom_dql_functions.rst +++ b/doctrine/custom_dql_functions.rst @@ -131,16 +131,14 @@ In Symfony, you can register your custom DQL functions as follows: use App\DQL\DatetimeFunction; $container->loadFromExtension('doctrine', [ - 'doctrine' => [ - 'orm' => [ - // ... - 'entity_managers' => [ - 'example_manager' => [ - // place your functions here - 'dql' => [ - 'datetime_functions' => [ - 'test_datetime' => DatetimeFunction::class, - ], + 'orm' => [ + // ... + 'entity_managers' => [ + 'example_manager' => [ + // place your functions here + 'dql' => [ + 'datetime_functions' => [ + 'test_datetime' => DatetimeFunction::class, ], ], ], diff --git a/form/create_form_type_extension.rst b/form/create_form_type_extension.rst index 55d3d34776f..37e46dc9a64 100644 --- a/form/create_form_type_extension.rst +++ b/form/create_form_type_extension.rst @@ -191,14 +191,10 @@ Specifically, you need to override the ``file_widget`` block: {% extends 'form_div_layout.html.twig' %} {% block file_widget %} - {% spaceless %} - {{ block('form_widget') }} {% if image_url is not null %} {% endif %} - - {% endspaceless %} {% endblock %} Be sure to :ref:`configure this form theme template ` so that diff --git a/form/data_transformers.rst b/form/data_transformers.rst index aa0e88789bf..c21976dadce 100644 --- a/form/data_transformers.rst +++ b/form/data_transformers.rst @@ -208,7 +208,7 @@ to and from the issue number and the ``Issue`` object:: { // no issue number? It's optional, so that's ok if (!$issueNumber) { - return; + return null; } $issue = $this->entityManager diff --git a/form/type_guesser.rst b/form/type_guesser.rst index 49488e524ba..b2b556e51f9 100644 --- a/form/type_guesser.rst +++ b/form/type_guesser.rst @@ -101,7 +101,7 @@ With this knowledge, you can implement the ``guessType()`` method of the $annotations = $this->readPhpDocAnnotations($class, $property); if (!isset($annotations['var'])) { - return; // guess nothing if the @var annotation is not available + return null; // guess nothing if the @var annotation is not available } // otherwise, base the type on the @var annotation diff --git a/form/validation_group_service_resolver.rst b/form/validation_group_service_resolver.rst index ad741fbdb3a..e9ad7a67724 100644 --- a/form/validation_group_service_resolver.rst +++ b/form/validation_group_service_resolver.rst @@ -39,7 +39,7 @@ Then in your form, inject the resolver and set it as the ``validation_groups``:: namespace App\Form; use App\Validator\ValidationGroupResolver; - use Symfony\Component\Form\AbstractType + use Symfony\Component\Form\AbstractType; use Symfony\Component\OptionsResolver\OptionsResolver; class MyClassType extends AbstractType diff --git a/forms.rst b/forms.rst index 289e1a194b0..9b88f598fa1 100644 --- a/forms.rst +++ b/forms.rst @@ -592,7 +592,7 @@ argument of ``createForm()``:: { $task = new Task(); // use some PHP logic to decide if this form field is required or not - $dueDateIsRequired = ... + $dueDateIsRequired = ...; $form = $this->createForm(TaskType::class, $task, [ 'require_due_date' => $dueDateIsRequired, diff --git a/http_client.rst b/http_client.rst index da1595dbac7..81f33d8308d 100644 --- a/http_client.rst +++ b/http_client.rst @@ -885,7 +885,7 @@ To abort a request (e.g. because it didn't complete in due time, or you want to fetch only the first bytes of the response, etc.), you can either use the ``cancel()`` method of ``ResponseInterface``:: - $response->cancel() + $response->cancel(); Or throw an exception from a progress callback:: diff --git a/introduction/from_flat_php_to_symfony.rst b/introduction/from_flat_php_to_symfony.rst index bbfd252de7c..d6d631d6857 100644 --- a/introduction/from_flat_php_to_symfony.rst +++ b/introduction/from_flat_php_to_symfony.rst @@ -580,7 +580,7 @@ and uses Twig: .. code-block:: html+twig - + {# templates/blog/list.html.twig #} {% extends 'base.html.twig' %} {% block title %}List of Posts{% endblock %} diff --git a/mercure.rst b/mercure.rst index 82279c3be63..85c814b5741 100644 --- a/mercure.rst +++ b/mercure.rst @@ -622,7 +622,7 @@ You can instead make use of the `MockHub`:: $controller = new MessageController($hub); - ... + // ... } } @@ -645,13 +645,14 @@ During functional testing you can instead decorate the Hub:: } HubStub decorates the default hub service so no updates are actually -sent. Here is the HubStub implementation:: +sent. Here is the HubStub implementation: + +.. code-block:: yaml # config/services_test.yaml App\Tests\Functional\Fixtures\HubStub: decorates: mercure.hub.default - Debugging --------- diff --git a/migration.rst b/migration.rst index 8c6117de25c..5f4089656dd 100644 --- a/migration.rst +++ b/migration.rst @@ -313,11 +313,11 @@ somewhat like this:: class LegacyBridge { - public static function prepareLegacyScript(Request $request, Response $response, string $publicDirectory): string + public static function prepareLegacyScript(Request $request, Response $response, string $publicDirectory): ?string { // If Symfony successfully handled the route, you do not have to do anything. if (false === $response->isNotFound()) { - return; + return null; } // Figure out how to map to the needed script file diff --git a/reference/configuration/framework.rst b/reference/configuration/framework.rst index a55b9816a6e..21fc64bd212 100644 --- a/reference/configuration/framework.rst +++ b/reference/configuration/framework.rst @@ -415,7 +415,9 @@ Since every developer uses a different IDE, the recommended way to enable this feature is to configure it on a system level. This can be done by setting the ``xdebug.file_link_format`` option in your ``php.ini`` configuration file. The format to use is the same as for the ``framework.ide`` option, but without the -need to escape the percent signs (``%``) by doubling them:: +need to escape the percent signs (``%``) by doubling them: + +.. code-block:: ini // example for PhpStorm xdebug.file_link_format="phpstorm://open?file=%f&line=%l" @@ -438,7 +440,9 @@ need to escape the percent signs (``%``) by doubling them:: When running your app in a container or in a virtual machine, you can tell Symfony to map files from the guest to the host by changing their prefix. This map should be specified at the end of the URL template, using ``&`` and - ``>`` as guest-to-host separators:: + ``>`` as guest-to-host separators: + + .. code-block:: text // /path/to/guest/.../file will be opened // as /path/to/host/.../file on the host diff --git a/reference/constraints/Traverse.rst b/reference/constraints/Traverse.rst index aea7e051ee1..99449d12999 100644 --- a/reference/constraints/Traverse.rst +++ b/reference/constraints/Traverse.rst @@ -27,7 +27,7 @@ that all have constraints on their properties. namespace App\Entity; use Doctrine\Collections\ArrayCollection; - use Doctrine\Collections\Collection + use Doctrine\Collections\Collection; use Doctrine\ORM\Mapping as ORM; use Symfony\Component\Validator\Constraints as Assert; diff --git a/service_container.rst b/service_container.rst index 21aa508b897..e40c07a3587 100644 --- a/service_container.rst +++ b/service_container.rst @@ -341,18 +341,21 @@ you can type-hint the new ``SiteUpdateManager`` class and use it:: // src/Controller/SiteController.php namespace App\Controller; - // ... use App\Service\SiteUpdateManager; + // ... - public function new(SiteUpdateManager $siteUpdateManager) + class SiteController extends AbstractController { - // ... + public function new(SiteUpdateManager $siteUpdateManager) + { + // ... - if ($siteUpdateManager->notifyOfSiteUpdate()) { - $this->addFlash('success', 'Notification mail was sent successfully.'); - } + if ($siteUpdateManager->notifyOfSiteUpdate()) { + $this->addFlash('success', 'Notification mail was sent successfully.'); + } - // ... + // ... + } } Thanks to autowiring and your type-hints in ``__construct()``, the container creates @@ -867,6 +870,7 @@ This is mostly useful when you want to fetch services lazily:: // ... } + } As a best practice, you should only create *private* services. This allows for safe container optimizations, e.g. removing unused services. You should not use diff --git a/setup/homestead.rst b/setup/homestead.rst index d9526949b55..7143b5adeae 100644 --- a/setup/homestead.rst +++ b/setup/homestead.rst @@ -58,7 +58,9 @@ Homestead now supports a Symfony 2 and 3 web layout with ``app.php`` and using type ``symfony4``. At last, edit the hosts file on your local machine to map ``symfony-demo.test`` -to ``192.168.10.10`` (which is the IP used by Homestead):: +to ``192.168.10.10`` (which is the IP used by Homestead): + +.. code-block:: text # /etc/hosts (unix) or C:\Windows\System32\drivers\etc\hosts (Windows) 192.168.10.10 symfony-demo.test diff --git a/templating/PHP.rst b/templating/PHP.rst index cafd622dd8d..471979811f0 100644 --- a/templating/PHP.rst +++ b/templating/PHP.rst @@ -332,7 +332,9 @@ Profiling Templates ~~~~~~~~~~~~~~~~~~~ By using the ``stopwatch`` helper, you are able to time parts of your template -and display it on the timeline of the WebProfilerBundle:: +and display it on the timeline of the WebProfilerBundle: + +.. code-block:: html+php start('foo') ?> ... things that get timed @@ -347,13 +349,17 @@ Output Escaping --------------- When using PHP templates, escape variables whenever they are displayed to the -user:: +user: + +.. code-block:: html+php escape($var) ?> By default, the ``escape()`` method assumes that the variable is outputted within an HTML context. The second argument lets you change the context. For -instance, to output something in a JavaScript script, use the ``js`` context:: +instance, to output something in a JavaScript script, use the ``js`` context: + +.. code-block:: html+php escape($var, 'js') ?> diff --git a/templating/hinclude.rst b/templating/hinclude.rst index d832cdbdba2..96b52c0d147 100644 --- a/templating/hinclude.rst +++ b/templating/hinclude.rst @@ -94,7 +94,7 @@ Use the ``attributes`` option to define the value of hinclude.js options: {# by default, cross-site requests don't use credentials such as cookies, authorization headers or TLS client certificates; set this option to 'true' to use them #} - {{ render_hinclude(controller('...'), {attributes: {data-with-credentials: 'true'}}) }} + {{ render_hinclude(controller('...'), {attributes: {'data-with-credentials': 'true'}}) }} {# by default, the JavaScript code included in the loaded contents is not run; set this option to 'true' to run that JavaScript code #} diff --git a/testing.rst b/testing.rst index 095856fb426..75ed2946009 100644 --- a/testing.rst +++ b/testing.rst @@ -1069,7 +1069,7 @@ configuration adds tests from a custom ``lib/tests`` directory: - + lib/tests diff --git a/translation.rst b/translation.rst index db096351c7e..0f3f528771c 100644 --- a/translation.rst +++ b/translation.rst @@ -414,7 +414,9 @@ PHP Templates ~~~~~~~~~~~~~ The translator service is accessible in PHP templates through the -``translator`` helper:: +``translator`` helper: + +.. code-block:: html+php trans('Symfony is great') ?>