Skip to content

Commit 02e1888

Browse files
Harrison Hecklorenzo
Harrison Heck
authored andcommitted
Added support for symfony 4 components. (cakephp#1224)
* Added support for symfony 4 components. * Added quotes around %%..%% in yaml files. symfony/yaml:4.0 removed the deprecated support for unquoted scalars beginning with %.
1 parent 3fa84c8 commit 02e1888

7 files changed

+24
-25
lines changed

composer.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@
2525
}],
2626
"require": {
2727
"php": ">=5.4",
28-
"symfony/console": "~2.8|~3.0",
29-
"symfony/config": "~2.8|~3.0",
30-
"symfony/yaml": "~2.8|~3.0"
28+
"symfony/console": "~2.8|~3.0|~4.0",
29+
"symfony/config": "~2.8|~3.0|~4.0",
30+
"symfony/yaml": "~2.8|~3.0|~4.0"
3131
},
3232
"require-dev": {
3333
"phpunit/phpunit": "^4.8.26|^5.0",

docs/configuration.rst

+8-8
Original file line numberDiff line numberDiff line change
@@ -82,15 +82,15 @@ You can also use the ``%%PHINX_CONFIG_DIR%%`` token in your path.
8282
.. code-block:: yaml
8383
8484
paths:
85-
migrations: %%PHINX_CONFIG_DIR%%/your/relative/path
85+
migrations: '%%PHINX_CONFIG_DIR%%/your/relative/path'
8686
8787
Migrations are captured with ``glob``, so you can define a pattern for multiple
8888
directories.
8989

9090
.. code-block:: yaml
9191
9292
paths:
93-
migrations: %%PHINX_CONFIG_DIR%%/module/*/{data,scripts}/migrations
93+
migrations: '%%PHINX_CONFIG_DIR%%/module/*/{data,scripts}/migrations'
9494
9595
Custom Migration Base
9696
---------------------
@@ -137,7 +137,7 @@ You can also use the ``%%PHINX_CONFIG_DIR%%`` token in your path.
137137
.. code-block:: yaml
138138
139139
paths:
140-
seeds: %%PHINX_CONFIG_DIR%%/your/relative/path
140+
seeds: '%%PHINX_CONFIG_DIR%%/your/relative/path'
141141
142142
Environments
143143
------------
@@ -219,7 +219,7 @@ External Variables
219219
Phinx will automatically grab any environment variable prefixed with ``PHINX_``
220220
and make it available as a token in the config file. The token will have
221221
exactly the same name as the variable but you must access it by wrapping two
222-
``%%`` symbols on either side. e.g: ``%%PHINX_DBUSER%%``. This is especially
222+
``%%`` symbols on either side. e.g: ``'%%PHINX_DBUSER%%'``. This is especially
223223
useful if you wish to store your secret database credentials directly on the
224224
server and not in a version control system. This feature can be easily
225225
demonstrated by the following example:
@@ -231,10 +231,10 @@ demonstrated by the following example:
231231
default_database: development
232232
production:
233233
adapter: mysql
234-
host: %%PHINX_DBHOST%%
235-
name: %%PHINX_DBNAME%%
236-
user: %%PHINX_DBUSER%%
237-
pass: %%PHINX_DBPASS%%
234+
host: '%%PHINX_DBHOST%%'
235+
name: '%%PHINX_DBNAME%%'
236+
user: '%%PHINX_DBUSER%%'
237+
pass: '%%PHINX_DBPASS%%'
238238
port: 3306
239239
charset: utf8
240240

phinx.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
paths:
2-
migrations: %%PHINX_CONFIG_DIR%%/db/migrations
3-
seeds: %%PHINX_CONFIG_DIR%%/db/seeds
2+
migrations: '%%PHINX_CONFIG_DIR%%/db/migrations'
3+
seeds: '%%PHINX_CONFIG_DIR%%/db/seeds'
44

55
environments:
66
default_migration_table: phinxlog
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
paths:
2-
migrations: %%PHINX_CONFIG_DIR%%/migrations
3-
2+
migrations: '%%PHINX_CONFIG_DIR%%/migrations'
3+
44
environments:
55
default_migration_table: phinxlog
66
default_database: production
77
production:
88
adapter: mysql
9-
host: %%PHINX_DBHOST%%
10-
name: %%PHINX_DBNAME%%
11-
user: %%PHINX_DBUSER%%
12-
pass: %%PHINX_DBPASS%%
13-
port: %%PHINX_DBPORT%%
9+
host: '%%PHINX_DBHOST%%'
10+
name: '%%PHINX_DBNAME%%'
11+
user: '%%PHINX_DBUSER%%'
12+
pass: '%%PHINX_DBPASS%%'
13+
port: '%%PHINX_DBPORT%%'

tests/Phinx/Config/_files/missing_environment_entry.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
paths:
2-
migrations: %%PHINX_CONFIG_DIR%%/db/migrations
2+
migrations: '%%PHINX_CONFIG_DIR%%/db/migrations'
33

44
environments:
55
default_migration_table: phinxlog

tests/Phinx/Config/_files/no_default_database_key.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
paths:
2-
migrations: %%PHINX_CONFIG_DIR%%/migrations
2+
migrations: '%%PHINX_CONFIG_DIR%%/migrations'
33

44
environments:
55
default_migration_table: phinxlog
@@ -34,4 +34,3 @@ environments:
3434
user: root
3535
pass: ''
3636
port: 3306
37-

tests/Phinx/Config/_files/seeds.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
paths:
2-
migrations: %%PHINX_CONFIG_DIR%%/db/migrations
3-
seeds: %%PHINX_CONFIG_DIR%%/db/seeds
2+
migrations: '%%PHINX_CONFIG_DIR%%/db/migrations'
3+
seeds: '%%PHINX_CONFIG_DIR%%/db/seeds'
44

55
environments:
66
default_migration_table: phinxlog

0 commit comments

Comments
 (0)