1060 Commits
Author SHA1 Message Date
Markus Podar 0801d002e4 Fix tests for edc422cd2e (#1457)
I just ran `composer test-regenerate`
2023-07-31 13:26:41 +02:00
Gerardo Ibarra edc422cd2e add annotation ignore for php code sniffer (#1456) 2023-07-31 11:08:02 +02:00
Markus PodarandBarry vd. Heuvel 4dc20b028a Remove offical support for Lumen (#1425)
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]>
2023-02-20 13:23:52 +01:00
39885645b9 Add support for protected Attribute accessors (#1339)
* 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]>
2023-02-20 09:44:01 +01:00
Barry vd. Heuvel aa1aa66ee6 Update CHANGELOG.md 2023-02-20 09:40:08 +01:00
b70a9f5048 add immutable_date/time:* casts (#1380)
* add immutable_date/time:* casts

* fix style

* Update CHANGELOG.md

---------

Co-authored-by: Barry vd. Heuvel <[email protected]>
Co-authored-by: Barry vd. Heuvel <[email protected]>
2023-02-20 09:36:24 +01:00
Wim Reckmanandlaravel-ide-helper 9f97f7cd5f Refactor resolving of null information for custom casted attribute types (#1330)
* Refactor resolving of null information for custom casted attribute types

* composer fix-style

---------

Co-authored-by: laravel-ide-helper <[email protected]>
2023-02-20 09:29:48 +01:00
Markus Podar 97fd0e0a2d Update changelog after new release 2.13.0 (#1418) 2023-02-04 22:04:42 +01:00
Alies Lapatsin 9f5670b7e9 Bump Psalm version (#1410)
SSH facade removed from Laravel 5:
 - https://github.com/laravel/framework/tree/v8.83.27/src/Illuminate/Support/Facades
 - https://github.com/laravel/framework/tree/v9.48.0/src/Illuminate/Support/Facades
  - https://github.com/laravel/framework/tree/10.x/src/Illuminate/Support/Facades
2023-02-04 22:04:01 +01:00
Barry vd. Heuvel 1d302435ef Update composer.json 2023-02-04 16:23:19 +01:00
Bartlomiej Kwarcinski 81d5b223ff Fix Castables issue #1312 (#1388)
* Return Castable class if failed to detect it from return types

* fix-style

* Add CHANGELOG.md entry
v2.13.0
2023-02-04 14:56:40 +01:00
Alies LapatsinandBarry vd. Heuvel ce24d4b013 Added support for Laravel 10 (+ update testing matrix) (#1407)
* 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]>
2023-02-04 14:54:33 +01:00
Barry vd. Heuvel edfb05621c IDE Helper for Laravel 2023-02-01 17:24:13 +01:00
Taner KucukyurukandMarkus Podar f0e4cf5e78 Generics annotations support (#1298)
* 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]>
2023-01-28 16:48:05 +01:00
Markus Podar 5d9925bab8 gha: fix workflow by allowing the composer-normalize plugin (#1412)
* 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
2023-01-24 17:32:39 +01:00
Stef van EschandBarry vd. Heuvel 9e50460017 Added support for Laravel 10 (#1406)
* Added support for Laravel 10

* Update run-tests.yml

* Update run-tests.yml

* Update run-integration-tests.yml

Co-authored-by: Barry vd. Heuvel <[email protected]>
2023-01-22 15:01:32 +01:00
Barry vd. Heuvelandlaravel-ide-helper b55769213c Use dev instead of stable (#1409)
* Update run-integration-tests.yml

* composer fix-style

* Update run-integration-tests.yml

Co-authored-by: laravel-ide-helper <[email protected]>
2023-01-22 15:01:12 +01:00
Bentley O'Kane-Chase f055d42b39 Add phpstorm metadata for mock methods when testing (#1405)
* Add phpstorm metadata for testing

* Update CHANGELOG.md
2023-01-17 12:37:15 +01:00
sforwardandSimon Verwaard dda200fd34 Add support for CastsInboundAttributes (#1329)
* Add support for CastsInboundAttributes

* Update changelog

Co-authored-by: Simon Verwaard <[email protected]>
2022-09-13 10:42:06 +02:00
Markus Podar e8ecb3da88 Merge pull request #1367 from krsriq/patch-1 2022-08-21 11:42:25 +02:00
Daniel Schmelz e49c4556dd Fix typo 2022-08-21 08:40:17 +02:00
Daniel Schmelz 2c96c45d5e Fix typos 2022-08-20 10:50:21 +02:00
sforwardandSimon Verwaard 532ae5bec3 Fix database name (#1364)
Co-authored-by: Simon Verwaard <[email protected]>
2022-08-13 22:02:45 +02:00
JefemyandBarry vd. Heuvel c8f0f914e3 Fix issue where \Eloquent is not included when using write_mixin (#1352)
* Check for exact mixin name when writing

* changelog

* add mixin to test class

Co-authored-by: Barry vd. Heuvel <[email protected]>
2022-08-11 12:39:26 +02:00
KentarouTakeda 07f5eaea73 Fix return type of methods provided by SoftDeletes (#1345)
* Fix return type of methods provided by `SoftDeletes`

* Update CHANGELOG

* fix test / update snapshot
2022-08-11 12:36:43 +02:00
Corey McCormick c76fbb5b61 Allow for proper database resolve with schemas (#1349)
* Allow for proper database resolve with schemas

* Remove need to explode database and table name
2022-08-11 12:35:46 +02:00
angeljqv c40fee2a3f Update .gitattributes (#1355) 2022-08-11 12:32:48 +02:00
Wim Reckman 5eadd2c7de Fix model factory method arguments for Laravel >= 9 (#1361) 2022-08-11 12:32:14 +02:00
Barry vd. Heuvelandlaravel-ide-helper 6e26f22c76 Feat useclassmappackage (#1357)
* Use composer/class-map-generator

* composer fix-style

Co-authored-by: laravel-ide-helper <[email protected]>
2022-06-20 15:54:12 +02:00
JefemyandMarkus Podar ee9188acf1 Implement new config to specify return type of custom relations (#1300)
* 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]>
2022-05-22 20:07:54 +02:00
Markus Podar a567f73140 readme: explicitly state supported version (#1348)
Based on the discussion in https://github.com/barryvdh/laravel-ide-helper/issues/1347
2022-05-21 22:40:30 +02:00
Markus Podar 6a461a7c47 Fix integration tests by fixing a PHP 8.1+ deprecation warnings in ReflectionClass (#1351)
* 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
2022-05-21 22:38:28 +02:00
Barry vd. Heuvel 3ba1e2573b Update CHANGELOG.md v2.12.3 2022-03-06 15:33:42 +01:00
Barry vd. Heuvelandbarryvdh 6b58c23e6f Update composer.json (#1327)
* Update composer.json

* normalize composer.json

Co-authored-by: barryvdh <[email protected]>
2022-03-06 15:31:47 +01:00
FLeudts 6041681495 Add support for Carbon serialization options (#1324)
* Add Carbon serialization option handling

* Tests Added

* Add changelog

* Spellcheck
2022-03-04 09:12:42 +01:00
Barry vd. Heuvel ddb74fb5c8 Test 9.* integration (#1314) 2022-02-09 08:09:10 +01:00
Barry vd. Heuvel 7917cce7c9 Update CHANGELOG.md v2.12.2 2022-02-08 20:30:33 +01:00
Barry vd. Heuvel 6627cb9587 Normalize composer.json 2022-02-08 20:26:43 +01:00
Barry vd. Heuvelandlaravel-ide-helper 3b03e4055d Replace composer with copy of classmap generator (#1313)
* Replace composer with copy of classmap generator

* composer fix-style

* Remove phpcleaner

* composer fix-style

* Use filecleaner copy

* composer fix-style

Co-authored-by: laravel-ide-helper <[email protected]>
2022-02-08 20:20:22 +01:00
Barry vd. Heuvel a227fca325 Update README.md 2022-01-30 13:44:04 +01:00
Markus Podar 999167d4c2 Prepare 2.12.1 patch release (#1307)
### Fixed
- Properly handle `Castable`s without return type. [#1306 / binotaliu](https://github.com/barryvdh/laravel-ide-helper/pull/1306)
v2.12.1
2022-01-24 22:36:43 +01:00
BinotaLIU 2673bf4889 return mixed if we failed detect castable type (#1306)
fixed #1305
2022-01-24 21:39:17 +01:00
Markus Podar 771770e56c Merge pull request #1304 from mfn/mfn-release
Prepare 2.12 release
v2.12.0
2022-01-23 17:50:53 +01:00
Barry vd. Heuvel 88353535f2 Update composer.json 2022-01-23 17:46:42 +01:00
mfn acb2df9dfb normalize composer.json 2022-01-23 16:39:03 +00:00
Markus Podar 7052b4f708 Prepare 2.12 release
### Added
- Add support for custom casts that using `Castable` [#1287 / binotaliu](https://github.com/barryvdh/laravel-ide-helper/pull/1287)
- Added Laravel 9 support [#1297 / rcerljenko](https://github.com/barryvdh/laravel-ide-helper/pull/1297)
2022-01-23 17:38:31 +01:00
Yehuda Katz ac1e27167d Disabled PHPCS (#1301)
PHPCS is a common development tool. It makes sense to disable it in addition to Eclipse/IntelliJ formatting disable
2022-01-20 14:27:58 +01:00
de64d665e0 added laravel 9 support (#1297)
* added laravel 9 support

* added exclude directives to matrix

* fixed matrix

* Update composer.json

* Update run-integration-tests.yml

* Update CHANGELOG.md

Co-authored-by: Ricardo Čerljenko <[email protected]>
Co-authored-by: Barry vd. Heuvel <[email protected]>
2022-01-13 15:38:59 +01:00
Markus Podar 93d987336b Adapt/fix changelog now that a new release was made (#1294)
Triggered by https://github.com/barryvdh/laravel-ide-helper/pull/1287#issuecomment-1008344636
2022-01-09 22:26:59 +01:00
BinotaLIU 744a9cf380 support Castables (#1287) 2022-01-09 18:52:15 +01:00