Skip to content
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

Merged
merged 42 commits into from
Jul 12, 2024

Conversation

stefanScrumble
Copy link
Contributor

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

  • [X ] Bug fix (non-breaking change which fixes an issue)
  • [X ] New feature (non-breaking change which adds functionality)

Checklist

  • [X ] Existing tests have been adapted and/or new tests have been added
  • [ X] Add a CHANGELOG.md entry
  • [ X] Update the README.md
  • [ X] Code style has been fixed via composer fix-style

GeoSot and others added 30 commits March 9, 2023 16:45
…types

@fix/collection with template types
@stefanScrumble stefanScrumble marked this pull request as ready for review July 12, 2024 09:32
@stefanScrumble stefanScrumble changed the title Improved attribute handling with types an Attribute support Improved attribute handling with types and Attribute support Jul 12, 2024
composer.json Outdated
@@ -1,5 +1,5 @@
{
"name": "barryvdh/laravel-ide-helper",
"name": "scrumble-nl/laravel-ide-helper",
Copy link
Owner

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, done!

@barryvdh
Copy link
Owner

@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
------------------
Copy link
Owner

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


declare(strict_types=1);

namespace Barryvdh\LaravelIdeHelper\helpers;
Copy link
Owner

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

Copy link
Contributor Author

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.

@barryvdh barryvdh merged commit c6509b6 into barryvdh:master Jul 12, 2024
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants