File tree Expand file tree Collapse file tree 5 files changed +48
-2
lines changed
fixtures/MakeEntityRegenerateEmbeddableObject Expand file tree Collapse file tree 5 files changed +48
-2
lines changed Original file line number Diff line number Diff line change @@ -1144,6 +1144,16 @@ public function getCommandEntityTests()
11441144 ])
11451145 ->setArgumentsString ('--regenerate ' )
11461146 ->setFixtureFilesPath (__DIR__ .'/../fixtures/MakeEntityRegenerateEmbeddableObject ' )
1147+ ->addReplacement (
1148+ 'config/packages/doctrine.yaml ' ,
1149+ 'type: annotation ' ,
1150+ 'type: xml '
1151+ )
1152+ ->addReplacement (
1153+ 'config/packages/doctrine.yaml ' ,
1154+ "dir: '%kernel.project_dir%/src/Entity' " ,
1155+ "dir: '%kernel.project_dir%/config/doctrine' "
1156+ )
11471157 ->configureDatabase ()
11481158 ->setRequiredPhpVersion (70100 )
11491159 ];
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2+ <doctrine-mapping xmlns =" http://doctrine-project.org/schemas/orm/doctrine-mapping"
3+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
4+ xsi : schemaLocation =" http://doctrine-project.org/schemas/orm/doctrine-mapping
5+ http://www.doctrine-project.org/schemas/orm/doctrine-mapping.xsd" >
6+ <embeddable name =" Money\Currency" >
7+ <field name =" code" type =" string" length =" 3" >
8+ <options >
9+ <option name =" fixed" >true</option >
10+ </options >
11+ </field >
12+ </embeddable >
13+ </doctrine-mapping >
Original file line number Diff line number Diff line change 1+ <doctrine-mapping xmlns =" http://doctrine-project.org/schemas/orm/doctrine-mapping"
2+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
3+ xsi : schemaLocation =" http://doctrine-project.org/schemas/orm/doctrine-mapping
4+ http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd" >
5+
6+ <entity name =" App\Entity\Invoice" >
7+ <id name =" id" type =" integer" >
8+ <generator strategy =" AUTO" />
9+ </id >
10+
11+ <field name =" street" type =" string" />
12+
13+ <embedded name =" total" class =" Money\\Money" />
14+ </entity >
15+ </doctrine-mapping >
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2+ <doctrine-mapping xmlns =" http://doctrine-project.org/schemas/orm/doctrine-mapping"
3+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
4+ xsi : schemaLocation =" http://doctrine-project.org/schemas/orm/doctrine-mapping
5+ http://www.doctrine-project.org/schemas/orm/doctrine-mapping.xsd" >
6+ <embeddable name =" Money\Money" >
7+ <field name =" amount" type =" string" />
8+ <embedded name =" currency" class =" Money\Currency" />
9+ </embeddable >
10+ </doctrine-mapping >
Original file line number Diff line number Diff line change 77use Money \Money ;
88use Symfony \Bundle \FrameworkBundle \Test \KernelTestCase ;
99use Doctrine \ORM \EntityManager ;
10- use App \Entity \Food ;
11- use App \Entity \Recipe ;
1210
1311class GeneratedEntityTest extends KernelTestCase
1412{
You can’t perform that action at this time.
0 commit comments