Created
April 15, 2020 22:04
-
-
Save carusogabriel/e0b36e7cd9e6846e04f79008cb7e35d6 to your computer and use it in GitHub Desktop.
Impact of RFC
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wrong native return type of __call(): string | |
https://github.com/mockery/mockery/blob/05b2459503f7e821295dd22c18d206d3e49d957b/tests/PHP70/Generator/StringManipulation/Pass/MagicMethodTypeHintsPassTest.php#L349 | |
wrong native return type of __callstatic(): int | |
https://github.com/mockery/mockery/blob/05b2459503f7e821295dd22c18d206d3e49d957b/tests/PHP70/Generator/StringManipulation/Pass/MagicMethodTypeHintsPassTest.php#L353 | |
wrong native return type of __call(): string | |
https://github.com/mockery/mockery/blob/05b2459503f7e821295dd22c18d206d3e49d957b/tests/PHP70/Generator/StringManipulation/Pass/MagicMethodTypeHintsPassTest.php#L380 | |
wrong native return type of __call(): int | |
https://github.com/mockery/mockery/blob/05b2459503f7e821295dd22c18d206d3e49d957b/tests/PHP70/Generator/StringManipulation/Pass/MagicMethodTypeHintsPassTest.php#L382 | |
wrong native return type of __call(): void | |
https://github.com/cakephp/cakephp/blob/8718b2e9bbd092b991a1da6472d1a28e89b63dac/src/Controller/Component/FlashComponent.php#L137 | |
wrong native return type of __get(): void | |
https://github.com/sebastianbergmann/object-enumerator/blob/9bb439a4522a4ea30382861dfb87653c4f4b375b/tests/_fixture/ExceptionThrower.php#L23 | |
wrong native return type of __call(): string | |
https://github.com/solariumphp/solarium/blob/500018020f7dc34f29cfc474ca0432ae22772640/src/QueryType/Stream/ExpressionBuilder.php#L251 |
To me, none of those look like actual bugs. LSP allows narrowing the return type, this looks like what's happening here.
@nicolas-grekas Indeed, even __get()
fits under the LSP. I'll update the RFC 👍
The script that generated these results: https://gist.github.com/carusogabriel/6b855c2b1edf71ddba08cd59fd39f357
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This result was only possible thanks to @nikic's script: https://gist.github.com/nikic/a2bfa3e2f604f66115c3e4b8963a6c72.