Skip to content

Commit 4d1c29e

Browse files
committed
[ci] use annotations when attributes are not supported
1 parent f003e99 commit 4d1c29e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/Maker/MakeEntityTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,15 @@ private function createMakeEntityTest(bool $withDatabase = true): MakerTestDetai
4141
);
4242
}
4343

44+
// type is no longer set by default in flex.. we cant use attributes in PHP < 8.0
45+
if (isset($config['doctrine']['orm']['mappings']['App']) && !$this->useAttributes($runner)) {
46+
$runner->modifyYamlFile('config/packages/doctrine.yaml', function (array $data) {
47+
$data['doctrine']['orm']['mappings']['App']['type'] = 'annotation';
48+
49+
return $data;
50+
});
51+
}
52+
4453
if ($withDatabase) {
4554
$runner->configureDatabase();
4655
}

0 commit comments

Comments
 (0)