laravel-ide-helper
fe4fb93261
composer fix-style
2024-12-28 18:22:32 +00:00
Barry vd. Heuvel
f5d940fe0f
Test generator, update constructor
2024-12-28 19:22:01 +01:00
Barry vd. Heuvel
0abcb7497e
Add templates to Eloquent
2024-12-28 11:12:50 +01:00
Lito
b7675670f7
Assign $output method parameter to $this->output on Generator ( #1623 )
...
The `$output` method parameter is not being assigned to the `$this->output` class variable.
2024-12-18 09:24:19 +01:00
Lito
5da09fad67
Fixed PHP 8.4 deprecation warning ( #1622 )
...
* Fixed PHP 8.4 deprecation warning
* Fix PHP 8.4 deprecation warning
2024-12-09 16:03:20 +01:00
Carl-Philipp Jung and laravel-ide-helper
e3ec773374
Improve replacement of return type for methods from Query\Builder ( #1575 )
...
* Add return type `|static` to Query\Builder methods (#1574 )
* Replace return type Query\Builder with Eloquent\Builder (#1574 )
* Replace return type Query\Builder only for facade Eloquent (#1574 )
* Add special return type replacement for Macros of \Eloquent
* Restrict special return type to methods from Eloquent\Builder and Query\Builder
* Do not overwrite return type in normalizeReturn() with conditional call of setType()
* Use generic return type for builder methods in \Eloquent
* composer fix-style
---------
Co-authored-by: laravel-ide-helper <[email protected] >
2024-10-31 15:47:27 +01:00
Jeramy Hing
472c1bad5d
Feature: Add Config Option to Enforce Nullable Relationships ( #1580 )
...
* feat: add config option for nullable relationships
Introduce enforce_nullable_relationships configuration to control nullable Eloquent relationships.
* refactor: update logic for nullable relationships
Update isRelationNullable method to respect new config option.
* test: add tests for nullable relationship config
- Verify behavior of enforce_nullable_relationships configuration option.
- Create snapshot to reflect enforce_nullable_relationships set to false.
* docs: improve documented context and usage
* docs: update CHANGELOG with enforce_nullable_relationships option
2024-10-30 22:35:58 +01:00
Pieter Willekens and laravel-ide-helper
07e3bd8796
fix(pivot): only use unique classes in the pivot union ( Fixes #1606 ) ( #1607 )
...
* fix(pivot): only use unique classes in the pivot union (Fixes #1606 )
* composer fix-style
---------
Co-authored-by: laravel-ide-helper <[email protected] >
2024-10-29 15:00:16 +01:00
Ramon Dantas and Barry vd. Heuvel
800e2347a6
feat: use numeric type on fields with decimal casts ( #1583 )
...
* feat: use `numeric` type on fields with `decimal` casts
* docs: update CHANGELOG.md
---------
Co-authored-by: Barry vd. Heuvel <[email protected] >
2024-10-28 12:32:31 +01:00
Barry vd. Heuvel
7549f58a30
Smarter reset ( #1603 )
...
* Smarter reset
* Changelog
* Fix phpdocs
2024-10-28 12:21:53 +01:00
Barry vd. Heuvel
d6fb7907cc
Merge branch 'patch-1' of github.com:uno-sw/laravel-ide-helper into uno-sw-patch-1
2024-10-28 11:35:50 +01:00
Pieter Willekens and laravel-ide-helper
dc70337e48
feat(pivot): add support for multiple pivot types when using the same accessor ( #1597 )
...
* feat(pivot): add support for multiple pivot types when using the same accessor
* composer fix-style
* changelog
* resolve namespaces
* Revert "resolve namespaces"
This reverts commit 37559ab089 .
* resolve namespaces
---------
Co-authored-by: laravel-ide-helper <[email protected] >
2024-10-28 11:32:19 +01:00
KentarouTakeda
4b051e45c7
Fix the description of unused option ( #1600 )
2024-10-28 11:30:54 +01:00
KentarouTakeda
085ca3e225
Compatible with Generics Eloquent Builder in Laravel 11.15 ( #1591 )
...
* 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
2024-10-17 18:37:19 +02:00
khaled sadek
643329d23d
Fix type of hased model property ( #1579 )
...
* set hashed properity as string
* add to changelog
* add test
2024-08-07 09:29:14 +02:00
uno-sw
51fb97b8fb
Add support for AsCollection::using and AsEnumCollection::of casts
2024-08-02 13:18:15 +09:00
schrosis
001091e605
fix: unknown format PHPDoc ( #1538 )
2024-07-12 16:09:08 +02:00
f5759e2001
Add static to isBuiltin() check in ide-helper:models ( #1541 )
...
* Add `\\static` as check
For some reason, the `static` keyword as a return type, does not return `isBuiltin()` === true, so a `\\` is added. We need to manually add it to the built in check.
* Update ModelsCommand.php
* Add tests
* Add CHANGELOG.md entry
---------
Co-authored-by: Markus Podar <[email protected] >
Co-authored-by: Barry vd. Heuvel <[email protected] >
2024-07-12 16:08:08 +02:00
michal and Barry vd. Heuvel
f7a3dc8ff2
Add support in morphTo relationship for null values (1547) ( #1549 )
...
Co-authored-by: Barry vd. Heuvel <[email protected] >
2024-07-12 16:06:56 +02:00
Braunson Yager and Barry vd. Heuvel
672acce5ae
feat: add support for AsEnumCollection casts ( #1557 )
...
* Adding support for casting to AsEnumCollection
* Adding missing string to advanced_casts table for enum_collection
* Added to snapshots and ArrayCastsWithComment
* Update CHANGELOG.md
* Reverted automated whitespace, strict changes
* Updated test snapshots, tests passing
* Whitespace revert
---------
Co-authored-by: Barry vd. Heuvel <[email protected] >
2024-07-12 16:03:57 +02:00
c6509b658f
Improved attribute handling with types and Attribute support ( #1567 )
...
* Add `AllowDynamicProperties` Attribute to cooperate with php8.2 deprecation
* lint snapshot
* Fix collection attribute typing
* Update CHANGELOG.md
* Update CHANGELOG.md
* Update CHANGELOG.md
* Update composer.json
* Fix collectino with template types WIP
* Add `AllowDynamicProperties` Attribute to cooperate with php8.2 deprecation
* Fix collection attribute typing
* Update CHANGELOG.md
* Update CHANGELOG.md
* Update composer.json
* composer fix-style
* Fix tests
* Fix tests
* composer fix-style
* Fix collectino with complex template types{
* Delete phpactor
* Install from scrumble repo
* Implemented correct attribute handling
* composer fix-style
* Revert "Install from scrumble repo"
This reverts commit 3f1057adb6 .
* Re-add barryvdh links
* Revert "Update composer.json"
This reverts commit 98252fe740 .
* Fix pivot test
* Correct CHANGELOG.md with attribute merge request
* More clear PhpDocTypeParser filename and clarified directory according to PSR12
---------
Co-authored-by: GeoSot <[email protected] >
Co-authored-by: laravel-ide-helper <[email protected] >
Co-authored-by: Luukdewaaier <[email protected] >
Co-authored-by: Luuk de Weijer <[email protected] >
2024-07-12 15:53:04 +02:00
sforward
6338abb2d7
Fix return value of scopes from parent class ( #1366 )
2024-04-01 08:43:59 +02:00
dev2a
ac7e186270
Add pivot class property ( #1518 )
...
* Add pivot class property
* Add test for pivot class properties
* Fix failed test for pivot class properties
* Update CHANGELOG.md
* Fix failed test
2024-03-11 14:37:15 +01:00
Markus Podar and Barry vd. Heuvel
49ac75d805
Remove --smart-reset completely ( #1525 )
...
* Remove `--smart-reset` completely
See https://github.com/barryvdh/laravel-ide-helper/pull/1523#issuecomment-1952313183
* Update CHANGELOG.md
---------
Co-authored-by: Barry vd. Heuvel <[email protected] >
2024-02-19 14:03:16 +01:00
Barry vd. Heuvel
02af2a278a
Merge reset/smart reset, don't set class ( #1523 )
...
* Merge reset/smart reset, don't set class
* Add changelog
2024-02-19 12:59:22 +01:00
Barry vd. Heuvel
d7ed749f3e
Use int/bool instead of longer variant ( #1524 )
...
* Use int/bool instead of longer variant
* Add changelog
* Update snapshots
2024-02-19 12:39:07 +01:00
6579c0332b
Remove doctrine ( #1512 )
...
* Remove doctrine
* Fix tests
* normalize composer.json
* Add back platform
* Bump integration versions
* composer fix-style
* Fix stability
* Bump minimum to 10.36
* Bump minimum to 10.38
* More types
* Fast fail off
* Bump docblock
* composer fix-style
* add bpchar
* Use match for type detection
Co-authored-by: Hafez Divandari <[email protected] >
* Use driverName
Co-authored-by: Hafez Divandari <[email protected] >
* fix match
* TWeak types
* Update snapshots
* Remove testbench 7
* composer fix-style
* Update src/Console/ModelsCommand.php
Co-authored-by: Hafez Divandari <[email protected] >
* Update src/Console/ModelsCommand.php
Co-authored-by: Hafez Divandari <[email protected] >
* Tweak bool
* Update src/Console/ModelsCommand.php
Co-authored-by: Hafez Divandari <[email protected] >
* composer fix-style
* Remove custom types, default to string
---------
Co-authored-by: barryvdh <[email protected] >
Co-authored-by: laravel-ide-helper <[email protected] >
Co-authored-by: Hafez Divandari <[email protected] >
2024-02-17 11:12:12 +01:00
Barry vd. Heuvel
77831852bb
Fix final class keyword ( #1517 )
...
* Fix final class keyword
* Add changelog
2024-02-15 15:23:20 +01:00
Barry vd. Heuvel
c119e89cf0
CS
2024-02-08 11:11:51 +01:00
GeoSot
bc158a1b86
Add AllowDynamicProperties Attribute to cooperate with php8.2 deprecation ( #1428 )
...
* Add `AllowDynamicProperties` Attribute to cooperate with php8.2 deprecation
* lint snapshot
2024-02-08 11:09:30 +01:00
341c0ab89f
feat: add support for AsCollection and AsArrayObject casts ( #1393 )
...
* feat: add support for AsCollection and AsArrayObject casts
* update changelog
* improve tests
* remove change
* composer fix-style
* snapshot
---------
Co-authored-by: Barry vd. Heuvel <[email protected] >
Co-authored-by: laravel-ide-helper <[email protected] >
2024-02-08 10:59:02 +01:00
Menthol
cee441c87c
Fix #1300 relation_return_type must take precedence if it is defined ( #1394 )
2024-02-08 09:48:26 +01:00
Barry vd. Heuvel
9343d3a1cc
CS
2024-02-08 09:41:24 +01:00
f12d933ab1
Add support for non type-hinted attribute accessors with no backed property ( #1411 )
...
* Read Attribute type from parameter
* Update CHANGELOG.md
* Update ModelsCommand.php
---------
Co-authored-by: Barry vd. Heuvel <[email protected] >
Co-authored-by: Barry vd. Heuvel <[email protected] >
2024-02-08 09:39:10 +01:00
Norman Huth
4751420c9e
Accept scope & scopes as relation ( #1452 )
2024-02-08 09:20:47 +01:00
Caleb White
6115100a0f
Add support for composite keys ( #1479 )
...
* Add support for composite keys
* chore: add composite foreign key test
2024-02-08 07:42:27 +01:00
Sven
5c886fb653
Support the BINARY(...) database field type ( #1434 )
...
In singlestore we define some strings as
$table->char($columnName, 40)->charset('binary')->collation('binary');
In singelstore, this becomes 'BINARY(40)' instead of 'CHAR(40) CHARACTER SET 'binary' COLLATE 'binary'
This change would allow the generated proeperties to be 'string' instead of 'mixed', as using a string is correct in this case.
2024-02-07 22:01:48 +01:00
Barry vd. Heuvel
7d69dc6ea0
CS
2024-02-07 21:58:39 +01:00
Ben Poulson
62fc436c4c
Reintroduce support for multi-db setups ( #1426 )
...
This snipet was lost in the 2.12.x => 2.13.x change. Needs to be reintroduced to allow those who use fully qualified db+table names. (Eg, `database.table`)
2024-02-07 21:55:16 +01:00
409bbf665b
Fix unsetMethod in ModelsCommand ( #1453 )
...
* Fix unsetMethod in ModelsCommand
* composer fix-style
---------
Co-authored-by: Barry vd. Heuvel <[email protected] >
Co-authored-by: laravel-ide-helper <[email protected] >
2024-02-07 21:48:09 +01:00
Barry vd. Heuvel
2535f8e6ab
Fix tests and CS
2024-02-07 21:44:48 +01:00
Filip Iulian Pacurar
04c1a8d444
Support generating helper files for real-time facades ( #1455 )
...
* 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
2024-02-07 21:35:02 +01:00
snmatsui
c290af858d
reset foreignKeyConstraintsColumns on model loop start ( #1461 )
2024-02-07 21:31:12 +01:00
f64ff9c0b1
Add support for enum default arguments using enum cases ( #1464 )
...
* 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] >
2024-02-07 21:27:30 +01:00
PapaBear and Timo Frenzel
9d14b019f6
skip swoole, otherwise fatal error ( #1477 )
...
Co-authored-by: Timo Frenzel <[email protected] >
2024-02-07 21:19:43 +01:00
netpok
f4656256fc
Fix non-facade classes will result in no autocomplete ( #841 )
...
* Filter out non-facade base classes
* Remove Model as it is already skipped because it's not a facade
2024-02-07 21:06:31 +01:00
Markus Podar
a8b34ad228
Removed support for Laravel 8 and therefore for PHP < 8.0 ( #1504 )
...
* Removed support for Laravel 8 and therefore for PHP < 8.0
* Update php-cs-fixer to v3
* composer fix-style
2024-02-05 13:25:08 +01:00
Markus Podar
726e595578
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
2024-01-28 19:33:31 +01:00
Markus Podar
1a3affd4f8
Catch error and exception ( #1431 ) ( #1465 )
...
Credit goes to @dongm2ez
2023-09-06 12:35:33 +02:00
Gerardo Ibarra
edc422cd2e
add annotation ignore for php code sniffer ( #1456 )
2023-07-31 11:08:02 +02:00