Skip to content

PHP gRPC extension breaks use of --parallel #294

Closed as not planned
Closed as not planned
@mbomb007

Description

@mbomb007

Describe the bug

A clear and concise description of what the bug is.

See grpc/grpc#20250

To reproduce

Steps to reproduce the behavior:

  1. Add the grpc PHP extension
test=$(php -r "echo ini_get('grpc.enable_fork_support');")
echo "grpc.enable_fork_support: $test"
test=$(php -r "echo ini_get('grpc.poll_strategy');")
echo "grpc.poll_strategy: $test"

The defaults are

grpc.enable_fork_support = 0
grpc.poll_strategy = 
  1. Run PHPCS using --parallel=2. It will hang.

Expected behavior

It would be helpful if src/Runner.php would check if the extension exists and either

ini_set('grpc.enable_fork_support', true);
ini_set('grpc.poll_strategy', 'epoll1');

Or, if it detects that fork support is disabled, emit a warning and set --parallel=1.

Versions (please complete the following information)

Operating System [Docker wodby/drupal-php:8.3-dev-4.52.0]
PHP version [8.3]
PHP_CodeSniffer version [3.8.1]
Standard [Drupal,DrupalPractice]
Install type [Composer]

Additional context

Add any other context about the problem here.

Related: #10

Parent issue: wodby/drupal-php#102

Please confirm:

  • I have searched the issue list and am not opening a duplicate issue.
  • I confirm that this bug is a bug in PHP_CodeSniffer and not in one of the external standards.
  • I have verified the issue still exists in the master branch of PHP_CodeSniffer.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions