Skip to content

fix(core): Fixed inject migration schematics for migrate destructured properties #62832

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

aparzi
Copy link
Contributor

@aparzi aparzi commented Jul 26, 2025

Fixed inject migration schematics for migrate destructured properties

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • angular.dev application / infrastructure changes
  • Other... Please describe:

What is the current behavior?

Issue Number: #62626

What is the new behavior?

Fixed inject migration schematics for migrate destructured properties

Does this PR introduce a breaking change?

  • Yes
  • No

@pullapprove pullapprove bot requested a review from atscott July 26, 2025 10:06
@angular-robot angular-robot bot added the area: core Issues related to the framework runtime label Jul 26, 2025
@ngbot ngbot bot added this to the Backlog milestone Jul 26, 2025
@aparzi aparzi force-pushed the fix-issue-62626 branch 2 times, most recently from d978f3c to ff3fcf4 Compare July 26, 2025 14:37
@aparzi
Copy link
Contributor Author

aparzi commented Jul 26, 2025

Fixed lint

@AndrewKushnir AndrewKushnir requested review from crisbeto and removed request for atscott August 12, 2025 13:26
@aparzi aparzi requested a review from JeanMeche August 22, 2025 09:20
@JeanMeche
Copy link
Member

/gemini review

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request fixes a bug in the inject migration schematic to correctly handle destructured properties in constructor parameters. The implementation introduces a ParameterMigrationContext to group related parameters, refactors the main migration function to handle different parameter kinds, and adds logic to correctly transform destructured properties into class properties with inject(). A new test case is also added to cover this scenario. The changes are well-structured and the fix appears correct. I have one minor suggestion to improve code clarity.

@aparzi aparzi requested a review from JeanMeche August 22, 2025 12:29
@aparzi
Copy link
Contributor Author

aparzi commented Aug 22, 2025

@JeanMeche fixed lint and made the requested changes

… properties

Fixes angular#62626 - Properties used with the destructor are also managed during migration.
@aparzi aparzi requested a review from JeanMeche August 22, 2025 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: core Issues related to the framework runtime
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants