Add support for nikic/php-parser:^5 and (hopefully) doctrine/dbal:^4 (#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
This commit is contained in:
Markus Podar
2024-01-28 19:33:31 +01:00
committed by GitHub
parent 6336db0548
commit 726e595578
4 changed files with 11 additions and 5 deletions
+7 -2
View File
@@ -17,6 +17,7 @@ jobs:
env: env:
COMPOSER_NO_INTERACTION: 1 COMPOSER_NO_INTERACTION: 1
strategy: strategy:
fail-fast: false
matrix: matrix:
php: [8.3, 8.2, 8.1, 8.0, 7.4, 7.3] php: [8.3, 8.2, 8.1, 8.0, 7.4, 7.3]
laravel: [10.*, 9.*, 8.*] laravel: [10.*, 9.*, 8.*]
@@ -25,14 +26,18 @@ jobs:
laravel: 10.* laravel: 10.*
- php: 7.4 - php: 7.4
laravel: 10.* laravel: 10.*
- php: 7.4
laravel: 10.*
- php: 7.3 - php: 7.3
laravel: 10.* laravel: 10.*
- php: 8.3
laravel: 9.*
- php: 7.4 - php: 7.4
laravel: 9.* laravel: 9.*
- php: 7.3 - php: 7.3
laravel: 9.* laravel: 9.*
- php: 8.3
laravel: 8.*
- php: 8.2
laravel: 8.*
name: P${{ matrix.php }} - Laravel${{ matrix.laravel }} name: P${{ matrix.php }} - Laravel${{ matrix.laravel }}
steps: steps:
- name: Checkout code - name: Checkout code
+1
View File
@@ -13,6 +13,7 @@ All notable changes to this project will be documented in this file.
- Add support for attribute accessors marked as protected. [#1339 / pindab0ter](https://github.com/barryvdh/laravel-ide-helper/pull/1339) - Add support for attribute accessors marked as protected. [#1339 / pindab0ter](https://github.com/barryvdh/laravel-ide-helper/pull/1339)
### Added ### Added
- Add support for nikic/php-parser 5 (next to 4) [#1502 / mfn](https://github.com/barryvdh/laravel-ide-helper/pull/1502)
- Add support for `immutable_date:*` and `immutable_datetime:*` casts. [#1380 / thekonz](https://github.com/barryvdh/laravel-ide-helper/pull/1380) - Add support for `immutable_date:*` and `immutable_datetime:*` casts. [#1380 / thekonz](https://github.com/barryvdh/laravel-ide-helper/pull/1380)
2023-02-04, 2.13.0 2023-02-04, 2.13.0
+2 -2
View File
@@ -24,11 +24,11 @@
"ext-json": "*", "ext-json": "*",
"barryvdh/reflection-docblock": "^2.0.6", "barryvdh/reflection-docblock": "^2.0.6",
"composer/class-map-generator": "^1.0", "composer/class-map-generator": "^1.0",
"doctrine/dbal": "^2.6 || ^3", "doctrine/dbal": "^2.6 || ^3 || ^4",
"illuminate/console": "^8 || ^9 || ^10", "illuminate/console": "^8 || ^9 || ^10",
"illuminate/filesystem": "^8 || ^9 || ^10", "illuminate/filesystem": "^8 || ^9 || ^10",
"illuminate/support": "^8 || ^9 || ^10", "illuminate/support": "^8 || ^9 || ^10",
"nikic/php-parser": "^4.7", "nikic/php-parser": "^4.18 || ^5",
"phpdocumentor/type-resolver": "^1.1.0" "phpdocumentor/type-resolver": "^1.1.0"
}, },
"require-dev": { "require-dev": {
+1 -1
View File
@@ -64,7 +64,7 @@ class UsesResolver
'\\' '\\'
); );
$parser = (new ParserFactory())->create(ParserFactory::PREFER_PHP7); $parser = (new ParserFactory())->createForHostVersion();
$namespaceData = null; $namespaceData = null;
foreach ($parser->parse($code) as $node) { foreach ($parser->parse($code) as $node) {