* Support generating helper files for real-time facades
Add changelog entry for real-time facades support
Mention real-time facades support in readme
Fix code style
Import
* Remove useless assertions
We cannot 100% control the output file has only the real-time facades, anything else can be in the final output
* 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]>
* 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]>
* Add support for protected Attribute accessors
* Fix formatting
* Prevent accessors methods marked as private from being added
* Exclude specific accessors based on trait instead of class
* Add changelog entry
* Add clarifying comment
* Fix accessor attributes not working on PHP < 8.1
* Reintroduce method variable to reduce PR clutter
* Change variable name to reduce PR clutter
* Update CHANGELOG.md
---------
Co-authored-by: Barry vd. Heuvel <[email protected]>
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]>
* option to use generics syntax, default to yes in laravel 9
* rename `use_generics_syntax` to `use_generics_annotations`
* update readme and changelog
* remove laravel 9 default override
* include key type in generics annotations
* readme rewording
* set `use_generics_annotations` to `true` by default
* update tests to reflect `use_generics_annotations` being set to `true` by default
* default `use_generics_annotations` setting to true when not set in config
Co-authored-by: Markus Podar <[email protected]>
---------
Co-authored-by: Markus Podar <[email protected]>
* Implement new config to specify return type of custom relations
* Apply suggestions from code review
Co-authored-by: Markus Podar <[email protected]>
* add test for morphed
* fix test output
* add info about how to add custom relationships
* fix wording
Co-authored-by: Markus Podar <[email protected]>
* 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
* ✨ Set properties from model functions returning an Attribute
* ✅ Add test for model Attributes
* 🎨 Fix code style
* 🔖 Update changelog
* ✅ Update test to not require php 8
* 🐛 Fix PHP 7.3 incompatibility
* ✅ Update tests to only run when Illuminate Attribute exists
* bugfix/custom-types-cause-exception
- Added use statements for DBAL Exception and Type
- Added @throws tag to getPropertiesFromTable method
- Added Type::addType() to properly register types
- Added Try-Catch around Type::addType() to give users a proper error message, then throw the exception up.
* bugfix/custom-types-cause-exception
- Updated CHANGELOG.MD
* bugfix/custom-types-cause-exception
- Fixed `Type enum_string_boolean already exists.` error from being triggered when multiple models are loaded