Skip to content
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

Add support for nikic/php-parser:^5 and (hopefully) doctrine/dbal:^4 #1502

Merged
merged 5 commits into from
Jan 28, 2024

Conversation

mfn
Copy link
Collaborator

@mfn mfn commented Jan 27, 2024

Summary

  • createForHostVersion has been added to php-parser 4.18 so code can run with both versions [1]
  • therefore also bumped the minimum required version to it

However, unrelated some tests in master were not working currently, which I also fixed to get the ✅ :

  • Excluded unsupported PHP / Laravel combinations (used the official docs as reference)
  • Allow doctrine/dbal:^4 too
    This solved some combination of the integration tests failing, though I'm not 100% sure if dbal truly works with it; it seems none of the feature tests install it and it has no stable release yet 🤔

Fixes #1498 and #1490

Notes

  • The dev dependency vimeo/psalm is not compatible with php-parser:^5 currently. This does not impact usages of this library, but sometimes cause friction when working on this library. For our CI this isn't a problem, because we already remove that dependency before running the test suite.

[1] https://github.com/nikic/PHP-Parser/blob/master/UPGRADE-5.0.md#changes-to-the-parser-factory

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • Misc. change (internal, infrastructure, maintenance, etc.)

Checklist

  • Existing tests have been adapted and/or new tests have been added
  • Add a CHANGELOG.md entry
  • Update the README.md
  • Code style has been fixed via composer fix-style

- `createForHostVersion` has been added to php-parse 4.18 so code can
  run with both versions [1]
- therefore also bumped the minimum required version to it

Note:
The dev dependency vimeo/psalm is **not** compatible with
php-parser:^5 currently. This does not impact usages of this library,
but sometimes cause friction when working on this library.
For our CI this isn't a problem, because we already remove that
dependency before running the test suite.

[1] https://github.com/nikic/PHP-Parser/blob/master/UPGRADE-5.0.md#changes-to-the-parser-factory
@mfn mfn self-assigned this Jan 27, 2024
@mfn mfn marked this pull request as ready for review January 27, 2024 16:23
@@ -17,6 +17,7 @@ jobs:
env:
COMPOSER_NO_INTERACTION: 1
strategy:
fail-fast: false
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I needed this because we had multiple failed integration tests and I needed this to better understand the pattern which ones specifically failed. Eventually I decided to leave it in, in case of failures it's more useful to see all failed ones.

Comment on lines -28 to -29
- php: 7.4
laravel: 10.*
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicate entry 🤷🏼 => removed

Comment on lines +31 to +40
- php: 8.3
laravel: 9.*
- php: 7.4
laravel: 9.*
- php: 7.3
laravel: 9.*
- php: 8.3
laravel: 8.*
- php: 8.2
laravel: 8.*
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are officially not supported

@mfn mfn requested a review from barryvdh January 27, 2024 16:26
@mfn mfn changed the title Add support for nikic/php-parser:^5 Add support for nikic/php-parser:^5 and (hopefully) doctrine/dbal:^4 Jan 27, 2024
@barryvdh barryvdh merged commit 726e595 into master Jan 28, 2024
58 checks passed
@delete-merged-branch delete-merged-branch bot deleted the mfn-nikic-v5 branch January 28, 2024 18:33
@mfn mfn mentioned this pull request Jan 28, 2024
9 tasks
d3v2a pushed a commit to d3v2a/laravel-ide-helper that referenced this pull request Feb 16, 2024
…arryvdh#1502)

* Add support for nikic/php-parser:^5

- `createForHostVersion` has been added to php-parse 4.18 so code can
  run with both versions [1]
- therefore also bumped the minimum required version to it

Note:
The dev dependency vimeo/psalm is **not** compatible with
php-parser:^5 currently. This does not impact usages of this library,
but sometimes cause friction when working on this library.
For our CI this isn't a problem, because we already remove that
dependency before running the test suite.

[1] https://github.com/nikic/PHP-Parser/blob/master/UPGRADE-5.0.md#changes-to-the-parser-factory

* gha: prevent cancelling of all jobs if one fails

* Update CHANGELOG.md

* gha: remove unsupported Laravel / PHP combinations

According to https://laravel.com/docs/10.x/releases

* Add dbal:^4 too
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Installation error on latest laravel installation
2 participants