Skip to content

[ are not escaped in string property value #12

@zhil

Description

@zhil

[ are not escaped in string property value. Sample code

<?php
use Trappar\AliceGenerator\FixtureGeneratorBuilder;

class MyObject
{
    public $foo;
}

$obj = new MyObject();
$obj->foo = 'bar [value]';

$yaml = FixtureGeneratorBuilder::create()->build()->generateYaml($obj);
echo $yaml;

it output

AppBundle\Command\MyObject:
    MyObject-1:
        foo: 'bar [value]'

correct output

AppBundle\Command\MyObject:
    MyObject-1:
        foo: 'bar \[value\]'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions