Phinx: Migration issue with v0.9.2

Created on 11 Mar 2018  路  2Comments  路  Source: cakephp/phinx

I noticed the following error in the latest version (0.9.2), which seems to not occur in the previous version (0.9.1).

When I run bin/phinx create InitialSetup it gives the error:

In Inline.php line 296:

  The reserved indicator "%" cannot start a plain scalar; you need to quote the scalar at line 2 (near "migrations: %%PHINX_CONFIG_DIR%%/db/migrations").  

In my phinx.yml I make use of the config placeholder, i.e. %%PHINX_CONFIG_DIR%%. Below is my phinx.yml.

paths:
    migrations: %%PHINX_CONFIG_DIR%%/db/migrations
    seeds: %%PHINX_CONFIG_DIR%%/db/seeds

environments:
    default_migration_table: phinxlog
    default_database: development

    development:
        adapter: mysql
        host: 127.0.0.1
        name: stuff
        user: stuff
        pass: 'stuff'
        port: 3306
        charset: utf8

version_order: creation

So this is an issue with the new phinx 0.9.2 version, pls rectify. Thanks.

Most helpful comment

The component that throws that error is the Symfony Yaml component. I guess it's a change to make the component more robust. Just quoting the settings will solve the problem:

paths:
    migrations: "%%PHINX_CONFIG_DIR%%/db/migrations"
    seeds: "%%PHINX_CONFIG_DIR%%/db/seeds"

All 2 comments

The component that throws that error is the Symfony Yaml component. I guess it's a change to make the component more robust. Just quoting the settings will solve the problem:

paths:
    migrations: "%%PHINX_CONFIG_DIR%%/db/migrations"
    seeds: "%%PHINX_CONFIG_DIR%%/db/seeds"

Thanks @markushausammann .

Was this page helpful?
0 / 5 - 0 ratings

Related issues

aimfeld picture aimfeld  路  23Comments

orderbynull picture orderbynull  路  19Comments

wpillar picture wpillar  路  97Comments

Bilge picture Bilge  路  28Comments

joshribakoff picture joshribakoff  路  15Comments