Repository navigation
Run rector-src tests and PHPStan with this phpdoc-parser - #332
Merged
Merged
Conversation
Comment on lines
+36
to
+37
| - name: "Checkout" | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 |
Comment on lines
+39
to
+44
| - name: "Checkout rector-src" | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| repository: rectorphp/rector-src | ||
| path: rector-src | ||
| ref: main |
Comment on lines
+36
to
+41
| - name: "Checkout phpstan-src" | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| repository: phpstan/phpstan-src | ||
| path: phpstan-src | ||
| ref: 2.3.x |
| ref: main | ||
|
|
||
| - name: "Install PHP" | ||
| uses: "shivammathur/setup-php@eb7c497e18156a6bbabfef1d3a82760b9eda3962" # v2 |
| with: | ||
| repository: phpstan/phpstan-src | ||
| path: phpstan-src | ||
| ref: 2.3.x |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a workflow that runs Rector against this repository's phpdoc-parser:
2.3.x, replacesvendor/phpstan/phpdoc-parser/srcwith this repository'ssrc/, and compilesphpstan.pharthe same way phpstan-src's PHAR workflow does (compiler/bin/prepare,composer dump,box compile).main, replaces bothvendor/phpstan/phpdoc-parser/srcandvendor/phpstan/phpstan/phpstan.phar. Rector's bootstrap does not loadPHPStan\PhpDocParser\classes from the PHAR, so both copies have to be replaced.vendor/bin/fastunit tests rules-tests utils/phpstan/tests, PHP 8.4 and 8.5) andvendor/bin/phpstan analyse(PHP 8.4, the same version Rector's own CI uses; on PHP 8.5 PHPStan reports errors in Rector's code about null array keys and$argv, which Rector does not fix yet).Ran the same steps locally on PHP 8.4: the compiled PHAR contains this repository's phpdoc-parser, Rector's tests passed, and PHPStan reported no errors.
Amp thread: https://ampcode.com/threads/T-01a179a5-580c-7253-9c42-00ace3f03617