Skip to content

Commit aba11b6

Browse files
committed
Merge branch 'PHP-8.2'
* PHP-8.2: Generate constant declarations with the CONST_CS flag for PHP 7.x
2 parents 4650a8c + 69ef324 commit aba11b6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

build/gen_stub.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1968,6 +1968,10 @@ private function getGlobalConstDeclaration(EvaluatedValue $value, iterable $allC
19681968
$cConstValue = $value->getCConstValue($allConstInfos);
19691969

19701970
$flags = "CONST_PERSISTENT";
1971+
if ($this->phpVersionIdMinimumCompatibility !== null && $this->phpVersionIdMinimumCompatibility < 80000) {
1972+
$flags .= " | CONST_CS";
1973+
}
1974+
19711975
if ($this->isDeprecated) {
19721976
$flags .= " | CONST_DEPRECATED";
19731977
}

0 commit comments

Comments
 (0)