Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Console] Correctly convert SIGSYS to its name#60168

Merged
nicolas-grekas merged 1 commit into
symfony:6.4from
cs278:sigbaby
Apr 7, 2025
Merged

[Console] Correctly convert SIGSYS to its name#60168
nicolas-grekas merged 1 commit into
symfony:6.4from
cs278:sigbaby

Conversation

@cs278
Copy link
Copy Markdown
Contributor

@cs278 cs278 commented Apr 7, 2025

Q A
Branch? 6.4
Bug fix? yes
New feature? no
Deprecations? no
Issues N/A
License MIT

Because of a PHP easter egg using the SignalMap::getSignalName() method with SIGSYS results in 'SIGBABY' instead of the expected 'SIGSYS' being returned.

https://github.com/php/php-src/blob/213949dc340e17b7234c8a753703b1ab455c8585/ext/pcntl/pcntl_arginfo.h#L398-L400

require 'vendor/autoload.php';
var_dump(Symfony\Component\Console\SignalRegistry\SignalMap::getSignalName(SIGSYS));
// string(7) "SIGBABY"

@cs278 cs278 requested a review from chalasr as a code owner April 7, 2025 15:59
@carsonbot carsonbot added this to the 6.4 milestone Apr 7, 2025
@OskarStark
Copy link
Copy Markdown
Contributor

giphy

@carsonbot carsonbot changed the title Correctly convert SIGSYS to its name [Console] Correctly convert SIGSYS to its name Apr 7, 2025
@nicolas-grekas
Copy link
Copy Markdown
Member

Thank you @cs278.

@nicolas-grekas nicolas-grekas merged commit aa40689 into symfony:6.4 Apr 7, 2025
9 of 11 checks passed
@cs278 cs278 deleted the sigbaby branch April 7, 2025 20:04
This was referenced May 2, 2025
fabpot added a commit that referenced this pull request May 7, 2025
This PR was merged into the 6.4 branch.

Discussion
----------

don't hardcode OS-depending constant values

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

The values of the `SIG*` constants depend on the OS.

For example, on macOS the value of the `SIGSYS` constant is 12 and not 31 making the test added in #60168 fail.

Commits
-------

3213d88 don't hardcode OS-depending constant values
github-merge-queue Bot pushed a commit to Lendable/composer-license-checker that referenced this pull request May 13, 2025
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [symfony/console](https://symfony.com)
([source](https://redirect.github.com/symfony/console)) | `7.2.5` ->
`7.2.6` |
[![age](https://developer.mend.io/api/mc/badges/age/packagist/symfony%2fconsole/7.2.6?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/packagist/symfony%2fconsole/7.2.6?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/packagist/symfony%2fconsole/7.2.5/7.2.6?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/packagist/symfony%2fconsole/7.2.5/7.2.6?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>symfony/console (symfony/console)</summary>

###
[`v7.2.6`](https://redirect.github.com/symfony/console/releases/tag/v7.2.6)

[Compare
Source](https://redirect.github.com/symfony/console/compare/v7.2.5...v7.2.6)

**Changelog**
(symfony/console@v7.2.5...v7.2.6)

- bug
[symfony/symfony#60168](https://redirect.github.com/symfony/symfony/issues/60168)
\[Console] Correctly convert `SIGSYS` to its name (@&#8203;cs278)

</details>

---

### Configuration

πŸ“… **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

β™» **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

πŸ”• **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/Lendable/composer-license-checker).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4yNjQuMCIsInVwZGF0ZWRJblZlciI6IjM5LjI2NC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
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.

4 participants