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

Appearance settings

[Console] Run commands when implements SignalableCommandInterface without pcntl and they have'nt signals #42091

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

Closed
wants to merge 0 commits into from

Conversation

PaolaRuby
Copy link
Contributor

@PaolaRuby PaolaRuby commented Jul 13, 2021

Q A
Branch? 5.2
Bug fix? yes
New feature? no
Deprecations? no
Tickets Fix #42076
License MIT

When a command extends a class wich implements SignalableCommandInterface but the command has empty signals to dispatch, it still can be executed, It can be useful when the extension is not available and the command is necessary.
Also, it can be used like a workaround for support other environments, for example windows servers, they don't have pcntl extension

@PaolaRuby PaolaRuby requested a review from chalasr as a code owner July 13, 2021 15:24
@carsonbot carsonbot added this to the 5.2 milestone Jul 13, 2021
@carsonbot
Copy link

Hey!

I see that this is your first PR. That is great! Welcome!

Symfony has a contribution guide which I suggest you to read.

In short:

  • Always add tests
  • Keep backward compatibility (see https://symfony.com/bc).
  • Bug fixes must be submitted against the lowest maintained branch where they apply (see https://symfony.com/releases)
  • Features and deprecations must be submitted against the 5.4 branch.

Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change.

When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor!
If this PR is merged in a lower version branch, it will be merged up to all maintained branches within a few days.

I am going to sit back now and wait for the reviews.

Cheers!

Carsonbot

@PaolaRuby
Copy link
Contributor Author

I don't understand fabbot.io

@@ -502,12 +502,12 @@
         $tester = new ApplicationTester($application);
         $tester->run(['command' => 'foos:bar1'], ['decorated' => false]);
         $this->assertSame('
-                                                          
-  There are no commands defined in the "foos" namespace.

Line 502 has no changes

@chalasr
Copy link
Member

chalasr commented Jul 13, 2021

Thanks for the PR.
Please ignore fabbot here (false positive - he probably drinks too much wine these times).

@OskarStark OskarStark changed the title [ComponentConsole]Run commands when implements SignalableCommandInterface without pcntl and they have'nt signals [Console] Run commands when implements SignalableCommandInterface without pcntl and they have'nt signals Jul 13, 2021
@OskarStark
Copy link
Contributor

@chalasr is 5.2 the right branch, shouldn't it be 5.3? 🤔

@chalasr
Copy link
Member

chalasr commented Jul 14, 2021

@OskarStark I don't think so, 5.2 is not EOM yet and bugfixes must target the lowest branch where they apply

@fredsal
Copy link

fredsal commented Jul 15, 2021

I hope it can be merged before end of support

Copy link
Member

@chalasr chalasr left a comment

Choose a reason for hiding this comment

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

Here are some comments, mostly cosmetic.
I checked out your patch locally and it works as expected 👍

src/Symfony/Component/Console/Application.php Outdated Show resolved Hide resolved
src/Symfony/Component/Console/Tests/ApplicationTest.php Outdated Show resolved Hide resolved
src/Symfony/Component/Console/Tests/ApplicationTest.php Outdated Show resolved Hide resolved
@carsonbot carsonbot changed the title [Console] Run commands when implements SignalableCommandInterface without pcntl and they have'nt signals Run commands when implements SignalableCommandInterface without pcntl and they have'nt signals Jul 15, 2021
@carsonbot carsonbot changed the title Run commands when implements SignalableCommandInterface without pcntl and they have'nt signals [Console] Run commands when implements SignalableCommandInterface without pcntl and they have'nt signals Jul 15, 2021
@PaolaRuby
Copy link
Contributor Author

PaolaRuby commented Jul 15, 2021

@chalasr @stof resolved, thanks for the corrections

@nicolas-grekas
Copy link
Member

Thank you @PaolaRuby.

nicolas-grekas added a commit that referenced this pull request Jul 19, 2021
…terface without pcntl and they have'nt signals (PaolaRuby)

This PR was squashed before being merged into the 5.2 branch.

Discussion
----------

[Console] Run commands when implements SignalableCommandInterface without pcntl and they have'nt signals

| Q             | A
| ------------- | ---
| Branch?       | 5.2
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix [#42076](#42076)
| License       | MIT

When a command extends a class wich implements SignalableCommandInterface but the command has empty signals to dispatch, it still can be executed, It can be useful when the extension is not available and the command is necessary.
Also, it can be used like a workaround for support other environments, for example windows servers, they don't have pcntl extension

Commits
-------

ad63d0b [Console] Run commands when implements SignalableCommandInterface without pcntl and they have'nt signals
@nicolas-grekas
Copy link
Member

(now, it's GitHub who drank too much, marking this PR as closed while it was merged... 🥂 😄 )

This was referenced Jul 26, 2021
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.

7 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.