Skip to content

Commit

Permalink
Merge pull request #837 from DerManoMann/php8-token-fix
Browse files Browse the repository at this point in the history
Fix PHP8 token values to be compatible with other packages
  • Loading branch information
DerManoMann authored Sep 1, 2020
2 parents 7f4b9e0 + f061d4d commit d61e2a4
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
define('OpenApi\Processors\UNDEFINED', UNDEFINED);
}

if (false === defined('T_NAME_QUALIFIED')) {
/*
* PHP8 only token.
*/
define('T_NAME_QUALIFIED', -1);
define('T_NAME_FULLY_QUALIFIED', -1);
// PHP 8.0
if (!defined('T_NAME_QUALIFIED')) {
define('T_NAME_QUALIFIED', -4);
}
if (!defined('T_NAME_FULLY_QUALIFIED')) {
define('T_NAME_FULLY_QUALIFIED', -5);
}

if (function_exists('OpenApi\scan') === false) {
Expand Down

0 comments on commit d61e2a4

Please sign in to comment.