Skip to content

[Symfony/Process] setTimeout and setIdleTimeout type hinting inconsistency #35032

Closed
@hktr92

Description

@hktr92

Symfony version(s) affected: 5.0

Description
I've implemented a process runner command. While in documentation for symfony/process is shown int data type, the method signature requires nullable float.
image

Possible Solution

  1. Either update documentation to specify to use float values (e.g.: 3600.0)
  2. Either change type hinting from ?float to ?int

Since it's about to be timeout in seconds, I'd go with int, but float brings the flexibility for some cases in which someone wants to put, let's say, 30.5 seconds timeout.

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