* Add illuminate/events as suggestion
* Add post migration to config
* Add listener to generate model helper
* Add event listeners if enabled
* Fix config file format
* Add docblock for shouldRun flag
* Allow running multiple commands after migrations
* Simplify config
* Change default value
* add comment with @method & @property-read & property-write in models
* add readme comment
* add readme comment
* add comment tag unit-test
* add comment tag unit-test
* both a getter and a setter has a @comment test
* Update README.md
improve README
Co-authored-by: Markus Podar <[email protected]>
* Update CHANGELOG.md
Co-authored-by: Markus Podar <[email protected]>
* Fix exceptions on ReflectionUnionTypes
this commit fixes exceptions thrown on ReflectionUnionType::isBuiltIn() and ReflectionUnionType::getNme() called on php8 union types
* Fix exceptions on ReflectionUnionTypes
this commit fixes exceptions thrown on ReflectionUnionType::isBuiltIn() and ReflectionUnionType::getNme() called on php8 union types
* add check for php8.0
* fix static analysis error
* fix $types variable undefined
* fix failing test
* fix failing test
* fixed style with php-cs-fixer
* add test for union types in parameters and return type
* add test for nullable union types in parameters and return type
* updated CHANGELOG.md
* 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
* `Macro::initPhpDoc()` will save original docblock if present.
* Added `MacroTest::testInitPhpDocClosureWithoutDocBlock()`.
* Mock class rename.
* Code cleanup.
* Fix code that was causing the test to break and fix bug with not built in types
* Run cs fixer
* Remove fetching the doc block type and the putting it as a type hint as a php doc block is sufficient
* Revert doc block type hinting
* Enchance doc block type hinting
* Combine replacements
* Use the full builder class instead of the parsed one after the getClassName function and remove in array check
* Get the builder from the model itself instead of passing a string directly the function
* Use the full builder class to get the builder methods and reflection, but use the parsed builder class after setting its method in the doc
* Add test for fqn support on external eloquent builder
* Use the external builder if necessary when building the magic wheres
* Use the default eloquent builder if the user has disabled the external builder option
* Fix code that was causing the test to break and fix bug with not built in types
* Run cs fixer
* Remove fetching the doc block type and the putting it as a type hint as a php doc block is sufficient
* Revert doc block type hinting
* Enchance doc block type hinting
* Combine replacements
The JSON generate doesn't work, always generates an empty list.
I looked a bit around and seems changes around 3 years ago broke it.
Since there was no bug report ever about this, I conclude this feature
isn't used and suggest to remove it.
This also changes the config `filename` as there's no need for the
extension-less version and the format is gone too. This change is
backwards compatible as we just add back the `.php` in case it's missing
though users are encouraged to update it.
* Add support for generating helpers for external eloquent builders
* Extract external builder methods generator to its own method and add an option to toggle this feature
* Check if we are using the default name of the eloquent builder
* Add tests with snapshots for external eloquent builder feature
* Refactor codegs
* Allow for type hinting
* Update test
* Run cs fix
* Update readme
* Use getName for parameter instead of relying on __toString()
* Do not use str_contains and use built in php method
* 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]>