diff --git a/bundles/configuration.rst b/bundles/configuration.rst index 51a73837da3..1fd84ac365d 100644 --- a/bundles/configuration.rst +++ b/bundles/configuration.rst @@ -110,7 +110,6 @@ bundle configuration would look like: For parameter handling within a dependency injection container see :doc:`/configuration/using_parameters_in_dic`. - Processing the ``$configs`` Array ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -264,7 +263,6 @@ In your extension, you can load this and dynamically set its arguments:: $def->replaceArgument(1, $config['twitter']['client_secret']); } - .. tip:: Instead of calling ``processConfiguration()`` in your extension each time you diff --git a/components/asset.rst b/components/asset.rst index b289feb77e1..351db4e0874 100644 --- a/components/asset.rst +++ b/components/asset.rst @@ -66,7 +66,7 @@ any versioning:: // Absolute path echo $package->getUrl('/image.png'); // result: /image.png - + // Relative path echo $package->getUrl('image.png'); // result: image.png @@ -113,7 +113,7 @@ suffix to any asset path:: // Absolute path echo $package->getUrl('/image.png'); // result: /image.png?v1 - + // Relative path echo $package->getUrl('image.png'); // result: image.png?v1 @@ -132,7 +132,7 @@ string as the second argument of the ``StaticVersionStrategy`` constructor:: echo $package->getUrl('/image.png'); // result: /v1/image.png - + echo $package->getUrl('image.png'); // result: v1/image.png @@ -183,7 +183,7 @@ that path over and over again:: echo $package->getUrl('logo.png'); // result: /static/images/logo.png?v1 - + // Base path is ignored when using absolute paths echo $package->getUrl('/logo.png'); // result: /logo.png?v1 diff --git a/components/cache/psr6_psr16_adapters.rst b/components/cache/psr6_psr16_adapters.rst index 4d818449618..0557f942ab1 100644 --- a/components/cache/psr6_psr16_adapters.rst +++ b/components/cache/psr6_psr16_adapters.rst @@ -44,7 +44,7 @@ this use-case:: // a PSR-6 cache that uses your cache internally! $psr6Cache = new SimpleCacheAdapter($psr16Cache); - + // now use this wherever you want $githubApiClient = new GitHubApiClient($psr6Cache); @@ -81,6 +81,6 @@ this use-case:: // a PSR-16 cache that uses your cache internally! $psr16Cache = new Psr6Cache($psr6Cache); - + // now use this wherever you want $githubApiClient = new GitHubApiClient($psr16Cache); diff --git a/components/console/helpers/questionhelper.rst b/components/console/helpers/questionhelper.rst index f212612f0d2..cdd1ce28c5d 100644 --- a/components/console/helpers/questionhelper.rst +++ b/components/console/helpers/questionhelper.rst @@ -256,7 +256,6 @@ method:: $name = $helper->ask($input, $output, $question); } - .. caution:: The normalizer is called first and the returned value is used as the input diff --git a/components/filesystem.rst b/components/filesystem.rst index e825df024f2..7d31f15d6b0 100644 --- a/components/filesystem.rst +++ b/components/filesystem.rst @@ -6,7 +6,6 @@ The Filesystem Component The Filesystem component provides basic utilities for the filesystem. - Installation ------------ diff --git a/components/http_kernel.rst b/components/http_kernel.rst index 4d517e51477..9ff2f3b5cfe 100644 --- a/components/http_kernel.rst +++ b/components/http_kernel.rst @@ -234,7 +234,6 @@ This implementation is explained more in the sidebar below:: public function getController(Request $request); } - Internally, the ``HttpKernel::handle()`` method first calls :method:`Symfony\\Component\\HttpKernel\\Controller\\ControllerResolverInterface::getController` on the controller resolver. This method is passed the ``Request`` and is responsible diff --git a/components/index.rst b/components/index.rst index bfb96460a5c..14f7e7b6f51 100644 --- a/components/index.rst +++ b/components/index.rst @@ -4,6 +4,6 @@ The Components .. toctree:: :maxdepth: 1 :glob: - + using_components * diff --git a/components/lock.rst b/components/lock.rst index 8ec7428b7e9..2178b5df4e9 100644 --- a/components/lock.rst +++ b/components/lock.rst @@ -143,7 +143,6 @@ Locks are created and managed in ``Stores``, which are classes that implement :class:`Symfony\\Component\\Lock\\StoreInterface`. The component includes the following built-in store types: - ============================================ ====== ======== ======== Store Scope Blocking Expiring ============================================ ====== ======== ======== diff --git a/components/options_resolver.rst b/components/options_resolver.rst index c3c9a315039..1ed2347b4d8 100644 --- a/components/options_resolver.rst +++ b/components/options_resolver.rst @@ -376,7 +376,6 @@ is thrown:: For options with more complicated validation schemes, pass a closure which returns ``true`` for acceptable values and ``false`` for invalid values:: - // ... $resolver->setAllowedValues('transport', function ($value) { // return true or false diff --git a/components/phpunit_bridge.rst b/components/phpunit_bridge.rst index a528ec56f1c..27a30c7d72a 100644 --- a/components/phpunit_bridge.rst +++ b/components/phpunit_bridge.rst @@ -493,7 +493,6 @@ Consider the following example:: } } - The ``FooTest::test`` method executes every single line of code of both ``Foo`` and ``Bar`` classes, but ``Bar`` is not truly tested. The ``CoverageListener`` aims to fix this behavior by adding the appropriate `@covers`_ annotation on diff --git a/components/property_access.rst b/components/property_access.rst index ca94e819d69..f8bf64ab729 100644 --- a/components/property_access.rst +++ b/components/property_access.rst @@ -450,6 +450,5 @@ Or you can pass parameters directly to the constructor (not the recommended way) // ... $accessor = new PropertyAccessor(true); // this enables handling of magic __call - .. _Packagist: https://packagist.org/packages/symfony/property-access .. _The Inflector component: https://github.com/symfony/inflector diff --git a/components/routing.rst b/components/routing.rst index fc1488d2d09..2a3665d9aaf 100644 --- a/components/routing.rst +++ b/components/routing.rst @@ -417,7 +417,6 @@ routes with UTF-8 characters: return $collection; - In this route, the ``utf8`` option set to ``true`` makes Symfony consider the ``.`` requirement to match any UTF-8 characters instead of just a single byte character. This means that so the following URLs would match: diff --git a/components/serializer.rst b/components/serializer.rst index f1c66ce2b4e..6c710ff7cc0 100644 --- a/components/serializer.rst +++ b/components/serializer.rst @@ -29,7 +29,6 @@ You can install the component in 2 different ways: * :doc:`Install it via Composer ` (``symfony/serializer`` on `Packagist`_); * Use the official Git repository (https://github.com/symfony/serializer). - .. include:: /components/require_autoload.rst.inc To use the ``ObjectNormalizer``, the :doc:`PropertyAccess component ` @@ -167,7 +166,6 @@ an exception when additional attributes are passed:: 'allow_extra_attributes' => false, )); - Deserializing in an Existing Object ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/components/validator/metadata.rst b/components/validator/metadata.rst index ced1da15e4e..15b3cd56658 100755 --- a/components/validator/metadata.rst +++ b/components/validator/metadata.rst @@ -1,72 +1,72 @@ -.. index:: - single: Validator; Metadata - -Metadata -======== - -The :class:`Symfony\\Component\\Validator\\Mapping\\ClassMetadata` class -represents and manages all the configured constraints on a given class. - -Properties ----------- - -The Validator component can validate public, protected or private properties. -The following example shows how to validate that the ``$firstName`` property of -the ``Author`` class has at least 3 characters:: - - // ... - use Symfony\Component\Validator\Mapping\ClassMetadata; - use Symfony\Component\Validator\Constraints as Assert; - - class Author - { - private $firstName; - - public static function loadValidatorMetadata(ClassMetadata $metadata) - { - $metadata->addPropertyConstraint('firstName', new Assert\NotBlank()); - $metadata->addPropertyConstraint( - 'firstName', - new Assert\Length(array("min" => 3)) - ); - } - } - -Getters -------- - -Constraints can also be applied to the value returned by any public *getter* -method, which are the methods whose names start with ``get``, ``has`` or ``is``. -This feature allows to validate your objects dynamically. - -Suppose that, for security reasons, you want to validate that a password field -doesn't match the first name of the user. First, create a public method called -``isPasswordSafe()`` to define this custom validation logic:: - - public function isPasswordSafe() - { - return $this->firstName !== $this->password; - } - -Then, add the Validator component configuration to the class:: - - // ... - use Symfony\Component\Validator\Mapping\ClassMetadata; - use Symfony\Component\Validator\Constraints as Assert; - - class Author - { - public static function loadValidatorMetadata(ClassMetadata $metadata) - { - $metadata->addGetterConstraint('passwordSafe', new Assert\IsTrue(array( - 'message' => 'The password cannot match your first name', - ))); - } - } - -Classes -------- - -Some constraints allow to validate the entire object. For example, the -:doc:`Callback ` constraint is a generic -constraint that's applied to the class itself. +.. index:: + single: Validator; Metadata + +Metadata +======== + +The :class:`Symfony\\Component\\Validator\\Mapping\\ClassMetadata` class +represents and manages all the configured constraints on a given class. + +Properties +---------- + +The Validator component can validate public, protected or private properties. +The following example shows how to validate that the ``$firstName`` property of +the ``Author`` class has at least 3 characters:: + + // ... + use Symfony\Component\Validator\Mapping\ClassMetadata; + use Symfony\Component\Validator\Constraints as Assert; + + class Author + { + private $firstName; + + public static function loadValidatorMetadata(ClassMetadata $metadata) + { + $metadata->addPropertyConstraint('firstName', new Assert\NotBlank()); + $metadata->addPropertyConstraint( + 'firstName', + new Assert\Length(array("min" => 3)) + ); + } + } + +Getters +------- + +Constraints can also be applied to the value returned by any public *getter* +method, which are the methods whose names start with ``get``, ``has`` or ``is``. +This feature allows to validate your objects dynamically. + +Suppose that, for security reasons, you want to validate that a password field +doesn't match the first name of the user. First, create a public method called +``isPasswordSafe()`` to define this custom validation logic:: + + public function isPasswordSafe() + { + return $this->firstName !== $this->password; + } + +Then, add the Validator component configuration to the class:: + + // ... + use Symfony\Component\Validator\Mapping\ClassMetadata; + use Symfony\Component\Validator\Constraints as Assert; + + class Author + { + public static function loadValidatorMetadata(ClassMetadata $metadata) + { + $metadata->addGetterConstraint('passwordSafe', new Assert\IsTrue(array( + 'message' => 'The password cannot match your first name', + ))); + } + } + +Classes +------- + +Some constraints allow to validate the entire object. For example, the +:doc:`Callback ` constraint is a generic +constraint that's applied to the class itself. diff --git a/components/var_dumper.rst b/components/var_dumper.rst index 4704593eb11..f6d97c2918c 100644 --- a/components/var_dumper.rst +++ b/components/var_dumper.rst @@ -80,7 +80,7 @@ DebugBundle and Twig Integration -------------------------------- The DebugBundle allows greater integration of this component into Symfony -applications. +applications. Since generating (even debug) output in the controller or in the model of your application may just break it by e.g. sending HTTP headers or diff --git a/configuration/micro_kernel_trait.rst b/configuration/micro_kernel_trait.rst index 4d90414ba83..5cd697943c2 100644 --- a/configuration/micro_kernel_trait.rst +++ b/configuration/micro_kernel_trait.rst @@ -102,7 +102,6 @@ that define your bundles, your services and your routes: ``RouteCollectionBuilder`` has methods that make adding routes in PHP more fun. You can also load external routing files (shown below). - Advanced Example: Twig, Annotations and the Web Debug Toolbar ------------------------------------------------------------- diff --git a/console.rst b/console.rst index 57eed233329..1e96533c502 100644 --- a/console.rst +++ b/console.rst @@ -186,7 +186,7 @@ as a service, you can use normal dependency injection. Imagine you have a public function __construct(UserManager $userManager) { $this->userManager = $userManager; - + parent::__construct(); } diff --git a/console/command_in_controller.rst b/console/command_in_controller.rst index cc62d38ae1f..24970c65943 100644 --- a/console/command_in_controller.rst +++ b/console/command_in_controller.rst @@ -55,7 +55,7 @@ Run this command from inside your controller via:: // return the output, don't use if you used NullOutput() $content = $output->fetch(); - + // return new Response(""), if you used NullOutput() return new Response($content); } diff --git a/contributing/code/bugs.rst b/contributing/code/bugs.rst index b1b92578cba..46134a01b88 100644 --- a/contributing/code/bugs.rst +++ b/contributing/code/bugs.rst @@ -26,8 +26,8 @@ If your problem definitely looks like a bug, report it using the official bug * Describe the steps needed to reproduce the bug with short code examples (providing a unit test that illustrates the bug is best); -* If the bug you experienced is not obvious or affects more than one layer, - providing a simple failing unit test may not be sufficient. In this case, +* If the bug you experienced is not obvious or affects more than one layer, + providing a simple failing unit test may not be sufficient. In this case, please :doc:`provide a reproducer `; * Give as much detail as possible about your environment (OS, PHP version, diff --git a/create_framework/event_dispatcher.rst b/create_framework/event_dispatcher.rst index 12f8e39b433..b20bfde96a4 100644 --- a/create_framework/event_dispatcher.rst +++ b/create_framework/event_dispatcher.rst @@ -138,7 +138,7 @@ the registration of a listener for the ``response`` event:: $response->setContent($response->getContent().'GA CODE'); }); - + $controllerResolver = new ControllerResolver(); $argumentResolver = new ArgumentResolver(); diff --git a/create_framework/front_controller.rst b/create_framework/front_controller.rst index b5d2bd5e360..333af3bd011 100644 --- a/create_framework/front_controller.rst +++ b/create_framework/front_controller.rst @@ -140,7 +140,7 @@ web root directory: example.com ├── composer.json - ├── composer.lock + ├── composer.lock ├── src │ └── pages │ ├── hello.php diff --git a/create_framework/http_kernel_controller_resolver.rst b/create_framework/http_kernel_controller_resolver.rst index 65748c05212..180e9262c69 100644 --- a/create_framework/http_kernel_controller_resolver.rst +++ b/create_framework/http_kernel_controller_resolver.rst @@ -56,7 +56,6 @@ based on a Request object. All controller resolvers implement the following inte public function getController(Request $request); } - The ``getController()`` method relies on the same convention as the one we have defined earlier: the ``_controller`` request attribute must contain the controller associated with the Request. Besides the built-in PHP callbacks, @@ -100,7 +99,6 @@ following interface:: public function getArguments(Request $request, $controller); } - The ``indexAction()`` method needs the Request object as an argument. ``getArguments()`` knows when to inject it properly if it is type-hinted correctly:: diff --git a/create_framework/http_kernel_httpkernel_class.rst b/create_framework/http_kernel_httpkernel_class.rst index ad0ac3607c4..1e5f28ff649 100644 --- a/create_framework/http_kernel_httpkernel_class.rst +++ b/create_framework/http_kernel_httpkernel_class.rst @@ -68,7 +68,7 @@ attributes with route parameters. Our code is now much more concise and surprisingly more robust and more powerful than ever. For instance, use the built-in ``ExceptionListener`` to make your error management configurable:: - + $errorHandler = function (Symfony\Component\Debug\Exception\FlattenException $exception) { $msg = 'Something went wrong! ('.$exception->getMessage().')'; diff --git a/deployment.rst b/deployment.rst index 5e4774f95cd..b188214480f 100644 --- a/deployment.rst +++ b/deployment.rst @@ -103,7 +103,6 @@ specifically tailored to the requirements of Symfony. `sf2debpkg`_ Helps you build a native Debian package for your Symfony project. - Basic scripting You can of course use shell, `Ant`_ or any other build tool to script the deploying of your project. diff --git a/form/dynamic_form_modification.rst b/form/dynamic_form_modification.rst index 92e591857f4..faa66b5c853 100644 --- a/form/dynamic_form_modification.rst +++ b/form/dynamic_form_modification.rst @@ -104,7 +104,6 @@ creating that particular field is delegated to an event listener:: // ... } - The goal is to create a ``name`` field *only* if the underlying ``Product`` object is new (e.g. hasn't been persisted to the database). Based on that, the event listener might look like the following:: diff --git a/form/form_customization.rst b/form/form_customization.rst index 1cb73318df6..f50325bfc09 100644 --- a/form/form_customization.rst +++ b/form/form_customization.rst @@ -1005,7 +1005,6 @@ fields (e.g. a whole form), and not just an individual field. - Customizing the "Form Row" ~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/frontend/encore/babel.rst b/frontend/encore/babel.rst index dbe3862e9b2..1a060c950d1 100644 --- a/frontend/encore/babel.rst +++ b/frontend/encore/babel.rst @@ -15,7 +15,7 @@ Need to extend the Babel configuration further? The easiest way is via Encore // ... - + // first, install any presets you want to use (e.g. yarn add babel-preset-es2017) // then, modify the default Babel configuration .configureBabel(function(babelConfig) { diff --git a/frontend/encore/custom-loaders-plugins.rst b/frontend/encore/custom-loaders-plugins.rst index 45f0de12a70..66ce1f7c5cc 100644 --- a/frontend/encore/custom-loaders-plugins.rst +++ b/frontend/encore/custom-loaders-plugins.rst @@ -52,7 +52,7 @@ to use the `IgnorePlugin`_ (see `moment/moment#2373`_): // webpack.config.js + var webpack = require('webpack'); - + Encore // ... diff --git a/introduction/from_flat_php_to_symfony2.rst b/introduction/from_flat_php_to_symfony2.rst index aa9d9a4a53e..0c7d6efd76d 100644 --- a/introduction/from_flat_php_to_symfony2.rst +++ b/introduction/from_flat_php_to_symfony2.rst @@ -101,7 +101,6 @@ the code that prepares the HTML "presentation":: // include the HTML presentation code require 'templates/list.php'; - The HTML code is now stored in a separate file ``templates/list.php``, which is primarily an HTML file that uses a template-like PHP syntax: diff --git a/logging/monolog_console.rst b/logging/monolog_console.rst index 8395e3e7815..556bd54fbb8 100644 --- a/logging/monolog_console.rst +++ b/logging/monolog_console.rst @@ -39,7 +39,7 @@ The example above could then be rewritten as:: use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; // ... - + class YourCommand extends Command { private $logger; diff --git a/page_creation.rst b/page_creation.rst index c55c536b37e..f1e53048095 100644 --- a/page_creation.rst +++ b/page_creation.rst @@ -329,7 +329,6 @@ Go Deeper with HTTP & Framework Fundamentals routing - .. toctree:: :maxdepth: 1 :glob: diff --git a/quick_tour/flex_recipes.rst b/quick_tour/flex_recipes.rst index db7cbe236b7..a5638372705 100644 --- a/quick_tour/flex_recipes.rst +++ b/quick_tour/flex_recipes.rst @@ -79,7 +79,7 @@ Thanks to Flex, after one command, you can start using Twig immediately: // ... + use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; - + -class DefaultController +class DefaultController extends AbstractController { @@ -216,16 +216,16 @@ me? List your routes by running: .. code-block:: text - ------------------------------ -------- ------------------------------------- - Name Method Path - ------------------------------ -------- ------------------------------------- - api_products_get_collection GET /api/products.{_format} - api_products_post_collection POST /api/products.{_format} - api_products_get_item GET /api/products/{id}.{_format} - api_products_put_item PUT /api/products/{id}.{_format} - api_products_delete_item DELETE /api/products/{id}.{_format} + ------------------------------ -------- ------------------------------------- + Name Method Path + ------------------------------ -------- ------------------------------------- + api_products_get_collection GET /api/products.{_format} + api_products_post_collection POST /api/products.{_format} + api_products_get_item GET /api/products/{id}.{_format} + api_products_put_item PUT /api/products/{id}.{_format} + api_products_delete_item DELETE /api/products/{id}.{_format} ... - ------------------------------ -------- ------------------------------------- + ------------------------------ -------- ------------------------------------- Easily Remove Recipes --------------------- diff --git a/quick_tour/the_architecture.rst b/quick_tour/the_architecture.rst index aa2af7b0d93..013d9c19701 100644 --- a/quick_tour/the_architecture.rst +++ b/quick_tour/the_architecture.rst @@ -113,7 +113,7 @@ difference is that it's done in the constructor: class GreetingGenerator { + private $logger; - + + + + public function __construct(LoggerInterface $logger) + { + $this->logger = $logger; diff --git a/quick_tour/the_big_picture.rst b/quick_tour/the_big_picture.rst index d0c777ce08a..eaf2edb3fb3 100644 --- a/quick_tour/the_big_picture.rst +++ b/quick_tour/the_big_picture.rst @@ -149,21 +149,21 @@ Instead, add the route *right above* the controller method: // src/Controller/DefaultController.php // ... - + + use Symfony\Component\Routing\Annotation\Route; - + + /** + * @Route("/hello/{name}") + */ public function index($name) - + This works just like before! But by using annotations, the route and controller live right next to each other. Need another page? Just add another route and method in ``DefaultController``:: // src/Controller/DefaultController.php // ... - + /** * @Route("/simplicity") */ diff --git a/reference/configuration/doctrine.rst b/reference/configuration/doctrine.rst index b8301d7429e..932b3526bce 100644 --- a/reference/configuration/doctrine.rst +++ b/reference/configuration/doctrine.rst @@ -23,7 +23,6 @@ Full Default Configuration class: App\DBAL\MyCustomType commented: true - connections: # A collection of different named connections (e.g. default, conn2, etc) default: @@ -273,7 +272,6 @@ Full Default Configuration - .. index:: single: Configuration; Doctrine DBAL single: Doctrine; DBAL configuration @@ -301,7 +299,7 @@ The following block shows all possible configuration keys: password: secret driver: pdo_mysql # if the url option is specified, it will override the above config - url: mysql://db_user:db_password@127.0.0.1:3306/db_name + url: mysql://db_user:db_password@127.0.0.1:3306/db_name # the DBAL driverClass option driver_class: App\DBAL\MyDatabaseDriver # the DBAL driverOptions option diff --git a/reference/constraints/Blank.rst b/reference/constraints/Blank.rst index 54f7c20fe1b..e1d9aefc12b 100644 --- a/reference/constraints/Blank.rst +++ b/reference/constraints/Blank.rst @@ -10,7 +10,6 @@ Validates that a value is blank - meaning equal to an empty string or ``null``:: To force that a value strictly be equal to ``null``, see the :doc:`/reference/constraints/IsNull` constraint. - To force that a value is *not* blank, see :doc:`/reference/constraints/NotBlank`. But be careful as ``NotBlank`` is *not* strictly the opposite of ``Blank``. diff --git a/reference/constraints/Isbn.rst b/reference/constraints/Isbn.rst index 2eb5e9ff7da..603ee748a9a 100644 --- a/reference/constraints/Isbn.rst +++ b/reference/constraints/Isbn.rst @@ -55,7 +55,6 @@ on an object that will contain an ISBN. type: isbn10 message: This value is not valid. - .. code-block:: xml diff --git a/reference/constraints/Uuid.rst b/reference/constraints/Uuid.rst index 8f93376a5cd..c50ebbef9f6 100644 --- a/reference/constraints/Uuid.rst +++ b/reference/constraints/Uuid.rst @@ -78,7 +78,6 @@ Basic Usage } } - Options ------- diff --git a/reference/forms/types/datetime.rst b/reference/forms/types/datetime.rst index 8501adc3dfc..4345d5fe9a8 100644 --- a/reference/forms/types/datetime.rst +++ b/reference/forms/types/datetime.rst @@ -83,7 +83,7 @@ as a series of ``select`` boxes. When the placeholder value is a string, it will be used as the **blank value** of all select boxes:: use Symfony\Component\Form\Extension\Core\Type\DateTimeType; - + $builder->add('startDateTime', DateTimeType::class, array( 'placeholder' => 'Select a value', )); @@ -92,7 +92,7 @@ Alternatively, you can use an array that configures different placeholder values for the year, month, day, hour, minute and second fields:: use Symfony\Component\Form\Extension\Core\Type\DateTimeType; - + $builder->add('startDateTime', DateTimeType::class, array( 'placeholder' => array( 'year' => 'Year', 'month' => 'Month', 'day' => 'Day', diff --git a/reference/forms/types/number.rst b/reference/forms/types/number.rst index 1dbe6cf29eb..843ef81e51e 100644 --- a/reference/forms/types/number.rst +++ b/reference/forms/types/number.rst @@ -51,7 +51,7 @@ rounding_mode If a submitted number needs to be rounded (based on the `scale`_ option), you have several configurable options for that rounding. Each option is a constant on the :class:`Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\NumberToLocalizedStringTransformer`: - + * ``NumberToLocalizedStringTransformer::ROUND_DOWN`` Round towards zero. * ``NumberToLocalizedStringTransformer::ROUND_FLOOR`` Round towards negative diff --git a/reference/forms/types/percent.rst b/reference/forms/types/percent.rst index a2156d63d13..c06e97dd17a 100644 --- a/reference/forms/types/percent.rst +++ b/reference/forms/types/percent.rst @@ -4,7 +4,6 @@ PercentType Field ================= - The ``PercentType`` renders an input text field and specializes in handling percentage data. If your percentage data is stored as a decimal (e.g. ``.95``), you can use this field out-of-the-box. If you store your data as a number diff --git a/routing.rst b/routing.rst index 06c20f08863..99a510504e9 100644 --- a/routing.rst +++ b/routing.rst @@ -343,7 +343,7 @@ As your app grows, you'll eventually have a *lot* of routes! To see them all, ru .. code-block:: text ------------------------------ -------- ------------------------------------- - Name Method Path + Name Method Path ------------------------------ -------- ------------------------------------- app_lucky_number ANY /lucky/number/{max} ... diff --git a/security/entity_provider.rst b/security/entity_provider.rst index 660b9d89139..060680a5b67 100644 --- a/security/entity_provider.rst +++ b/security/entity_provider.rst @@ -41,7 +41,7 @@ Before you begin, first make sure you install the Security component: .. code-block:: terminal $ composer require security - + For this entry, suppose that you already have a ``User`` entity with the following fields: ``id``, ``username``, ``password``, ``email`` and ``isActive``:: diff --git a/security/form_login_setup.rst b/security/form_login_setup.rst index f6da87b0188..cbb88155066 100644 --- a/security/form_login_setup.rst +++ b/security/form_login_setup.rst @@ -220,7 +220,6 @@ Finally, create the template: - .. tip:: The ``error`` variable passed into the template is an instance of diff --git a/service_container.rst b/service_container.rst index 7033a596249..5dc69e950e1 100644 --- a/service_container.rst +++ b/service_container.rst @@ -592,7 +592,6 @@ But, you can control this and pass in a different logger: - .. code-block:: php // config/services.php diff --git a/setup/unstable_versions.rst b/setup/unstable_versions.rst index 702a4246f5e..0be7b3ad70d 100644 --- a/setup/unstable_versions.rst +++ b/setup/unstable_versions.rst @@ -16,7 +16,7 @@ execute the following command: # Download the latest beta version $ composer create-project symfony/skeleton my_project "4.0.*" -s beta - + # Download the absolute latest commit $ composer create-project symfony/skeleton my_project "4.0.*" -s dev diff --git a/templating/PHP.rst b/templating/PHP.rst index 5f87d9b05b9..4f9bdee3dfb 100644 --- a/templating/PHP.rst +++ b/templating/PHP.rst @@ -107,7 +107,6 @@ below renders the ``index.html.php`` template:: {# traditional template notation will also work #} {{ include('hello/index.html.twig') }} - .. index:: single: Templating; Layout single: Layout diff --git a/translation/debug.rst b/translation/debug.rst index b669a3197f7..bfa144d724e 100644 --- a/translation/debug.rst +++ b/translation/debug.rst @@ -64,7 +64,6 @@ you've already setup some translations for the ``fr`` locale: - .. code-block:: yaml # translations/messages.fr.yaml diff --git a/workflow/usage.rst b/workflow/usage.rst index 88a33c0632c..63abf1b1c2a 100644 --- a/workflow/usage.rst +++ b/workflow/usage.rst @@ -359,7 +359,6 @@ See example to make sure no blog post without title is moved to "review":: } } - Event Methods ~~~~~~~~~~~~~