-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added phpstan config with baseline #126
base: master
Are you sure you want to change the base?
Conversation
9753b3f
to
4aedf19
Compare
If the test folder were not a mess, I would put the baseline file there. |
103623d
to
2e181a1
Compare
3ca2a81
to
7c0cbea
Compare
the baseline is quite big, we should use the php format of the baseline to improve performances in the analysis hint: just generate the baseline with .php as exension, phpstan will do the rest ;-) |
We should use |
neon is smaller |
ac2e5e4
to
41684a2
Compare
True, but: https://phpstan.org/user-guide/baseline#php-baseline-format-instead-of-neon
WDYT? |
php-version: 8.3 | ||
tools: cs2pr | ||
|
||
- name: Install dependencies with Composer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest to simplify this action and introduce a composer cache like suggested here:
https://github.com/shivammathur/setup-php?tab=readme-ov-file#cache-composer-dependencies
Something like:
- name: Get composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache dependencies
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install dependencies
run: composer install --prefer-dist```
41684a2
to
402a978
Compare
I missed that point of your argue. |
402a978
to
a7a1c86
Compare
Thanks for modernizing the project! 👍 |
Yesterday I couldn't find any reference to how to test if we need to support php7 and 8, but today I found Ondrej's suggestion: phpstan/phpstan#4060 (comment) Based on that, I need to do a bit of reworking. |
I don't see a huge difference in the baseline files generated with the php7 and php8 version settings. Maybe it's safe to say that we generate with the lowest supported (php7.4) and highest supported (php8.3) versions and always test on them |
43c9943
to
ff961f8
Compare
3d46bcc
to
6a6d3cf
Compare
I think I'm done here. I don't know how much hair will fall out from testing with 2 php versions at the same time, but the basic analyze command runs 83, you can run both separately, CI runs both. |
the baseline file contains errors about #119