-
Notifications
You must be signed in to change notification settings - Fork 41.6k
Use since attribute in configuration properties deprecation consistently #47980
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
Closed
scottfrederick
wants to merge
3
commits into
spring-projects:3.5.x
from
scottfrederick:gh-47872-deprecate-since
Closed
Use since attribute in configuration properties deprecation consistently #47980
scottfrederick
wants to merge
3
commits into
spring-projects:3.5.x
from
scottfrederick:gh-47872-deprecate-since
+1,222
−516
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a122ef1 to
3f58fcb
Compare
Member
|
Thanks very much for the PR Scott. Looking at it briefly and thinking how to merge this to |
Add an architecture rule to ensure that all usages of `@DeprecatedConfigurationProperty` in the Spring Boot codebase include the `since` attribute. Add the `since` attribute to the few places where it was not already included. Signed-off-by: Scott Frederick <scottyfred@gmail.com>
Add the `since` field to all deprecated properties in all additional-spring-configuration-metadata.json files in the project. Add to the CheckAdditionalSpringConfigurationMetadata build task to ensure that all deprecated properties have a non-empty `since` field. Signed-off-by: Scott Frederick <scottyfred@gmail.com>
3f58fcb to
6ae54d1
Compare
Signed-off-by: Scott Frederick <scottyfred@gmail.com>
6ae54d1 to
7aa96d0
Compare
Contributor
Author
|
This PR has been rebased on top of the changes for #47984. I added another commit to test the new architecture rule that was added in a previous commit. |
snicoll
pushed a commit
that referenced
this pull request
Nov 13, 2025
Add an architecture rule to ensure that all usages of `@DeprecatedConfigurationProperty` in the Spring Boot codebase include the `since` attribute. Add the `since` attribute to the few places where it was not already included. See gh-47980 Signed-off-by: Scott Frederick <scottyfred@gmail.com>
snicoll
pushed a commit
that referenced
this pull request
Nov 13, 2025
Add the `since` field to all deprecated properties in all additional-spring-configuration-metadata.json files in the project. Add to the CheckAdditionalSpringConfigurationMetadata build task to ensure that all deprecated properties have a non-empty `since` field. See gh-47980 Signed-off-by: Scott Frederick <scottyfred@gmail.com>
snicoll
added a commit
that referenced
this pull request
Nov 13, 2025
snicoll
added a commit
that referenced
this pull request
Nov 13, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #47872
For
additional-spring-configuration-metadata.jsonfiles, the existing:checkAdditionalSpringConfigurationMetadataGradle task was enhanced to verify that a non-emptysincefield exists any time there is adeprecationobject for a property.For annotation-based properties, an architecture rule was added to verify that a
@DeprecatedConfigurationPropertyannotation always has a non-emptysinceattribute. That should provide the fastest and most usable feedback, I think. I did not add to the:checkSpringConfigurationMetadataGradle task to verify generatedspring-configuration-metadata.jsonfiles because that felt redundant, but I'm happy to add that too if the team thinks that's more complete.There are a few properties that have been deprecated for a very long time, before Spring Boot 2.0.0 even. Should there be a threshold for how long a property stays in a manual metadata file? If you'd like to clean that up, I can remove some of the oldest ones in another commit on this PR, or as a separate issue.