Skip to content

FR: Read native types from stub files as well as PHPDoc #3525

@dktapps

Description

@dktapps

Feature request

The jetbrains/phpstorm-stubs repo has an outdated stub for ext-pthreads, which creates some problems for my project. I don't know why, but these errors started to appear on 0.12.30 (they didn't on 0.12.29): https://phpstan.org/r/b240c70a-1800-471d-a6c4-bc861cbf3c82

This code is compatible with the actual pthreads extension, but not with the stubs. I tried to fix this problem with the following stub, and it did not work:

class Thread extends Threaded{

    /**
     * @param int $options
     * @return bool
     */
    public function start(int $options = PTHREADS_INHERIT_ALL){}
}

This is a showstopper to upgrading to 0.12.30 for me, because the error mentioned is non-ignorable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions