Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Console] Remove deprecations across the component#50613

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

@alexandre-daubois
Copy link
Member

@alexandre-dauboisalexandre-daubois commentedJun 9, 2023
edited
Loading

QA
Branch?7.0
Bug fix?no
New feature?yes
Deprecations?no
Tickets-
LicenseMIT
Doc PR-

In short: preparing the component for 7.0 🙂

Copy link
Member

@nicolas-grekasnicolas-grekas left a comment
edited
Loading

Choose a reason for hiding this comment

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

let's finish existing PRs before opening new ones ;)

alexandre-daubois reacted with thumbs up emoji
@alexandre-dauboisalexandre-daubois changed the title[Console] Remove deprecations and add types across the component[Console] Remove deprecations across the componentJun 13, 2023
"composer/composer":"^2.6",
"symfony/console":"^6.4|^7.0",
"symfony/dotenv":"^6.4|^7.0",
"symfony/finder":"^6.4",
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

This is necessary becausecomposer/class-map-generator doesn't supportSymfony ^7.0 yet. The highest dep for the Finder must be set to^6.4 because of this for now.

Choose a reason for hiding this comment

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

please send a PR to class-map-generator instead

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

It has been dealt by@stloydhere, thanks!

I'll revert the change once it's merged.

Choose a reason for hiding this comment

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

Unlocked!

alexandre-daubois reacted with rocket emoji
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

I was going to update when I saw you updated the file. Thank you! 🙂

@alexandre-dauboisalexandre-dauboisforce-pushed theconsole-deprecations branch 7 times, most recently from1a9a9f0 toa1854beCompareJune 13, 2023 15:52
try {
// "symfony" must be kept for compat with the shell scripts generated by Symfony Console 5.4 - 6.1
$version =$input->getOption('symfony') ?'1' :$input->getOption('api-version');
$version =$input->getOption('api-version');

Choose a reason for hiding this comment

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

What about this one@wouterj? should we keep support for the deprecated flag to provide a smooth transition?
Also, we're missing a deprecation notice if this should be removed in 7.0

Copy link
Member

@GromNaNGromNaNJun 29, 2023
edited
Loading

Choose a reason for hiding this comment

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

This was modified by#46901.

We need to keep thesymfony option if we want developers to be able use to bash completion for different projects with different Symfony versions on the same computer. The completion script insymfony/console from 5.4.x to 6.1.x sets the option-S but not-a. If the option is removed, the_complete command will fail.

local completecmd=("$sf_cmd""_complete""--no-interaction""-sbash""-c$cword""-S{{ VERSION }}")

We can fallback toapi-version=1 when not specified.

Suggested change
$version =$input->getOption('api-version');
$version =$input->getOption('api-version',1);

It would be better to make this change in a dedicated PR.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

If I understand correctly, here is what you suggest:

  • Create a PR targeting 6.4 as a new feature, makingapi-version fallback to1
  • Updatesymfony option deprecation to be removed in 8.0, when 5.4 is EOLed.

I'll take care of this if it is what you meant

Copy link
Member

Choose a reason for hiding this comment

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

I think we should revert this change completely and leave it as-is. Notice the comment says "kept for compat" without deprecating the old one, which is intentional.

Shell completion scripts are global and there is no reason to make life extremely difficult for developers that work on several Symfony versions, some of which are older than 7.0, for the gain of removing these 2 LOC :)

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

This suits me fine. As you said, these are just 2 lines of code 😄 I reverted this change

Choose a reason for hiding this comment

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

Do I have something to do with this?

$this->assertSame('This is a command I wrote all by myself',$command->getDescription());
}

publicfunctiontestAttributeOverridesProperty()
Copy link
Member

@nicolas-grekasnicolas-grekasJun 29, 2023
edited
Loading

Choose a reason for hiding this comment

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

this one is not legacy 🤔

Copy link
MemberAuthor

@alexandre-dauboisalexandre-dauboisJun 29, 2023
edited
Loading

Choose a reason for hiding this comment

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

That's right, but now that$defaultName and$defaultDescription are removed, it feels irrelevant to me to have this test. I guess this should have been marked as legacy as well when the properties were deprecated? Or maybe am I missing something?

However, I may update this test with a command without the attribute and checking that thegetDefaultName() andgetDefaultDescription() are null

Choose a reason for hiding this comment

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

We should still keep it to ensure no regressions on the topic. (Removing depreciation annotations on the fixture)

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

That's reverted and updated 👍

@nicolas-grekas
Copy link
Member

Thank you@alexandre-daubois.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@nicolas-grekasnicolas-grekasnicolas-grekas left review comments

@GromNaNGromNaNGromNaN left review comments

@wouterjwouterjwouterj left review comments

@xabbuhxabbuhAwaiting requested review from xabbuh

@ycerutoycerutoAwaiting requested review from yceruto

@chalasrchalasrAwaiting requested review from chalasrchalasr is a code owner

+1 more reviewer

@GWilson69GWilson69GWilson69 left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

7.0

Development

Successfully merging this pull request may close these issues.

6 participants

@alexandre-daubois@nicolas-grekas@GromNaN@wouterj@GWilson69@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp