From f061d4d16ab3d24b43f6c62edcae960806aa4654 Mon Sep 17 00:00:00 2001 From: DerManoMann Date: Tue, 1 Sep 2020 10:06:37 +1200 Subject: [PATCH] Fix PHP8 token values to be compatible with other packages --- src/functions.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/functions.php b/src/functions.php index c9004d7ad..0d0f5ad8e 100644 --- a/src/functions.php +++ b/src/functions.php @@ -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) {