@@ -70,6 +70,10 @@ public static function getAdditionalConfigFiles(): array
7070
7171 public static function setUpBeforeClass (): void
7272 {
73+ if (PHP_VERSION_ID < 80100 ) {
74+ self ::markTestSkipped ('Test uses asserts without stringification, those work only with PHP >= 8.1. Stringification is tested in platform test. ' );
75+ }
76+
7377 $ em = require __DIR__ . '/../data/QueryResult/entity-manager.php ' ;
7478 self ::$ em = $ em ;
7579
@@ -162,17 +166,15 @@ public static function setUpBeforeClass(): void
162166 $ em ->persist ($ child );
163167 }
164168
165- if (property_exists (Column::class, 'enumType ' ) && PHP_VERSION_ID >= 80100 ) {
166- assert (class_exists (StringEnum::class));
167- assert (class_exists (IntEnum::class));
169+ assert (class_exists (StringEnum::class));
170+ assert (class_exists (IntEnum::class));
168171
169- $ entityWithEnum = new EntityWithEnum ();
170- $ entityWithEnum ->id = '1 ' ;
171- $ entityWithEnum ->stringEnumColumn = StringEnum::A;
172- $ entityWithEnum ->intEnumColumn = IntEnum::A;
173- $ entityWithEnum ->intEnumOnStringColumn = IntEnum::A;
174- $ em ->persist ($ entityWithEnum );
175- }
172+ $ entityWithEnum = new EntityWithEnum ();
173+ $ entityWithEnum ->id = '1 ' ;
174+ $ entityWithEnum ->stringEnumColumn = StringEnum::A;
175+ $ entityWithEnum ->intEnumColumn = IntEnum::A;
176+ $ entityWithEnum ->intEnumOnStringColumn = IntEnum::A;
177+ $ em ->persist ($ entityWithEnum );
176178
177179 $ em ->flush ();
178180 }
0 commit comments