Skip to content

Commit 81203f6

Browse files
committed
#31345: Alternative way to fix missing constants
1 parent 422f73c commit 81203f6

File tree

2 files changed

+8
-14
lines changed

2 files changed

+8
-14
lines changed

app/autoload.php

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,6 @@
1717

1818
\define('VENDOR_PATH', BP . '/app/etc/vendor_path.php');
1919

20-
/**
21-
* Ensure php backwards compatibility of laminas-code module
22-
*
23-
* Can be removed once https://github.com/laminas/laminas-code/pull/73 is released to 3.5.x
24-
* or PHP minimum version is 8.0
25-
* or laminas-code module is updated to version 4.0+ with tested PHP 7.4+ support
26-
*/
27-
if (!defined('T_NAME_QUALIFIED')) {
28-
define('T_NAME_QUALIFIED', 24001);
29-
}
30-
if (! defined('T_NAME_FULLY_QUALIFIED')) {
31-
define('T_NAME_FULLY_QUALIFIED', 24002);
32-
}
33-
3420
if (!\is_readable(VENDOR_PATH)) {
3521
throw new \Exception(
3622
'We can\'t read some files that are required to run the Magento application. '

setup/src/Magento/Setup/Module/Di/Code/Reader/FileScanner.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,14 @@ protected function scan()
3838
define('T_TRAIT', 42001);
3939
}
4040

41+
// ensure php backwards compatibility (from laminas code 3.5.x)
42+
if (! defined('T_NAME_QUALIFIED')) {
43+
define('T_NAME_QUALIFIED', 24001);
44+
}
45+
if (! defined('T_NAME_FULLY_QUALIFIED')) {
46+
define('T_NAME_FULLY_QUALIFIED', 24002);
47+
}
48+
4149
/**
4250
* Variables & Setup
4351
*/

0 commit comments

Comments
 (0)