Skip to content

Conversation

bbulgarelli
Copy link
Contributor

This PR is related to the issue #34779. I did what the issue suggested and deprecated DelegatingApplicationContextInitializer and DelegatingApplicationListener.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jul 5, 2023
@philwebb
Copy link
Member

philwebb commented Jul 6, 2023

Thanks for the PR. We usually also add @Deprecated javadoc in the form described here. We probably want something like @deprecated since 3.2 for removal in 3.4 as property based initialization is not longer recommended.

@philwebb philwebb added the status: waiting-for-feedback We need additional information before we can continue label Jul 6, 2023
@wilkinsona
Copy link
Member

wilkinsona commented Jul 6, 2023

We also use the since and forRemoval attributes on @Deprecated:

@Deprecated(since = "3.2.0", forRemoval = true)

The related test classes (DelegatingApplicationContextInitializerTests and DelegatingApplicationListenerTests) should also be marked as deprecated.

@bbulgarelli can you please run the build before submitting a pull request? These omissions show up in the failures that occur when trying to build your changes.

@bbulgarelli
Copy link
Contributor Author

bbulgarelli commented Jul 6, 2023

@bbulgarelli can you please run the build before submitting a pull request?

Sorry about that. I tried to run it this time, but I still got warnings related to the test classes, even though I already added the deprecation annotation to both test classes. I'm not sure what I'm doing wrong.

We probably want something like @deprecated since 3.2 for removal in 3.4 as property based initialization is not longer recommended

OK. I added this to both the deprecated classes and the test classes.

@spring-projects-issues spring-projects-issues added status: feedback-provided Feedback has been provided and removed status: waiting-for-feedback We need additional information before we can continue labels Jul 6, 2023
@wilkinsona wilkinsona changed the title Deprecating DelegatingApplicationContextInitializer and DelegatingApplicationListener Deprecate DelegatingApplicationContextInitializer and DelegatingApplicationListener in favour of registering each delegate programatically or in spring.factories Jul 6, 2023
@wilkinsona wilkinsona added type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged status: feedback-provided Feedback has been provided labels Jul 6, 2023
@wilkinsona wilkinsona added this to the 3.2.x milestone Jul 6, 2023
@snicoll snicoll self-assigned this Jul 17, 2023
@snicoll snicoll modified the milestones: 3.2.x, 3.2.0-M1 Jul 17, 2023
snicoll pushed a commit that referenced this pull request Jul 17, 2023
snicoll added a commit that referenced this pull request Jul 17, 2023
@snicoll snicoll closed this in 3995883 Jul 17, 2023
@snicoll
Copy link
Member

snicoll commented Jul 17, 2023

Thanks @bbulgarelli, I've polished your contribution in 60df7e3.

@izeye
Copy link
Contributor

izeye commented Aug 12, 2023

We also use the since and forRemoval attributes on @Deprecated:

@Deprecated(since = "3.2.0", forRemoval = true)

It would be nice if it's also documented in the "Deprecations" section in the wiki.

@snicoll
Copy link
Member

snicoll commented Aug 12, 2023

Thanks @izeye, I've updated the wiki.

@rishiraj88
Copy link

Nice idea, @izeye

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants