Skip to content

Commit d082bf6

Browse files
committed
Merge branch '4.4' into 5.1
* 4.4: Add namespace into service_container.rst file Fix Typo Update doctrine.rst Update database.rst [Workflow] Update workflow.rst
2 parents 54cb14d + ff401de commit d082bf6

File tree

5 files changed

+16
-4
lines changed

5 files changed

+16
-4
lines changed

doctrine.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,13 @@ The database connection information is stored as an environment variable called
4444
# .env (or override DATABASE_URL in .env.local to avoid committing your changes)
4545
4646
# customize this line!
47-
DATABASE_URL="mysql://db_user:db_password@127.0.0.1:3306/db_name"
47+
DATABASE_URL="mysql://db_user:db_password@127.0.0.1:3306/db_name?serverVersion=5.7"
4848
4949
# to use sqlite:
5050
# DATABASE_URL="sqlite:///%kernel.project_dir%/var/app.db"
51+
52+
# to use postgresql:
53+
# DATABASE_URL="postgresql://db_user:db_password@127.0.0.1:5432/db_name?serverVersion=11&charset=utf8"
5154
5255
.. caution::
5356

http_client.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ automatically when type-hinting for :class:`Symfony\\Component\\HttpClient\\Http
7777
7878
.. tip::
7979

80-
The HTTP client is interopable with many common HTTP client abstractions in
80+
The HTTP client is interoperable with many common HTTP client abstractions in
8181
PHP. You can also use any of these abstractions to profit from autowirings.
8282
See `Interoperability`_ for more information.
8383

service_container.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,8 @@ Now, this new service is ready to be used. In a controller, for example,
331331
you can type-hint the new ``SiteUpdateManager`` class and use it::
332332

333333
// src/Controller/SiteController.php
334-
334+
namespace App\Controller;
335+
335336
// ...
336337
use App\Updates\SiteUpdateManager;
337338

testing/database.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ your project and define the new value for the ``DATABASE_URL`` env var:
1515
.. code-block:: bash
1616
1717
# .env.test.local
18-
DATABASE_URL=mysql://USERNAME:PASSWORD@127.0.0.1/DB_NAME
18+
DATABASE_URL=mysql://USERNAME:PASSWORD@127.0.0.1:3306/DB_NAME?serverVersion=5.7
1919
2020
.. tip::
2121

workflow.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -665,6 +665,9 @@ of domain logic in your templates:
665665

666666
``workflow_has_marked_place()``
667667
Returns ``true`` if the marking of the given object has the given state.
668+
669+
``workflow_transition_blockers()``
670+
Returns :class:`Symfony\\Component\\Workflow\\TransitionBlockerList` for the given transition.
668671

669672
The following example shows these functions in action:
670673

@@ -697,6 +700,11 @@ The following example shows these functions in action:
697700
{% if 'reviewed' in workflow_marked_places(post) %}
698701
<span class="label">Reviewed</span>
699702
{% endif %}
703+
704+
{# Loop through the transition blockers #}
705+
{% for blocker in workflow_transition_blockers(post, 'publish') %}
706+
<span class="error">{{ blocker.message }}</span>
707+
{% endfor %}
700708

701709
Storing Metadata
702710
----------------

0 commit comments

Comments
 (0)