Skip to content

Commit e22980b

Browse files
committed
Merge remote-tracking branch 'upstream/3.3' into 3.3
2 parents 0551bc8 + b29f615 commit e22980b

File tree

7 files changed

+74
-55
lines changed

7 files changed

+74
-55
lines changed

components/workflow.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ these statuses are called **places**. You can define the workflow like this::
4444
use Symfony\Component\Workflow\Workflow;
4545
use Symfony\Component\Workflow\MarkingStore\SingleStateMarkingStore;
4646

47-
$definition = new DefinitionBuilder();
48-
$definition->addPlaces(['draft', 'review', 'rejected', 'published'])
47+
$definitionBuilder = new DefinitionBuilder();
48+
$definition = $definitionBuilder->addPlaces(['draft', 'review', 'rejected', 'published'])
4949
// Transitions are defined with a unique name, an origin place and a destination place
5050
->addTransition(new Transition('to_review', 'draft', 'review'))
5151
->addTransition(new Transition('publish', 'review', 'published'))

contributing/code/standards.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,8 @@ Service Naming Conventions
226226
Documentation
227227
-------------
228228

229-
* Add PHPDoc blocks for all classes, methods, and functions;
229+
* Add PHPDoc blocks for all classes, methods, and functions (though you may
230+
be asked to remove PHPDoc that do not add value);
230231

231232
* Group annotations together so that annotations of the same type immediately
232233
follow each other, and annotations of a different type are separated by a

frontend/encore/babel.rst

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,39 @@ Need to extend the Babel configuration further? The easiest way is via
1919
// first, install any presets you want to use (e.g. yarn add babel-preset-es2017)
2020
// then, modify the default Babel configuration
2121
.configureBabel(function(babelConfig) {
22+
// add additional presets
2223
babelConfig.presets.push('es2017');
24+
25+
// no plugins are added by default, but you can add some
26+
// babelConfig.plugins = ['styled-jsx/babel'];
2327
})
2428
;
2529
26-
You can also create a standard ``.babelrc`` file at the root of your project.
27-
Just make sure to configure it with all the presets you need: as soon as a
28-
``.babelrc`` is present, Encore can no longer add *any* Babel configuration for
29-
you!
30+
Creating a .babelrc File
31+
------------------------
32+
33+
Instead of calling ``configureBabel()``, you could create a ``.babelrc`` file
34+
at the root of your project. This is a more "standard" way of configuring
35+
Babel, but it has a downside: as soon as a ``.babelrc`` file is present,
36+
**Encore can no longer add any Babel configuration for you**. For example,
37+
if you call ``Encore.enableReactPreset()``, the ``react`` preset will *not*
38+
automatically be added to Babel: you must add it yourself in ``.babelrc``.
39+
40+
An example ``.babelrc`` file might look like this:
41+
42+
.. code-block:: json
43+
44+
{
45+
presets: [
46+
['env', {
47+
modules: false,
48+
targets: {
49+
browsers: '> 1%',
50+
uglify: true
51+
},
52+
useBuiltIns: true
53+
}]
54+
]
55+
}
3056
3157
.. _`Babel`: http://babeljs.io/

reference/constraints/Blank.rst

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
11
Blank
22
=====
33

4-
Validates that a value is blank, defined as equal to a blank string or equal
5-
to ``null``. To force that a value strictly be equal to ``null``, see the
6-
:doc:`/reference/constraints/IsNull` constraint. To force that a value is
7-
*not* blank, see :doc:`/reference/constraints/NotBlank`.
4+
Validates that a value is blank - meaning equal to an empty string or ``null``::
5+
6+
if ('' !== $value && null !== $value) {
7+
// validation will fail
8+
}
9+
10+
To force that a value strictly be equal to ``null``, see the
11+
:doc:`/reference/constraints/IsNull` constraint.
12+
13+
14+
To force that a value is *not* blank, see :doc:`/reference/constraints/NotBlank`.
15+
But be careful as ``NotBlank`` is *not* strictly the opposite of ``Blank``.
816

917
+----------------+---------------------------------------------------------------------+
1018
| Applies to | :ref:`property or method <validation-property-target>` |

reference/constraints/NotBlank.rst

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
NotBlank
22
========
33

4-
Validates that a value is not blank, defined as not strictly ``false``,
5-
not equal to a blank string and also not equal to ``null``. To force that
6-
a value is simply not equal to ``null``, see the
4+
Validates that a value is not blank - meaning not equal to a blank string,
5+
a blank array or ``null``::
6+
7+
if (false === $value || (empty($value) && '0' != $value)) {
8+
// validation will fail
9+
}
10+
11+
To force that a value is simply not equal to ``null``, see the
712
:doc:`/reference/constraints/NotNull` constraint.
813

914
+----------------+------------------------------------------------------------------------+

reference/requirements.rst

Lines changed: 18 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -6,50 +6,29 @@
66
Requirements for Running Symfony
77
================================
88

9-
To run Symfony, your system needs to adhere to a list of requirements. You
10-
can easily see if your system passes all requirements by running the
11-
``web/config.php`` in your Symfony distribution. Since the CLI often uses
12-
a different ``php.ini`` configuration file, it's also a good idea to check
13-
your requirements from the command line via:
9+
Symfony 3.3 requires **PHP 5.5.9** or higher to run, in addition to other minor
10+
requirements. To make things simple, Symfony provides a tool to quickly check if
11+
your system meets all those requirements.
1412

15-
.. code-block:: terminal
16-
17-
$ php bin/symfony_requirements
18-
19-
Below is the list of required and optional requirements.
13+
Beware that PHP can define a different configuration for the command console and
14+
the web server, so you need to check requirements in both environments.
2015

21-
Required
22-
--------
16+
Checking Requirements for the Web Server
17+
----------------------------------------
2318

24-
* PHP needs to be a minimum version of PHP 5.5.9
25-
* `JSON extension`_ needs to be enabled
26-
* `ctype extension`_ needs to be enabled
27-
* Your ``php.ini`` needs to have the ``date.timezone`` setting
19+
Symfony includes a ``config.php`` file in the ``web/`` directory of your project.
20+
Open that file with your browser to check the requirements.
2821

29-
Optional
30-
--------
22+
Once you've fixed all the reported issues, delete the ``web/config.php`` file
23+
to avoid leaking internal information about your application to visitors.
3124

32-
* You need to have the PHP-XML module installed
33-
* You need to have at least version 2.6.21 of libxml
34-
* PHP tokenizer needs to be enabled
35-
* mbstring functions need to be enabled
36-
* iconv needs to be enabled
37-
* POSIX needs to be enabled (only on \*nix)
38-
* Intl needs to be installed with ICU 4+
39-
* APC 3.0.17+ (or another opcode cache needs to be installed)
40-
* ``php.ini`` recommended settings
25+
Checking Requirements for the Command Console
26+
---------------------------------------------
4127

42-
* ``short_open_tag = Off``
43-
* ``magic_quotes_gpc = Off``
44-
* ``register_globals = Off``
45-
* ``session.auto_start = Off``
28+
Open your console or terminal, enter in your project directory, execute this
29+
command and fix the reported issues:
4630

47-
Doctrine
48-
--------
49-
50-
If you want to use Doctrine, you will need to have PDO installed. Additionally,
51-
you need to have the PDO driver installed for the database server you want
52-
to use.
31+
.. code-block:: terminal
5332
54-
.. _`JSON extension`: https://php.net/manual/book.json.php
55-
.. _`ctype extension`: https://php.net/manual/book.ctype.php
33+
$ cd my-project/
34+
$ php bin/symfony_requirements

service_container/3.3-di-changes.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ Symfony Standard Edition:
7878
7979
<prototype namespace="AppBundle\" resource="../../src/AppBundle/*" exclude="../../src/AppBundle/{Entity,Repository}" />
8080
81-
<prototype namespace="AppBundle\Controller" resource="../../src/AppBundle/Controller" public="true">
81+
<prototype namespace="AppBundle\Controller\" resource="../../src/AppBundle/Controller" public="true">
8282
<tag name="controller.service_arguments" />
8383
</prototype>
8484
</services>
@@ -338,7 +338,7 @@ The third big change is that, in a new Symfony 3.3 project, your controllers are
338338
<services>
339339
<!-- ... -->
340340
341-
<prototype namespace="AppBundle\Controller" resource="../../src/AppBundle/Controller" public="true">
341+
<prototype namespace="AppBundle\Controller\" resource="../../src/AppBundle/Controller" public="true">
342342
<tag name="controller.service_arguments" />
343343
</prototype>
344344
</services>

0 commit comments

Comments
 (0)