* Bump dependencies for Laravel 13
* Update GitHub Actions for Laravel 13
* Update workflow to remove cron schedule
Removed cron schedule and adjusted pull request branches.
* Fix syntax, modify Laravel version in run-tests.yml
Updated Laravel version from '13.0' to '13.x' in CI configuration.
* Update test-ci command in composer.json
* Fix test-ci command in composer.json
---------
Co-authored-by: Barry vd. Heuvel <[email protected]>
* feat: support generics eloquent builder
* fix: required laravel version
* fix: ci execution is only for Laravel-11
* docs: add CHANGELOG
* docs: update supported Laravel versions and adjust output examples
* add case when default value is of type enum
* Update CHANGELOG.md
* add tests for enum arguments default values
* ignore psalm issue (built-in `\UnitEnum` class does not exists in PHP7)
* Update run-static-analysis.yml to use PHP8.1
---------
Co-authored-by: Barry vd. Heuvel <[email protected]>
Co-authored-by: Barry vd. Heuvel <[email protected]>
* Remove doctrine/dbal:^4 support
Tests fail with:
`PHP Fatal error: Declaration of Illuminate\Database\PDO\Concerns\ConnectsToDatabase::connect(array $params, $username = null, $password = null, array $driverOptions = []) must be compatible with Doctrine\DBAL\Driver::connect(array $params): Doctrine\DBAL\Driver\Connection in /home/runner/work/laravel-ide-helper/laravel-ide-helper/vendor/laravel/framework/src/Illuminate/Database/PDO/Concerns/ConnectsToDatabase.php on line 22`
* gha: install with downgrading all dependencies
* Add note to readme
* 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
I'm proposing to drop official suport for Lumen for the following reasons:
- Lumen itself is dead, per [1]
> **Note:** In the years since releasing Lumen, PHP has made a variety of wonderful performance improvements. For this reason, along with the availability of [Laravel Octane](https://laravel.com/docs/octane), we no longer recommend that you begin new projects with Lumen. Instead, we recommend always beginning new projects with [Laravel](https://laravel.com).
Laravel Octact is just Laravel and no one using ide-helper with it
needs anything special.
- For now, the change is mostly on the logistics side (readme, run tests,
issues). In the past we had some special code but over time this was
already removed.
For now people still can use it and nothing will break out of the blue,
but eventually it might
There are a only a few Lumen related issues open currently which would
be closed by this (#1105, #1069, #438).
[1] https://github.com/laravel/lumen/commit/69b26578d2f15595ea901278434b74df459c4329
Co-authored-by: Barry vd. Heuvel <[email protected]>
* Laravel 10 support
* Add events v10 to suggestions
* Exclude invalid combinations from testing matrix, test on PHP 8.2
* Update CHANGELOG.md
* Use laravel/laravel dev-master as 10.x version
* Exclude one more laravel-php combination
* Use 10.* instead if dev-master
* Update run-integration-tests.yml
---------
Co-authored-by: Barry vd. Heuvel <[email protected]>
* gha: fix workflow by allowing the composer-normalize plugin
We don't need to enable it in the project itself, but at least in this
workflow which explicitly uses it.
See https://github.com/barryvdh/laravel-ide-helper/actions/runs/3980013548/jobs/6822812621#step:4:34
```
Error: ergebnis/composer-normalize (installed globally) contains a Composer plugin which is blocked by your allow-plugins config. You may add it to the list if you consider it safe.
You can run "composer global config --no-plugins allow-plugins.ergebnis/composer-normalize [true|false]" to enable it (true) or disable it explicitly and suppress this exception (false)
```
* gha: also run this workflow when it is changed itself
* gha: get more insights when/if logs exist
* Better handle cases when we can receive a concrete instance
The problem with `null` being passed to `ReflectionClass` was always
there but in PHP 8.1+ it triggers a deprecation warnings.
Since having `null` in `$concrete` doesn't make sense to reflect
anything anyway, we just throw a custom exception (which gets caught a
couple lines below) and just carry on.
When using `-v` this can be seen, example:
```
$ ./artisan ide-helper:meta -v
Cannot make 'Faker\Generator': Class 'Faker\Provider\en_US\Barcode' not found.
Cannot make 'Illuminate\Contracts\Auth\Authenticatable': Class does not exist
Cannot make 'cache.psr6': Class 'Symfony\Component\Cache\Adapter\Psr16Adapter' not found.
Cannot make 'csp-nonce': Class 'Wza3Mf4CXIvCkcp9K3boMUGJoK6S9maO' not found.
Cannot make 'env': Class 'local' not found.
Cannot make 'filesystem.cloud': Disk [s3] does not have a configured driver.
Cannot make 'redis.connection': Redis connection [default] not configured.
A new meta file was written to .phpstorm.meta.php
```
* gha: make sure to run meta with -v to see all output
Helps when debugging things
* Add CHANGELOG.md entry
* Make all tests pass cross platform
* Add job to run tests on Windows
* Merge test jobs with conditional Windows step for line endings
* Prefix job name with OS
* Update git lf step if statement
* Exclude all tests for Windows except PHP 8.0
* composer fix-style
Co-authored-by: Barry vd. Heuvel <[email protected]>
Co-authored-by: laravel-ide-helper <[email protected]>
* composer.json: drop support for PHP 7.2/Laravel 6+7 and bump dependencies
* tests: remove framework version tests
They don't apply anymore, we're Laravel 8+ only from now on
* changelog: update for ending support for L6/7 and PHP7.2
* gha: run on PHP8 too
The composer.json constraint is unbound, so it's already "allowed" at least.
* gha: remove php-cs-fixer when running unit tests
- not necessary anyway
- not compatible with PHP8 currently
* gha: lumen 6 and 7 don't support PHP8
* composer.json: allow spatie/phpunit-snapshot-assertions 4.* for PHP8 compatibility
* php8-compat: Method ReflectionParameter::getClass() is deprecated
* php8-compat: adapt expected error message depending on PHP version
* composer.json: bump mockery to 1.3.3 minimum
This is the minimum version also supporting PHP8
* gha: disable prefer-lowest for PHP8
Some lower version requirements like doctrone/dbal won't work and
would require at least dbal 2.12.0, which in turn doesn't support PHP 7.2
anymore.
So instead of bumping dbal and excluding PHP 7.2 users, we ignore the
lowest version for PHP 8 for the time being.
* Update CHANGELOG.md
* gha: be more specific which OS to use
Avoids "surprises" when Github changes the underlying version, like they
currently announce with a warning:
> Ubuntu-latest workflows will use Ubuntu-20.04 soon. For more details, see https://github.com/actions/virtual-environments/issues/1816
Note: basically right now "latest" is actually 18.04 and not 20.04
* composer fix-style
* gha: require league/flysystem:^1 for lumen
2.* doesn't work out of the box
* gha: explicit version of composer isn't necessary anymore
v2 is already the default
* Be explicit to require the pdo SQLite extension for tests
Co-authored-by: laravel-ide-helper <[email protected]>
* tests: running in CI should not create but rather fail on missing snapshots
Otherwise they get created on the CI infrastructure but that's it, the
build won't fail although it was forgotten to add the snapshot.
* Bump minimum phpunit version which correctly accepts the `-d` parameter
The `prefer-lowest` version we get with L6 is 8.0.0 which throws this error:
```
PHP Fatal error: Uncaught TypeError: ini_set() expects parameter 2 to be string, bool given in /home/runner/work/laravel-ide-helper/laravel-ide-helper/vendor/phpunit/phpunit/src/TextUI/Command.php:379
```
* Update composer.json
Co-authored-by: Barry vd. Heuvel <[email protected]>