@@ -88,10 +88,10 @@ public function resolvePredefinedConstant(string $resolvedConstantName): ?Type
8888 $ maxMajor = null ;
8989
9090 if ($ this ->composerMinPhpVersion !== null ) {
91- $ minMajor = max ($ minMajor , $ this ->composerMinPhpVersion ->getMajor ());
91+ $ minMajor = max ($ minMajor , $ this ->composerMinPhpVersion ->getMajorVersionId ());
9292 }
9393 if ($ this ->composerMaxPhpVersion !== null ) {
94- $ maxMajor = $ this ->composerMaxPhpVersion ->getMajor ();
94+ $ maxMajor = $ this ->composerMaxPhpVersion ->getMajorVersionId ();
9595 }
9696
9797 return $ this ->createInteger ($ minMajor , $ maxMajor );
@@ -103,10 +103,10 @@ public function resolvePredefinedConstant(string $resolvedConstantName): ?Type
103103 if (
104104 $ this ->composerMinPhpVersion !== null
105105 && $ this ->composerMaxPhpVersion !== null
106- && $ this ->composerMaxPhpVersion ->getMajor () === $ this ->composerMinPhpVersion ->getMajor ()
106+ && $ this ->composerMaxPhpVersion ->getMajorVersionId () === $ this ->composerMinPhpVersion ->getMajorVersionId ()
107107 ) {
108- $ minMinor = $ this ->composerMinPhpVersion ->getMinor ();
109- $ maxMinor = $ this ->composerMaxPhpVersion ->getMinor ();
108+ $ minMinor = $ this ->composerMinPhpVersion ->getMinorVersionId ();
109+ $ maxMinor = $ this ->composerMaxPhpVersion ->getMinorVersionId ();
110110 }
111111
112112 return $ this ->createInteger ($ minMinor , $ maxMinor );
@@ -118,11 +118,11 @@ public function resolvePredefinedConstant(string $resolvedConstantName): ?Type
118118 if (
119119 $ this ->composerMinPhpVersion !== null
120120 && $ this ->composerMaxPhpVersion !== null
121- && $ this ->composerMaxPhpVersion ->getMajor () === $ this ->composerMinPhpVersion ->getMajor ()
122- && $ this ->composerMaxPhpVersion ->getMinor () === $ this ->composerMinPhpVersion ->getMinor ()
121+ && $ this ->composerMaxPhpVersion ->getMajorVersionId () === $ this ->composerMinPhpVersion ->getMajorVersionId ()
122+ && $ this ->composerMaxPhpVersion ->getMinorVersionId () === $ this ->composerMinPhpVersion ->getMinorVersionId ()
123123 ) {
124- $ minRelease = $ this ->composerMinPhpVersion ->getPatch ();
125- $ maxRelease = $ this ->composerMaxPhpVersion ->getPatch ();
124+ $ minRelease = $ this ->composerMinPhpVersion ->getPatchVersionId ();
125+ $ maxRelease = $ this ->composerMaxPhpVersion ->getPatchVersionId ();
126126 }
127127
128128 return $ this ->createInteger ($ minRelease , $ maxRelease );
0 commit comments