Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use strict option for in_array() function #1929

Merged
merged 2 commits into from
Mar 22, 2021

Conversation

deguif
Copy link
Collaborator

@deguif deguif commented Mar 18, 2021

No description provided.

@deguif deguif self-assigned this Mar 18, 2021
* @return bool True if index exists
*/
public function indexExists($name)
public function indexExists(string $name)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should not be a BC break as since PHP 7.2 and the parameter type widening feature (https://wiki.php.net/rfc/parameter-no-type-variance) a subclass is allowed to widen the type, so that shouldn't break existing code overriding this method.

Copy link
Owner

@ruflin ruflin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just in case it will break something, should we mention it in the changelog?

@deguif
Copy link
Collaborator Author

deguif commented Mar 22, 2021

Just in case it will break something, should we mention it in the changelog?

You're right, I'll add a changelog.

@deguif deguif merged commit 545d5b4 into ruflin:master Mar 22, 2021
@deguif deguif deleted the use-strict-in_array branch March 22, 2021 17:28
@deguif deguif added this to the 7.1.1 milestone Mar 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants