-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improved attribute handling with types and Attribute support #1567
Conversation
Fix collection attribute typing
…el-ide-helper into barry-backport
Barry backport
…types @fix/collection with template types
Install from scrumble repo
Implemented correct attribute handling
composer.json
Outdated
@@ -1,5 +1,5 @@ | |||
{ | |||
"name": "barryvdh/laravel-ide-helper", | |||
"name": "scrumble-nl/laravel-ide-helper", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you change this back?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, done!
@mfn what do you think? |
CHANGELOG.md
Outdated
@@ -80,6 +80,17 @@ All notable changes to this project will be documented in this file. | |||
- Add support for `immutable_date:*` and `immutable_datetime:*` casts. [#1380 / thekonz](https://github.com/barryvdh/laravel-ide-helper/pull/1380) | |||
- Add support for attribute accessors marked as protected. [#1339 / pindab0ter](https://github.com/barryvdh/laravel-ide-helper/pull/1339) | |||
|
|||
2024-01-04, v2.14.0 | |||
------------------ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would go in 3.1
src/helpers/PhpDocTypeParser.php
Outdated
|
||
declare(strict_types=1); | ||
|
||
namespace Barryvdh\LaravelIdeHelper\helpers; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if 'helpers' is appropriate, perhaps something more descriptive like Parsers? But it should follow PSR12 and use StudlyCaps
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense, fixed! And I Improved the filename to more accurately reflect it's use.
Summary
Properly handle attributes with type templates by parsing the phpdoc and outputting the the ide-helper file with type templates included as FQN.
Handle the Laravel Attribute return type for attribute getters and setters.
Type of change
Checklist
composer fix-style