Skip to content

[FrameworkBundle][PropertyInfo] Wire the ConstructorExtractor class #50334

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

Merged
merged 1 commit into from
Jan 6, 2025

Conversation

HypeMC
Copy link
Contributor

@HypeMC HypeMC commented May 16, 2023

Q A
Branch? 7.3
Bug fix? no
New feature? yes
Deprecations? no
Tickets -
License MIT
Doc PR -

A sort of followup to #30335.

The original PR removed the wiring to prevent creating a BC break, see #30128 (comment) & #30335 (comment).

This PR proposes adding a new framework.property_info.with_constructor_extractor configuration to allow optionally enabling the framework integration. The configuration defaults to false to prevent creating a BC break. Only when it's set to true will the ConstructorExtractor be registered in the container.

@HypeMC HypeMC requested a review from dunglas as a code owner May 16, 2023 00:53
@carsonbot carsonbot added this to the 6.3 milestone May 16, 2023
@nicolas-grekas nicolas-grekas modified the milestones: 6.3, 6.4 May 23, 2023
@HypeMC HypeMC force-pushed the wire-constructorextractor branch 2 times, most recently from a50e8c9 to 5261db6 Compare May 27, 2023 14:13
@HypeMC HypeMC force-pushed the wire-constructorextractor branch from 5261db6 to b68f40e Compare July 6, 2023 14:31
@HypeMC HypeMC force-pushed the wire-constructorextractor branch from b68f40e to 711cbbd Compare July 26, 2023 09:00
@HypeMC HypeMC force-pushed the wire-constructorextractor branch 3 times, most recently from da9d4fb to 03922ec Compare September 5, 2023 19:38
@HypeMC HypeMC force-pushed the wire-constructorextractor branch from 03922ec to a02c6f1 Compare September 29, 2023 04:03
@nicolas-grekas nicolas-grekas modified the milestones: 6.4, 7.1 Nov 15, 2023
@HypeMC HypeMC force-pushed the wire-constructorextractor branch from a02c6f1 to 796dcc2 Compare December 27, 2023 21:14
@michaljusiega
Copy link
Contributor

What is the status of this PR ? It would be nice to see this in 7.1.

@HypeMC HypeMC force-pushed the wire-constructorextractor branch from 796dcc2 to d2fcfbc Compare February 22, 2024 13:26
@xabbuh xabbuh modified the milestones: 7.1, 7.2 May 15, 2024
@HypeMC HypeMC force-pushed the wire-constructorextractor branch from d2fcfbc to c17cfc3 Compare August 11, 2024 14:05
@OskarStark
Copy link
Contributor

What about directly deprecating this option, so that it needs to be set on 8.0? Or defaulting it to true in 8.0?

@HypeMC HypeMC force-pushed the wire-constructorextractor branch from c17cfc3 to 31ef132 Compare October 14, 2024 15:35
@HypeMC
Copy link
Contributor Author

HypeMC commented Oct 14, 2024

What about directly deprecating this option, so that it needs to be set on 8.0? Or defaulting it to true in 8.0?

I'm ok with whatever is decided.

->children()
->booleanNode('with_constructor_extractor')
->info('Registers the constructor extractor.')
->defaultFalse()
Copy link
Contributor

Choose a reason for hiding this comment

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

I wouldn't have added any defaults here. Indeed, in that way, we could be able to raise a deprecation message in FrameworkExtension telling that with_constructor_extractor must be explicitly set, as its default value will change in 8.0.

If we're doing so, we must update the recipe so that it sets the with_constructor_extractor value to true for new 7.3 projects.

Copy link
Contributor Author

@HypeMC HypeMC Dec 29, 2024

Choose a reason for hiding this comment

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

@mtarld Something like this f50586a ?

@fabpot fabpot removed this from the 7.2 milestone Nov 20, 2024
@fabpot fabpot added this to the 7.3 milestone Nov 20, 2024
@HypeMC HypeMC force-pushed the wire-constructorextractor branch 5 times, most recently from 15c9261 to f50586a Compare January 2, 2025 21:13
@HypeMC HypeMC force-pushed the wire-constructorextractor branch from f50586a to 2b392b1 Compare January 6, 2025 15:32
@fabpot
Copy link
Member

fabpot commented Jan 6, 2025

Thank you @HypeMC.

@fabpot fabpot merged commit 0aed9fa into symfony:7.3 Jan 6, 2025
11 checks passed
@HypeMC HypeMC deleted the wire-constructorextractor branch January 7, 2025 01:39
fabpot added a commit that referenced this pull request Jan 17, 2025
…peMC)

This PR was merged into the 7.3 branch.

Discussion
----------

[PropertyInfo] Move aliases under service definition

| Q             | A
| ------------- | ---
| Branch?       | 7.3
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Issues        | -
| License       | MIT

Follow-up to #50334, the aliases are normally defined right after the service.

Commits
-------

22feb79 [PropertyInfo] Move aliases under service definition
@fabpot fabpot mentioned this pull request May 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants