Skip to content

Commit f9f183a

Browse files
committed
Always fix WP stubs on PHP 7.3+
props. @Daisuke-sama
1 parent 3a18446 commit f9f183a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Composer/FixWpStubs.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ class FixWpStubs
1313

1414
public static function php73Polyfill(Event $event): int
1515
{
16-
if (! class_exists('\Symfony\Polyfill\Php73\Php73')) {
16+
// Bail out if PHP version is lower than 7.3 and Symfony polyfill is not present.
17+
if (-1 === version_compare(PHP_VERSION, '7.3') && ! class_exists('\Symfony\Polyfill\Php73\Php73')) {
1718
return 0;
1819
}
1920

0 commit comments

Comments
 (0)