Skip to content

StreamWrapper:dir_opendir() $options is documented as accepting string, should be int #3336

Description

@cmlara

Describe the issue

StreamWrapper:dir_opendir() is currently documented as the $options value being unused and accepting a string.

* @param string $options Unused option variable

The PHP StreamWrapper docs however document that the signature should be an integer:
public function streamWrapper::dir_opendir(string $path, int $options): bool
https://www.php.net/manual/en/streamwrapper.dir-opendir.php

This creates conflicts (static analysis warnings) when one extends the class and either overrides dir_opendir() or attempts to implement a third party interface that documents the typehint as integer.

Considering the option is unused, the PHP spec is that this should be an integer (PHP will provide an INT), and that it is documentation not an inline typehint this should be non-breaking to update.

Links

https://docs.aws.amazon.com/aws-sdk-php/v2/api/class-Aws.S3.StreamWrapper.html#_dir_opendir

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

documentationThis is a problem with documentation.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions