Skip to content

RemovedPHP4StyleConstructors: should not apply to interfaces#921

Merged
wimg merged 1 commit intodevelopfrom
feature/php4constructors-should-not-apply-to-interfaces
Nov 4, 2019
Merged

RemovedPHP4StyleConstructors: should not apply to interfaces#921
wimg merged 1 commit intodevelopfrom
feature/php4constructors-should-not-apply-to-interfaces

Conversation

@jrfnl
Copy link
Copy Markdown
Member

@jrfnl jrfnl commented Oct 22, 2019

Introduced in #751 / PHPCompatibility 9.1.0.

While interfaces can declare methods with the same name as the interface, as the class in which the method will be implemented will be called differently, those methods will never be seen as constructors, so shouldn't trigger this error.

Mea culpa.

Related: squizlabs/PHP_CodeSniffer#2663

Also see: https://3v4l.org/qbXJS

Introduced in 751 / 9.1.0.

While interfaces can declare methods with the same name as the interface, as the class in which the method will be implemented will be called differently, those methods will never be seen as constructors, so shouldn't trigger this error.

Mea culpa.

Related: squizlabs/PHP_CodeSniffer 2663
@jrfnl jrfnl added Type: bug PR: quick merge PR only contains relatively simple changes PR: ready for review labels Oct 22, 2019
@jrfnl jrfnl added this to the 9.x Next milestone Oct 22, 2019
@jrfnl jrfnl requested a review from wimg October 22, 2019 23:34
@wimg wimg merged commit 1835efd into develop Nov 4, 2019
@wimg wimg deleted the feature/php4constructors-should-not-apply-to-interfaces branch November 4, 2019 14:32
@jrfnl jrfnl removed PR: quick merge PR only contains relatively simple changes PR: ready for review labels Nov 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants