Skip to content

Commit c9d80db

Browse files
authored
fix: don't duplicate php8 attributes (#1821)
fixes #1820
1 parent 4da42cc commit c9d80db

4 files changed

Lines changed: 48 additions & 3 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"dependencies": {
1414
"linguist-languages": "^7.5.1",
1515
"mem": "^8.0.0",
16-
"php-parser": "https://github.com/glayzzle/php-parser#e61e26102144f267ecf5e09020865a9baa6ca2f1"
16+
"php-parser": "glayzzle/php-parser#4c5b0675f52c0baab2e5b10a4e50e5d7a79b2767"
1717
},
1818
"devDependencies": {
1919
"@babel/preset-env": "^7.7.5",

tests/attributes/__snapshots__/jsfmt.spec.js.snap

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,21 @@ interface IC {
4646
#[IG, IH('abc'),IJ()] public function ik();
4747
}
4848
49+
// issue #1820
50+
final class DomainEventMessage
51+
{
52+
#[Some(type: "some_type")]
53+
public function getPayload(): string
54+
{
55+
return "444";
56+
}
57+
58+
public function getPayload1(): string
59+
{
60+
return "555";
61+
}
62+
}
63+
4964
=====================================output=====================================
5065
<?php
5166
@@ -122,5 +137,20 @@ interface IC
122137
public function ik();
123138
}
124139
140+
// issue #1820
141+
final class DomainEventMessage
142+
{
143+
#[Some(type: "some_type")]
144+
public function getPayload(): string
145+
{
146+
return "444";
147+
}
148+
149+
public function getPayload1(): string
150+
{
151+
return "555";
152+
}
153+
}
154+
125155
================================================================================
126156
`;

tests/attributes/attributes.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,18 @@ interface IC {
3737

3838
#[IG, IH('abc'),IJ()] public function ik();
3939
}
40+
41+
// issue #1820
42+
final class DomainEventMessage
43+
{
44+
#[Some(type: "some_type")]
45+
public function getPayload(): string
46+
{
47+
return "444";
48+
}
49+
50+
public function getPayload1(): string
51+
{
52+
return "555";
53+
}
54+
}

yarn.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4250,9 +4250,9 @@ path-type@^4.0.0:
42504250
resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b"
42514251
integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==
42524252

4253-
"php-parser@https://github.com/glayzzle/php-parser#e61e26102144f267ecf5e09020865a9baa6ca2f1":
4253+
php-parser@glayzzle/php-parser#4c5b0675f52c0baab2e5b10a4e50e5d7a79b2767:
42544254
version "3.0.2"
4255-
resolved "https://github.com/glayzzle/php-parser#e61e26102144f267ecf5e09020865a9baa6ca2f1"
4255+
resolved "https://codeload.github.com/glayzzle/php-parser/tar.gz/4c5b0675f52c0baab2e5b10a4e50e5d7a79b2767"
42564256

42574257
picomatch@^2.0.4, picomatch@^2.0.5, picomatch@^2.2.1:
42584258
version "2.2.2"

0 commit comments

Comments
 (0)