Skip to content

Commit 947fbd1

Browse files
committed
Merge branch '4.4' into 5.2
* 4.4: [#15009] Fix indentation of all diff code blocks
2 parents d66f89e + 4865b3b commit 947fbd1

31 files changed

+326
-326
lines changed

configuration/dot-env-changes.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,16 +56,16 @@ changes can be made to any Symfony 3.4 or higher app:
5656

5757
.. code-block:: diff
5858
59-
# .gitignore
60-
# ...
59+
# .gitignore
60+
# ...
6161
62-
###> symfony/framework-bundle ###
62+
###> symfony/framework-bundle ###
6363
- /.env
6464
+ /.env.local
6565
+ /.env.local.php
6666
+ /.env.*.local
6767
68-
# ...
68+
# ...
6969
7070
#. Rename ``.env`` to ``.env.local`` and ``.env.dist`` to ``.env``:
7171

controller.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,16 +98,16 @@ Add the ``use`` statement atop your controller class and then modify
9898

9999
.. code-block:: diff
100100
101-
// src/Controller/LuckyController.php
102-
namespace App\Controller;
101+
// src/Controller/LuckyController.php
102+
namespace App\Controller;
103103
104104
+ use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
105105
106106
- class LuckyController
107107
+ class LuckyController extends AbstractController
108-
{
109-
// ...
110-
}
108+
{
109+
// ...
110+
}
111111
112112
That's it! You now have access to methods like :ref:`$this->render() <controller-rendering-templates>`
113113
and many others that you'll learn about next.

doctrine.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -280,20 +280,20 @@ methods:
280280

281281
.. code-block:: diff
282282
283-
// src/Entity/Product.php
284-
// ...
283+
// src/Entity/Product.php
284+
// ...
285285
286-
class Product
287-
{
288-
// ...
286+
class Product
287+
{
288+
// ...
289289
290290
+ /**
291291
+ * @ORM\Column(type="text")
292292
+ */
293293
+ private $description;
294294
295-
// getDescription() & setDescription() were also added
296-
}
295+
// getDescription() & setDescription() were also added
296+
}
297297
298298
The new property is mapped, but it doesn't exist yet in the ``product`` table. No
299299
problem! Generate a new migration:

frontend/encore/cdn.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ built files are uploaded to the CDN, configure it in Encore:
66

77
.. code-block:: diff
88
9-
// webpack.config.js
10-
// ...
11-
12-
Encore
13-
.setOutputPath('public/build/')
14-
// in dev mode, don't use the CDN
15-
.setPublicPath('/build');
16-
// ...
17-
;
9+
// webpack.config.js
10+
// ...
11+
12+
Encore
13+
.setOutputPath('public/build/')
14+
// in dev mode, don't use the CDN
15+
.setPublicPath('/build');
16+
// ...
17+
;
1818
1919
+ if (Encore.isProduction()) {
2020
+ Encore.setPublicPath('https://my-cool-app.com.global.prod.fastly.net');

frontend/encore/copy-files.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ files into your final output directory.
3232

3333
.. code-block:: diff
3434
35-
// webpack.config.js
35+
// webpack.config.js
3636
37-
Encore
38-
// ...
39-
.setOutputPath('public/build/')
37+
Encore
38+
// ...
39+
.setOutputPath('public/build/')
4040
4141
+ .copyFiles({
4242
+ from: './assets/images',

frontend/encore/custom-loaders-plugins.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,14 @@ to use the `IgnorePlugin`_ (see `moment/moment#2373`_):
5050

5151
.. code-block:: diff
5252
53-
// webpack.config.js
53+
// webpack.config.js
5454
+ var webpack = require('webpack');
5555
56-
Encore
57-
// ...
56+
Encore
57+
// ...
5858
5959
+ .addPlugin(new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/))
60-
;
60+
;
6161
6262
.. _`handlebars-loader`: https://github.com/pcardune/handlebars-loader
6363
.. _`plugins`: https://webpack.js.org/plugins/

frontend/encore/dev-server.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,12 @@ server SSL certificate:
6666

6767
.. code-block:: diff
6868
69-
// webpack.config.js
70-
// ...
69+
// webpack.config.js
70+
// ...
7171
+ const path = require('path');
7272
73-
Encore
74-
// ...
73+
Encore
74+
// ...
7575
7676
+ .configureDevServerOptions(options => {
7777
+ options.https = {

frontend/encore/faq.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,11 @@ like ``/myAppSubdir``), you will need to configure that when calling ``Encore.se
6363

6464
.. code-block:: diff
6565
66-
// webpack.config.js
67-
Encore
68-
// ...
66+
// webpack.config.js
67+
Encore
68+
// ...
6969
70-
.setOutputPath('public/build/')
70+
.setOutputPath('public/build/')
7171
7272
- .setPublicPath('/build')
7373
+ // this is your *true* public path
@@ -76,7 +76,7 @@ like ``/myAppSubdir``), you will need to configure that when calling ``Encore.se
7676
+ // this is now needed so that your manifest.json keys are still `build/foo.js`
7777
+ // (which is a file that's used by Symfony's `asset()` function)
7878
+ .setManifestKeyPrefix('build')
79-
;
79+
;
8080
8181
If you're using the ``encore_entry_script_tags()`` and ``encore_entry_link_tags()``
8282
Twig shortcuts (or are :ref:`processing your assets through entrypoints.json <load-manifest-files>`

frontend/encore/legacy-applications.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ jQuery plugins often expect that jQuery is already available via the ``$`` or
3232

3333
.. code-block:: diff
3434
35-
// webpack.config.js
36-
Encore
37-
// ...
35+
// webpack.config.js
36+
Encore
37+
// ...
3838
+ .autoProvidejQuery()
39-
;
39+
;
4040
4141
After restarting Encore, Webpack will look for all uninitialized ``$`` and ``jQuery``
4242
variables and automatically require ``jquery`` and set those variables for you.
@@ -75,10 +75,10 @@ page, add:
7575

7676
.. code-block:: diff
7777
78-
// webpack.config.js
78+
// webpack.config.js
7979
80-
// require jQuery normally
81-
const $ = require('jquery');
80+
// require jQuery normally
81+
const $ = require('jquery');
8282
8383
+ // create global $ and jQuery variables
8484
+ global.$ = global.jQuery = $;

frontend/encore/postcss.rst

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ Then, enable the loader in Encore!
2828

2929
.. code-block:: diff
3030
31-
// webpack.config.js
31+
// webpack.config.js
3232
33-
Encore
34-
// ...
33+
Encore
34+
// ...
3535
+ .enablePostCssLoader()
36-
;
36+
;
3737
3838
Because you just modified ``webpack.config.js``, stop and restart Encore.
3939

@@ -42,18 +42,18 @@ You can also pass options to the `postcss-loader`_ by passing a callback:
4242

4343
.. code-block:: diff
4444
45-
// webpack.config.js
45+
// webpack.config.js
4646
+ const path = require('path');
4747
48-
Encore
49-
// ...
48+
Encore
49+
// ...
5050
+ .enablePostCssLoader((options) => {
5151
+ options.postcssOptions = {
5252
+ // the directory where the postcss.config.js file is stored
5353
+ config: path.resolve(__dirname, 'sub-dir', 'custom.config.js'),
5454
+ };
5555
+ })
56-
;
56+
;
5757
5858
.. _browserslist_package_config:
5959

@@ -66,25 +66,25 @@ support. The best-practice is to configure this directly in your ``package.json`
6666

6767
.. code-block:: diff
6868
69-
{
69+
{
7070
+ "browserslist": [
7171
+ "defaults"
7272
+ ]
73-
}
73+
}
7474
7575
The ``defaults`` option is recommended for most users and would be equivalent
7676
to the following browserslist:
7777

7878
.. code-block:: diff
7979
80-
{
80+
{
8181
+ "browserslist": [
8282
+ "> 0.5%",
8383
+ "last 2 versions",
8484
+ "Firefox ESR",
8585
+ "not dead"
8686
+ ]
87-
}
87+
}
8888
8989
See `browserslist`_ for more details on the syntax.
9090

frontend/encore/reactjs.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ Enable react in your ``webpack.config.js``:
1717

1818
.. code-block:: diff
1919
20-
// webpack.config.js
21-
// ...
20+
// webpack.config.js
21+
// ...
2222
23-
Encore
24-
// ...
23+
Encore
24+
// ...
2525
+ .enableReactPreset()
26-
;
26+
;
2727
2828
2929
Then restart Encore. When you do, it will give you a command you can run to

frontend/encore/simple-example.rst

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,8 @@ Great! Use ``import`` to import ``jquery`` and ``greet.js``:
167167

168168
.. code-block:: diff
169169
170-
// assets/app.js
171-
// ...
170+
// assets/app.js
171+
// ...
172172
173173
+ // loads the jquery package from node_modules
174174
+ import jquery from 'jquery';
@@ -209,13 +209,13 @@ Next, use ``addEntry()`` to tell Webpack to read these two new files when it bui
209209

210210
.. code-block:: diff
211211
212-
// webpack.config.js
213-
Encore
214-
// ...
215-
.addEntry('app', './assets/app.js')
212+
// webpack.config.js
213+
Encore
214+
// ...
215+
.addEntry('app', './assets/app.js')
216216
+ .addEntry('checkout', './assets/checkout.js')
217217
+ .addEntry('account', './assets/account.js')
218-
// ...
218+
// ...
219219
220220
And because you just changed the ``webpack.config.js`` file, make sure to stop
221221
and restart Encore:
@@ -233,8 +233,8 @@ you need them:
233233

234234
.. code-block:: diff
235235
236-
{# templates/.../checkout.html.twig #}
237-
{% extends 'base.html.twig' %}
236+
{# templates/.../checkout.html.twig #}
237+
{% extends 'base.html.twig' %}
238238
239239
+ {% block stylesheets %}
240240
+ {{ parent() }}
@@ -263,20 +263,20 @@ file to ``app.scss`` and update the ``import`` statement:
263263

264264
.. code-block:: diff
265265
266-
// assets/app.js
266+
// assets/app.js
267267
- import './styles/app.css';
268268
+ import './styles/app.scss';
269269
270270
Then, tell Encore to enable the Sass pre-processor:
271271

272272
.. code-block:: diff
273273
274-
// webpack.config.js
275-
Encore
276-
// ...
274+
// webpack.config.js
275+
Encore
276+
// ...
277277
278278
+ .enableSassLoader()
279-
;
279+
;
280280
281281
Because you just changed your ``webpack.config.js`` file, you'll need to restart
282282
Encore. When you do, you'll see an error!

frontend/encore/split-chunks.rst

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ To enable this, call ``splitEntryChunks()``:
1010

1111
.. code-block:: diff
1212
13-
// webpack.config.js
14-
Encore
15-
// ...
13+
// webpack.config.js
14+
Encore
15+
// ...
1616
17-
// multiple entry files, which probably import the same code
18-
.addEntry('app', './assets/app.js')
19-
.addEntry('homepage', './assets/homepage.js')
20-
.addEntry('blog', './assets/blog.js')
21-
.addEntry('store', './assets/store.js')
17+
// multiple entry files, which probably import the same code
18+
.addEntry('app', './assets/app.js')
19+
.addEntry('homepage', './assets/homepage.js')
20+
.addEntry('blog', './assets/blog.js')
21+
.addEntry('store', './assets/store.js')
2222
2323
+ .splitEntryChunks()
2424
@@ -54,11 +54,11 @@ this plugin with the ``configureSplitChunks()`` function:
5454

5555
.. code-block:: diff
5656
57-
// webpack.config.js
58-
Encore
59-
// ...
57+
// webpack.config.js
58+
Encore
59+
// ...
6060
61-
.splitEntryChunks()
61+
.splitEntryChunks()
6262
+ .configureSplitChunks(function(splitChunks) {
6363
+ // change the configuration
6464
+ splitChunks.minSize = 0;

0 commit comments

Comments
 (0)