From 29da192f9e2c9db25e02dacf511c6eced111f34f Mon Sep 17 00:00:00 2001 From: Shuhei Hayashibara Date: Tue, 31 Dec 2024 01:59:34 +0900 Subject: [PATCH 1/2] =?UTF-8?q?chore:=20=F0=9F=A4=96=20bump=20php-parser?= =?UTF-8?q?=20from=203.1.5=20to=203.2.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 0ea9d0bcd..d72c9f3a8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5008,9 +5008,9 @@ path-type@^4.0.0: integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== php-parser@^3.1.5: - version "3.1.5" - resolved "https://registry.yarnpkg.com/php-parser/-/php-parser-3.1.5.tgz#84500e5b5c6a0907e32c38b931bb4e7d3f275026" - integrity sha512-jEY2DcbgCm5aclzBdfW86GM6VEIWcSlhTBSHN1qhJguVePlYe28GhwS0yoeLYXpM2K8y6wzLwrbq814n2PHSoQ== + version "3.2.1" + resolved "https://registry.yarnpkg.com/php-parser/-/php-parser-3.2.1.tgz#960916dc03e4979a59435f9dd9eb03f2e86d8126" + integrity sha512-WT5AMqe39ZdqAxp9Yp7uR6e3clBWlT1dxHHs49GmnDx2d+975NEiLSVy2tRGLdSC9tgdQOLiN1Yz54g1d2cZDQ== picocolors@^1.0.0: version "1.0.0" From 9d0fa7806c1589edbaecdca31143787c60af2b30 Mon Sep 17 00:00:00 2001 From: Shuhei Hayashibara Date: Tue, 31 Dec 2024 02:00:37 +0900 Subject: [PATCH 2/2] =?UTF-8?q?test:=20=F0=9F=92=8D=20add=20test=20for=20r?= =?UTF-8?q?eserved=20keyword=20after=20null-safe=20operator?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../__snapshots__/jsfmt.spec.mjs.snap | 28 +++++++++++++++++++ .../reserved-keyword.php | 8 ++++++ 2 files changed, 36 insertions(+) create mode 100644 tests/nullsafepropertylookup/reserved-keyword.php diff --git a/tests/nullsafepropertylookup/__snapshots__/jsfmt.spec.mjs.snap b/tests/nullsafepropertylookup/__snapshots__/jsfmt.spec.mjs.snap index 277db0f0a..2d90ad71b 100644 --- a/tests/nullsafepropertylookup/__snapshots__/jsfmt.spec.mjs.snap +++ b/tests/nullsafepropertylookup/__snapshots__/jsfmt.spec.mjs.snap @@ -76,3 +76,31 @@ $obj->aaaaaaaaaaaaaaaaaaaaaaaa() ================================================================================ `; + +exports[`reserved-keyword.php 1`] = ` +====================================options===================================== +parsers: ["php"] +phpVersion: "8.0" +printWidth: 80 + | printWidth +=====================================input====================================== +metaData?->abstract; + +// keyword: class +echo $record->learner->currentEnrollment?->class->grade->code; + + +=====================================output===================================== +metaData?->abstract; + +// keyword: class +echo $record->learner->currentEnrollment?->class->grade->code; + +================================================================================ +`; diff --git a/tests/nullsafepropertylookup/reserved-keyword.php b/tests/nullsafepropertylookup/reserved-keyword.php new file mode 100644 index 000000000..a12045b73 --- /dev/null +++ b/tests/nullsafepropertylookup/reserved-keyword.php @@ -0,0 +1,8 @@ +metaData?->abstract; + +// keyword: class +echo $record->learner->currentEnrollment?->class->grade->code; +