You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/ModelParser/JMSParser.php
+30-9Lines changed: 30 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,13 @@
4
4
5
5
namespaceLiip\MetadataParser\ModelParser;
6
6
7
+
/*
8
+
* We need different class definitions for PHP 8.1 and newer, and one for versions older than 8.1.
9
+
* There was a JMS annotation "ReadOnly", but readonly became a reserved keyword in PHP 8.1.
10
+
* For PHP 8.0 and older, we must still support the ReadOnly annotation, even with older versions of JMS serializer where ReadOnly does not yet extend ReadOnlyProperty.
11
+
* For PHP 8.1, our code can not mention ReadOnly. If we do, we get a parse error.
// ReadOnly is deprecated since JMS serializer 3.14.
19
+
// In older versions, ReadOnlyProperty does not exist and we need to explicitly check for ReadOnly until we mark this library as conflicting with jms serializer < 3.14
0 commit comments