joomla-cms icon indicating copy to clipboard operation
joomla-cms copied to clipboard

[5.2] $this: Cleanup of typehints for phpstan

Open Hackwar opened this issue 1 year ago • 3 comments

Summary of Changes

When typehinting $this in our layouts, we use both the full qualified name and a shortened version with an import. phpstan unfortunately does not currently understand the version with the import and thus this unifies this to the long version.

Testing Instructions

Codereview

Link to documentations

Please select:

  • [ ] Documentation link for docs.joomla.org:

  • [X] No documentation changes for docs.joomla.org needed

  • [ ] Pull Request link for manual.joomla.org:

  • [X] No documentation changes for manual.joomla.org needed

Hackwar avatar Apr 24 '24 20:04 Hackwar

Then we should disable the rule in phpstan, is there an issue to check at phpstan for this feature?

HLeithner avatar Apr 25 '24 09:04 HLeithner

Then we should disable the rule in phpstan, is there an issue to check at phpstan for this feature?

exactly

brianteeman avatar Apr 25 '24 10:04 brianteeman

https://github.com/phpstan/phpstan/issues/10936

Hackwar avatar Apr 25 '24 14:04 Hackwar

Issue deferred to PHPStan, change not required in Joomla. Thanks Hannes.

Bodge-IT avatar Sep 03 '24 11:09 Bodge-IT

Is this excluded in our PHPStan setup?

laoneo avatar Sep 03 '24 15:09 laoneo

no, it isn't.

Hackwar avatar Sep 03 '24 21:09 Hackwar