Skip to content

Commit f23cd90

Browse files
committed
support comments in array shape
use older syntax linting + stanning revert missing file remove typehint lint stan stan comments as attributes revert some stuff revert some stuff missing file styles fix make public, change const name restore tests undo multiline ignore single lines comments preceded by : add comments to arrayshapeitems, not arrayshape whoops fix various things support comment after comma add test fix order remove unused remove unused restore start on format-preserving printer comment support remove addComments support multiline comments in add flow remove comments to the right stuff support changing of comments support editing of comments delayed add fix tests remove comments handle multiple comments clean up lint lint add nowdoc stanning linting, stanning add visibility use nowdoc in a few more places set up test for adding comment to object lint remove debug thing gather comments in TokenIterator move comment handling to TokenIterator use nowdoc add consumeAll flag add more tests for array shape comments add test file for object Allow asserting the type of `$this` Update actions/checkout action to v4 Make the CI job pass after upgrading PHPStan to v1.10.34 simplify/unify parseGeneric method fix/unify callable template parsing with EOL Allow conditional type in callable return type fix template Revert "fix template" This reverts commit 655d968. restore baseline add tests for comments on callable introduce tryConsumeTokenTypeAll single-line comments only simplify getReformattedText lint linting lint
1 parent e540adc commit f23cd90

23 files changed

+1730
-551
lines changed

.github/workflows/apiref.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818

1919
steps:
2020
- name: "Checkout"
21-
uses: actions/checkout@v3
21+
uses: actions/checkout@v4
2222

2323
- name: "Install PHP"
2424
uses: "shivammathur/setup-php@v2"

.github/workflows/backward-compatibility.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717

1818
steps:
1919
- name: "Checkout"
20-
uses: actions/checkout@v3
20+
uses: actions/checkout@v4
2121
with:
2222
fetch-depth: 0
2323

.github/workflows/build.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525

2626
steps:
2727
- name: "Checkout"
28-
uses: actions/checkout@v3
28+
uses: actions/checkout@v4
2929

3030
- name: "Install PHP"
3131
uses: "shivammathur/setup-php@v2"
@@ -53,10 +53,10 @@ jobs:
5353

5454
steps:
5555
- name: "Checkout"
56-
uses: actions/checkout@v3
56+
uses: actions/checkout@v4
5757

5858
- name: "Checkout build-cs"
59-
uses: actions/checkout@v3
59+
uses: actions/checkout@v4
6060
with:
6161
repository: "phpstan/build-cs"
6262
path: "build-cs"
@@ -104,7 +104,7 @@ jobs:
104104

105105
steps:
106106
- name: "Checkout"
107-
uses: actions/checkout@v3
107+
uses: actions/checkout@v4
108108

109109
- name: "Install PHP"
110110
uses: "shivammathur/setup-php@v2"
@@ -144,7 +144,7 @@ jobs:
144144

145145
steps:
146146
- name: "Checkout"
147-
uses: actions/checkout@v3
147+
uses: actions/checkout@v4
148148

149149
- name: "Install PHP"
150150
uses: "shivammathur/setup-php@v2"

.github/workflows/create-tag.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
runs-on: "ubuntu-latest"
2222
steps:
2323
- name: "Checkout"
24-
uses: actions/checkout@v3
24+
uses: actions/checkout@v4
2525
with:
2626
fetch-depth: 0
2727
token: ${{ secrets.PHPSTAN_BOT_TOKEN }}

.github/workflows/merge-maintained-branch.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: "Checkout"
16-
uses: actions/checkout@v3
16+
uses: actions/checkout@v4
1717
- name: "Merge branch"
1818
uses: everlytic/[email protected]
1919
with:

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414

1515
steps:
1616
- name: "Checkout"
17-
uses: actions/checkout@v3
17+
uses: actions/checkout@v4
1818

1919
- name: Generate changelog
2020
id: changelog

.github/workflows/send-pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
php-version: "8.1"
1919

2020
- name: "Checkout phpstan-src"
21-
uses: actions/checkout@v3
21+
uses: actions/checkout@v4
2222
with:
2323
repository: phpstan/phpstan-src
2424
path: phpstan-src

.github/workflows/test-slevomat-coding-standard.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ jobs:
2525

2626
steps:
2727
- name: "Checkout"
28-
uses: actions/checkout@v3
28+
uses: actions/checkout@v4
2929

3030
- name: "Checkout Slevomat Coding Standard"
31-
uses: actions/checkout@v3
31+
uses: actions/checkout@v4
3232
with:
3333
repository: slevomat/coding-standard
3434
path: slevomat-cs

phpstan-baseline.neon

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,6 @@ parameters:
1010
count: 1
1111
path: src/Ast/NodeTraverser.php
1212

13-
-
14-
message: "#^Strict comparison using \\=\\=\\= between 2 and 2 will always evaluate to true\\.$#"
15-
count: 2
16-
path: src/Ast/NodeTraverser.php
17-
1813
-
1914
message: "#^Variable property access on PHPStan\\\\PhpDocParser\\\\Ast\\\\Node\\.$#"
2015
count: 1

src/Ast/Attribute.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,6 @@ final class Attribute
1313

1414
public const ORIGINAL_NODE = 'originalNode';
1515

16+
public const COMMENTS = 'comments';
17+
1618
}

0 commit comments

Comments
 (0)