PHP 5.3: new ForbiddenToStringParameters sniff by jrfnl · Pull Request #815 · PHPCompatibility/PHPCompatibility

Skip to content

Navigation Menu

Sign in

Appearance settings

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Conversation

@jrfnl

Copy link Copy Markdown

Member

@jrfnl jrfnl commented

Jun 14, 2019

edited

Loading

The __toString() magic method can no longer accept arguments.

Ref: https://www.php.net/manual/en/migration53.incompatible.php


Potential additional enhancement which could be added (now or later):

  • Check whether direct calls to __toString() methods pass arguments, i.e. self::__toString($param), $obj->__toString($param).

@jrfnl jrfnl added this to the 9.2.0 milestone

Jun 14, 2019

@jrfnl jrfnl requested a review from wimg

June 14, 2019 11:00

@jrfnl jrfnl force-pushed the php-5.3/removed-to-string-arguments branch from 19ee38f to a64f0da Compare

June 14, 2019 11:01

@jrfnl jrfnl force-pushed the php-5.3/removed-to-string-arguments branch from a64f0da to 292ca56 Compare

June 14, 2019 11:02

@wimg wimg merged commit f55c14f into master

Jun 20, 2019

@delete-merged-branch delete-merged-branch bot deleted the php-5.3/removed-to-string-arguments branch

June 20, 2019 18:50

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

Reviewers

@wimg wimg wimg approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

9.2.0

Development

Successfully merging this pull request may close these issues.

2 participants

@jrfnl @wimg