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] [Command] Fix Closure code binding when it is a static anonymous function#39932

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

@fancyweb
Copy link
Contributor

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

I'm building a single command application and I did:

->setCode(staticfunction (InputInterface$input,OutputInterface$output):void {// my code})

and it results in a warningCannot bind an instance to a static closure + an exceptionYou must override the execute() method in the concrete command class. I guess we should silently fail here if the Closure is not bindable.

@carsonbotcarsonbot added this to the4.4 milestoneJan 22, 2021
@carsonbotcarsonbot changed the title[Console][Command] Fix Closure code binding when it is a static anonymous function[Console] [Command] Fix Closure code binding when it is a static anonymous functionJan 22, 2021
@chalasr
Copy link
Member

Thank you Thomas.

@chalasrchalasr merged commitc6f5e2a intosymfony:4.4Jan 22, 2021
@fancywebfancyweb deleted the console/set-command-code-static-closure branchJanuary 22, 2021 12:44
This was referencedJan 27, 2021
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

@jderussejderussejderusse approved these changes

@chalasrchalasrAwaiting requested review from chalasrchalasr is a code owner

Assignees

No one assigned

Projects

None yet

Milestone

4.4

Development

Successfully merging this pull request may close these issues.

5 participants

@fancyweb@chalasr@nicolas-grekas@jderusse@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp