Skip to content

Commit ceddc04

Browse files
committed
Merge remote-tracking branch 'upstream/2.7' into 2.7
2 parents 6a8595c + 6d98380 commit ceddc04

File tree

8 files changed

+66
-45
lines changed

8 files changed

+66
-45
lines changed

contributing/code/core_team.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,10 @@ Active Core Members
8181
components and the SecurityBundle_;
8282

8383
* **Maxime Steinhausser** (`ogizanagi`_) can merge into Config_, Console_,
84-
Form_, Serializer_, DependencyInjection_, and HttpKernel_ components.
84+
Form_, Serializer_, DependencyInjection_, and HttpKernel_ components;
85+
86+
* **Tobias Nyholm** (`Nyholm`) manages the official and contrib recipes
87+
repositories.
8588

8689
* **Deciders** (``@symfony/deciders`` on GitHub):
8790

@@ -223,4 +226,4 @@ discretion of the **Project Leader**.
223226
.. _`lyrixx`: https://github.com/lyrixx/
224227
.. _`chalasr`: https://github.com/chalasr/
225228
.. _`ogizanagi`: https://github.com/ogizanagi/
226-
.. _`csarrazi`: https://github.com/csarrazi/
229+
.. _`Nyholm`: https://github.com/Nyholm

contributing/code/patches.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,22 @@ Then create a new branch off the ``2.7`` branch to work on the bugfix:
157157
The above checkout commands automatically switch the code to the newly created
158158
branch (check the branch you are working on with ``git branch``).
159159

160+
Use your Branch in an Existing Project
161+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
162+
163+
If you want to test your code in an existing project that uses ``symfony/symfony``
164+
or Symfony components, you can use the ``link`` utility provided in the Git repository
165+
you cloned previously.
166+
This tool scans the ``vendor/`` directory of your project, finds Symfony packages it
167+
uses, and replaces them by symbolic links to the ones in the Git repository.
168+
169+
.. code-block:: terminal
170+
171+
$ php link /path/to/your/project
172+
173+
Before running the ``link`` command, be sure that the dependencies of the project you
174+
want to debug are installed by running ``composer install`` inside it.
175+
160176
Work on your Patch
161177
~~~~~~~~~~~~~~~~~~
162178

deployment.rst

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,15 @@ Using Build Scripts and other Tools
7878
There are also tools to help ease the pain of deployment. Some of them have been
7979
specifically tailored to the requirements of Symfony.
8080

81-
`Capistrano`_ with `Symfony plugin`_
82-
`Capistrano`_ is a remote server automation and deployment tool written in Ruby.
83-
`Symfony plugin`_ is a plugin to ease Symfony related tasks, inspired by `Capifony`_
84-
(which works only with Capistrano 2).
81+
`EasyDeployBundle`_
82+
A Symfony bundle that adds easy deploy tools to your application.
8583

86-
`sf2debpkg`_
87-
Helps you build a native Debian package for your Symfony project.
84+
`Deployer`_
85+
This is another native PHP rewrite of Capistrano, with some ready recipes for
86+
Symfony.
87+
88+
`Ansistrano`_
89+
An Ansible role that allows you to configure a powerful deploy via YAML files.
8890

8991
`Magallanes`_
9092
This Capistrano-like deployment tool is built in PHP, and may be easier
@@ -94,13 +96,14 @@ specifically tailored to the requirements of Symfony.
9496
This Python-based library provides a basic suite of operations for executing
9597
local or remote shell commands and uploading/downloading files.
9698

97-
`Deployer`_
98-
This is another native PHP rewrite of Capistrano, with some ready recipes for
99-
Symfony.
99+
`Capistrano`_ with `Symfony plugin`_
100+
`Capistrano`_ is a remote server automation and deployment tool written in Ruby.
101+
`Symfony plugin`_ is a plugin to ease Symfony related tasks, inspired by `Capifony`_
102+
(which works only with Capistrano 2).
103+
104+
`sf2debpkg`_
105+
Helps you build a native Debian package for your Symfony project.
100106

101-
Bundles
102-
There are some `bundles that add deployment features`_ directly into your
103-
Symfony console.
104107

105108
Basic scripting
106109
You can of course use shell, `Ant`_ or any other build tool to script
@@ -212,10 +215,11 @@ other potential things like pushing assets to a CDN (see `Common Post-Deployment
212215
.. _`Capistrano`: http://capistranorb.com/
213216
.. _`sf2debpkg`: https://github.com/liip/sf2debpkg
214217
.. _`Fabric`: http://www.fabfile.org/
218+
.. _`Ansistrano`: https://ansistrano.com/
215219
.. _`Magallanes`: https://github.com/andres-montanez/Magallanes
216220
.. _`Ant`: http://blog.sznapka.pl/deploying-symfony2-applications-with-ant
217-
.. _`bundles that add deployment features`: https://github.com/search?utf8=✓&q=topic%3Asymfony-bundle+topic%3Adeploy&type=Repositories&ref=searchresults
218221
.. _`Memcached`: http://memcached.org/
219222
.. _`Redis`: http://redis.io/
220223
.. _`Symfony plugin`: https://github.com/capistrano/symfony/
221224
.. _`Deployer`: http://deployer.org/
225+
.. _`EasyDeployBundle`: https://github.com/EasyCorp/easy-deploy-bundle

doctrine/event_listeners_subscribers.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,14 +131,14 @@ a ``postPersist()`` method, which will be called when the event is dispatched::
131131
{
132132
public function postPersist(LifecycleEventArgs $args)
133133
{
134-
$object = $args->getObject();
134+
$entity = $args->getEntity();
135135

136136
// only act on some "Product" entity
137-
if (!$object instanceof Product) {
137+
if (!$entity instanceof Product) {
138138
return;
139139
}
140140

141-
$objectManager = $args->getObjectManager();
141+
$entityManager = $args->getEntityManager();
142142
// ... do something with the Product
143143
}
144144
}
@@ -195,7 +195,7 @@ interface and have an event method for each event it subscribes to::
195195

196196
public function index(LifecycleEventArgs $args)
197197
{
198-
$entity = $args->getObject();
198+
$entity = $args->getEntity();
199199

200200
// perhaps you only want to act on some "Product" entity
201201
if ($entity instanceof Product) {

form/without_class.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ an array.
6363
Adding Validation
6464
~~~~~~~~~~~~~~~~~
6565

66-
The only missing piece is validation. Usually, when you call ``$form->isValid()``,
66+
The only missing piece is validation. Usually, when you call ``$form->handleRequest($request)``,
6767
the object is validated by reading the constraints that you applied to that
6868
class. If your form is mapped to an object (i.e. you're using the ``data_class``
6969
option or passing an object to your form), this is almost always the approach

performance.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,12 @@ real and absolute file system paths. This increases the performance for
7979
applications like Symfony that open many PHP files, especially on Windows
8080
systems.
8181

82-
By default, PHP sets a ``realpath_cache_size`` of ``16K`` which is too low for
83-
Symfony. Consider updating this value at least to ``4096K``. In addition, cached
84-
paths are only stored for ``120`` seconds by default. Consider updating this
85-
value too using the ``realpath_cache_ttl`` option:
82+
Consider increasing the ``realpath_cache_size`` and ``realpath_cache_ttl``:
8683

8784
.. code-block:: ini
8885
8986
; php.ini
87+
; 4096k is the default value in PHP 7.2
9088
realpath_cache_size=4096K
9189
realpath_cache_ttl=600
9290

reference/constraints/Expression.rst

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,6 @@ One way to accomplish this is with the Expression constraint:
6060

6161
.. configuration-block::
6262

63-
.. code-block:: yaml
64-
65-
# src/AppBundle/Resources/config/validation.yml
66-
AppBundle\Model\BlogPost:
67-
constraints:
68-
- Expression:
69-
expression: "this.getCategory() in ['php', 'symfony'] or !this.isTechnicalPost()"
70-
message: "If this is a tech post, the category should be either php or symfony!"
71-
7263
.. code-block:: php-annotations
7364
7465
// src/AppBundle/Model/BlogPost.php
@@ -87,6 +78,15 @@ One way to accomplish this is with the Expression constraint:
8778
// ...
8879
}
8980
81+
.. code-block:: yaml
82+
83+
# src/AppBundle/Resources/config/validation.yml
84+
AppBundle\Model\BlogPost:
85+
constraints:
86+
- Expression:
87+
expression: "this.getCategory() in ['php', 'symfony'] or !this.isTechnicalPost()"
88+
message: "If this is a tech post, the category should be either php or symfony!"
89+
9090
.. code-block:: xml
9191
9292
<!-- src/AppBundle/Resources/config/validation.xml -->
@@ -141,16 +141,6 @@ more about the expression language syntax, see
141141

142142
.. configuration-block::
143143

144-
.. code-block:: yaml
145-
146-
# src/AppBundle/Resources/config/validation.yml
147-
AppBundle\Model\BlogPost:
148-
properties:
149-
isTechnicalPost:
150-
- Expression:
151-
expression: "this.getCategory() in ['php', 'symfony'] or value == false"
152-
message: "If this is a tech post, the category should be either php or symfony!"
153-
154144
.. code-block:: php-annotations
155145
156146
// src/AppBundle/Model/BlogPost.php
@@ -173,6 +163,16 @@ more about the expression language syntax, see
173163
// ...
174164
}
175165
166+
.. code-block:: yaml
167+
168+
# src/AppBundle/Resources/config/validation.yml
169+
AppBundle\Model\BlogPost:
170+
properties:
171+
isTechnicalPost:
172+
- Expression:
173+
expression: "this.getCategory() in ['php', 'symfony'] or value == false"
174+
message: "If this is a tech post, the category should be either php or symfony!"
175+
176176
.. code-block:: xml
177177
178178
<!-- src/AppBundle/Resources/config/validation.xml -->

service_container.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Find out by running:
6060

6161
.. code-block:: terminal
6262
63-
$ php bin/console debug:container
63+
$ php app/console debug:container
6464
6565
This is just a *small* sample of the output:
6666

@@ -222,7 +222,7 @@ and set it on a ``$logger`` property::
222222

223223
The ``LoggerInterface`` type-hint in the ``__construct()`` method is optional,
224224
but a good idea. You can find the correct type-hint by reading the docs for the
225-
service or by using the ``php bin/console debug:container`` console command.
225+
service or by using the ``php app/console debug:container`` console command.
226226

227227
Next, tell the container the service has a constructor argument:
228228

0 commit comments

Comments
 (0)