Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitac266f0

Browse files
committed
Merge branch '4.2'
* 4.2: Update pdo_session_storage.rts Missing > in image tagsfix#10829: add missing examples in IdenticalTo constraint Update encore/copy-files.rst: add note about using versioning with custom target path
2 parents2de7548 +382f17d commitac266f0

File tree

3 files changed

+19
-7
lines changed

3 files changed

+19
-7
lines changed

‎doctrine/pdo_session_storage.rst‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ To use it, first register a new handler service:
2323
2424
Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler:
2525
arguments:
26-
-'mysql:dbname=mydatabase, host=myhost'
26+
-'mysql:dbname=mydatabase; host=myhost; port=myport'
2727
-{ db_username: myuser, db_password: mypassword }
2828
2929
# If you're using Doctrine & want to re-use that connection, then:
@@ -61,7 +61,7 @@ To use it, first register a new handler service:
6161
6262
$storageDefinition = $container->autowire(PdoSessionHandler::class)
6363
->setArguments(array(
64-
'mysql:dbname=mydatabase, host=myhost',
64+
'mysql:dbname=mydatabase; host=myhost; port=myport',
6565
array('db_username' => 'myuser', 'db_password' => 'mypassword'),
6666
))
6767
;
@@ -123,7 +123,7 @@ a second array argument to ``PdoSessionHandler``:
123123
124124
Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler:
125125
arguments:
126-
-'mysql:dbname=mydatabase, host=myhost'
126+
-'mysql:dbname=mydatabase; host=myhost; port=myport'
127127
-{ db_table: 'sessions', db_username: 'myuser', db_password: 'mypassword' }
128128
129129
..code-block::xml
@@ -156,7 +156,7 @@ a second array argument to ``PdoSessionHandler``:
156156
157157
$container->autowire(PdoSessionHandler::class)
158158
->setArguments(array(
159-
'mysql:dbname=mydatabase, host=myhost',
159+
'mysql:dbname=mydatabase; host=myhost; port=myport',
160160
array('db_table' => 'sessions', 'db_username' => 'myuser', 'db_password' => 'mypassword')
161161
))
162162
;

‎frontend/encore/copy-files.rst‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ files into your final output directory.
4444
+ // optional target path, relative to the output dir
4545
+ //to: 'images/[path][name].[ext]',
4646
+
47+
+ // if versioning is enabled, add the file hash too
48+
+ //to: 'images/[path][name].[hash:8].[ext]',
49+
+
4750
+ // only copy files matching this pattern
4851
+ //pattern: /\.(png|jpg|jpeg)$/
4952
+ })
@@ -57,10 +60,10 @@ To render inside Twig, use the ``asset()`` function:
5760
..code-block::html+twig
5861

5962
{# assets/images/logo.png was copied to public/build/logo.png #}
60-
<img src="{{ asset('build/logo.png') }}"
63+
<img src="{{ asset('build/logo.png') }}">
6164

6265
{# assets/images/subdir/logo.png was copied to public/build/subdir/logo.png #}
63-
<img src="{{ asset('build/subdir/logo.png') }}"
66+
<img src="{{ asset('build/subdir/logo.png') }}">
6467

6568
Make sure you've enabled the:ref:`json_manifest_path<load-manifest-files>` option,
6669
which tells the ``asset()`` function to read the final paths from the ``manifest.json``

‎reference/constraints/IdenticalTo.rst‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Basic Usage
3030
The following constraints ensure that:
3131

3232
* ``firstName`` of ``Person`` class is equal to ``Mary`` *and* is a string
33-
* ``age`` is equal to``20`` *and* is of type integer
33+
* ``age`` is equal to``20`` *and* is of type integer
3434

3535
..configuration-block::
3636

@@ -61,6 +61,8 @@ The following constraints ensure that:
6161
# config/validator/validation.yaml
6262
App\Entity\Person:
6363
properties:
64+
firstName:
65+
-IdenticalTo:Mary
6466
age:
6567
-IdenticalTo:
6668
value:20
@@ -74,6 +76,11 @@ The following constraints ensure that:
7476
xsi:schemaLocation="http://symfony.com/schema/dic/constraint-mapping http://symfony.com/schema/dic/constraint-mapping/constraint-mapping-1.0.xsd">
7577
7678
<classname="App\Entity\Person">
79+
<propertyname="firstName">
80+
<constraintname="IdenticalTo">
81+
<value>Mary</value>
82+
</constraint>
83+
</property>
7784
<propertyname="age">
7885
<constraintname="IdenticalTo">
7986
<optionname="value">20</option>
@@ -94,6 +101,8 @@ The following constraints ensure that:
94101
{
95102
public static function loadValidatorMetadata(ClassMetadata $metadata)
96103
{
104+
$metadata->addPropertyConstraint('firstName', new Assert\IdenticalTo('Mary'));
105+
97106
$metadata->addPropertyConstraint('age', new Assert\IdenticalTo(array(
98107
'value' => 20,
99108
)));

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp