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

feat: [5.x] attribute consistency #2368

Merged
merged 11 commits into from
Oct 25, 2024
Merged

feat: [5.x] attribute consistency #2368

merged 11 commits into from
Oct 25, 2024

Conversation

DjordyKoert
Copy link
Collaborator

@DjordyKoert DjordyKoert commented Oct 25, 2024

Cleanup various references to annotations to their attribute variant

#2215

Copy link

codecov bot commented Oct 25, 2024

Codecov Report

Attention: Patch coverage is 93.61702% with 6 lines in your changes missing coverage. Please review.

Project coverage is 89.33%. Comparing base (d8e9e29) to head (a8998c2).
Report is 1 commits behind head on 5.x.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/OpenApiPhp/ModelRegister.php 25.00% 3 Missing ⚠️
src/ModelDescriber/ObjectModelDescriber.php 0.00% 2 Missing ⚠️
src/Exception/UndocumentedArrayItemsException.php 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##              5.x    #2368   +/-   ##
=======================================
  Coverage   89.33%   89.33%           
=======================================
  Files          73       73           
  Lines        2775     2775           
=======================================
  Hits         2479     2479           
  Misses        296      296           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

UPGRADE-5.0.md Outdated
Comment on lines 28 to 39

## BC BREAK: `Nelmio\ApiDocBundle\Annotation` namespace has been moved to `Nelmio\ApiDocBundle\Attribute`

## BC BREAK: Configuration option `with_annotation` has been renamed to `with_attribute`
```diff
nelmio_api_doc:
areas:
path_patterns:
- ^/api/foo
- with_annotation: true
+ with_attribute: true
```
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

TODO: Migration path in 4.x

Copy link
Contributor

@fabianoroberto fabianoroberto Oct 25, 2024

Choose a reason for hiding this comment

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

Probably is better implement recipes (https://github.com/symfony/recipes-contrib/tree/main/nelmio/api-doc-bundle) for 5.x version and replace that attribute with it

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

with_attribute is still an optional config option so adding it as a recipe won't do much

DjordyKoert added a commit that referenced this pull request Oct 25, 2024
| Q | A |

|---------------|---------------------------------------------------------------------------------------------------------------------------|
| Bug fix? | no |
| New feature? | no <!-- please update src/**/CHANGELOG.md files --> |
| Deprecations? | yes                                                  |

Migration for annotations to attributes
#2368 (comment)
@DjordyKoert DjordyKoert merged commit b2eea4f into 5.x Oct 25, 2024
17 checks passed
@DjordyKoert DjordyKoert deleted the 5.x-attribute-consistency branch October 25, 2024 14:25
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.

2 participants