Skip to content

Commit 4f7b9c4

Browse files
authored
Merge branch '4.2' into cache-contracts
2 parents 50736c7 + c784a48 commit 4f7b9c4

File tree

188 files changed

+557
-425
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

188 files changed

+557
-425
lines changed

_includes/_annotation_loader_tip.rst.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
Annotation classes aren't loaded automatically, so you must load them
99
using a class loader like this::
1010

11-
      use Composer\Autoload\ClassLoader;
11+
use Composer\Autoload\ClassLoader;
1212
use Doctrine\Common\Annotations\AnnotationRegistry;
1313

1414
/** @var ClassLoader $loader */

best_practices/business-logic.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,8 @@ looking for mapping information::
163163

164164
namespace App\Entity;
165165

166-
use Doctrine\ORM\Mapping as ORM;
167166
use Doctrine\Common\Collections\ArrayCollection;
167+
use Doctrine\ORM\Mapping as ORM;
168168

169169
/**
170170
* @ORM\Entity

best_practices/forms.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ PHP class::
2121

2222
use App\Entity\Post;
2323
use Symfony\Component\Form\AbstractType;
24+
use Symfony\Component\Form\Extension\Core\Type\DateTimeType;
25+
use Symfony\Component\Form\Extension\Core\Type\EmailType;
26+
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
2427
use Symfony\Component\Form\FormBuilderInterface;
2528
use Symfony\Component\OptionsResolver\OptionsResolver;
26-
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
27-
use Symfony\Component\Form\Extension\Core\Type\EmailType;
28-
use Symfony\Component\Form\Extension\Core\Type\DateTimeType;
2929

3030
class PostType extends AbstractType
3131
{
@@ -103,9 +103,9 @@ some developers configure form buttons in the controller::
103103

104104
use App\Entity\Post;
105105
use App\Form\PostType;
106-
use Symfony\Component\HttpFoundation\Request;
107106
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
108107
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
108+
use Symfony\Component\HttpFoundation\Request;
109109

110110
class PostController extends AbstractController
111111
{

bundles/configuration.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,8 +255,8 @@ In your extension, you can load this and dynamically set its arguments::
255255
// src/Acme/SocialBundle/DependencyInjection/AcmeSocialExtension.php
256256
// ...
257257

258-
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
259258
use Symfony\Component\Config\FileLocator;
259+
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
260260

261261
public function load(array $configs, ContainerBuilder $container)
262262
{

bundles/extension.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ but it is more common if you put these definitions in a configuration file
8888
For instance, assume you have a file called ``services.xml`` in the
8989
``Resources/config/`` directory of your bundle, your ``load()`` method looks like::
9090

91-
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
9291
use Symfony\Component\Config\FileLocator;
92+
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
9393

9494
// ...
9595
public function load(array $configs, ContainerBuilder $container)

bundles/prepend_extension.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ To give an Extension the power to do this, it needs to implement
2727
// src/Acme/HelloBundle/DependencyInjection/AcmeHelloExtension.php
2828
namespace Acme\HelloBundle\DependencyInjection;
2929

30-
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
31-
use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface;
3230
use Symfony\Component\DependencyInjection\ContainerBuilder;
31+
use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface;
32+
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
3333

3434
class AcmeHelloExtension extends Extension implements PrependExtensionInterface
3535
{

components/asset.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,8 @@ If you are also using the :doc:`HttpFoundation </components/http_foundation>`
223223
component in your project (for instance, in a Symfony application), the ``PathPackage``
224224
class can take into account the context of the current request::
225225

226-
use Symfony\Component\Asset\PathPackage;
227226
use Symfony\Component\Asset\Context\RequestStackContext;
227+
use Symfony\Component\Asset\PathPackage;
228228
// ...
229229

230230
$pathPackage = new PathPackage(
@@ -313,8 +313,8 @@ account the context of the current request. In this case, only the request
313313
scheme is considered, in order to select the appropriate base URL (HTTPs or
314314
protocol-relative URLs for HTTPs requests, any base URL for HTTP requests)::
315315

316-
use Symfony\Component\Asset\UrlPackage;
317316
use Symfony\Component\Asset\Context\RequestStackContext;
317+
use Symfony\Component\Asset\UrlPackage;
318318
// ...
319319

320320
$urlPackage = new UrlPackage(
@@ -339,9 +339,9 @@ In the following example, all packages use the same versioning strategy, but
339339
they all have different base paths::
340340

341341
use Symfony\Component\Asset\Package;
342+
use Symfony\Component\Asset\Packages;
342343
use Symfony\Component\Asset\PathPackage;
343344
use Symfony\Component\Asset\UrlPackage;
344-
use Symfony\Component\Asset\Packages;
345345
// ...
346346

347347
$versionStrategy = new StaticVersionStrategy('v1');

components/cache/adapters/php_array_cache_adapter.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ This adapter is a high performance cache for static data (e.g. application confi
99
that is optimized and preloaded into OPcache memory storage. It is suited for any data that
1010
is mostly read-only after warmup::
1111

12-
use Symfony\Component\Cache\Adapter\PhpArrayAdapter;
1312
use Symfony\Component\Cache\Adapter\FilesystemAdapter;
13+
use Symfony\Component\Cache\Adapter\PhpArrayAdapter;
1414

1515
// somehow, decide it's time to warm up the cache!
1616
if ($needsWarmup) {

components/cache/cache_invalidation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ in the same place. By using two adapters, you can e.g. store some big cached ite
6868
on the filesystem or in the database and keep tags in a Redis database to sync all
6969
your fronts and have very fast invalidation checks::
7070

71-
use Symfony\Component\Cache\Adapter\TagAwareAdapter;
7271
use Symfony\Component\Cache\Adapter\FilesystemAdapter;
7372
use Symfony\Component\Cache\Adapter\RedisAdapter;
73+
use Symfony\Component\Cache\Adapter\TagAwareAdapter;
7474

7575
$cache = new TagAwareAdapter(
7676
// Adapter for cached items

components/cache/psr6_psr16_adapters.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ instead. No problem! The Cache component provides the
3636
:class:`Symfony\\Component\\Cache\\Adapter\\SimpleCacheAdapter` class for exactly
3737
this use-case::
3838

39-
use Symfony\Component\Cache\Simple\FilesystemCache;
4039
use Symfony\Component\Cache\Adapter\SimpleCacheAdapter;
40+
use Symfony\Component\Cache\Simple\FilesystemCache;
4141

4242
// the PSR-16 cache object that you want to use
4343
$psr16Cache = new FilesystemCache();

0 commit comments

Comments
 (0)