LiipImagineBundle icon indicating copy to clipboard operation
LiipImagineBundle copied to clipboard

type declarations

Open dbu opened this issue 4 years ago • 3 comments

switch all classes and interfaces to return type declarations over @return and parameter&property type declarations.

this means bumping the minimum PHP version to 7.4. imo this is worth it.

at the same time, make everything we can final and methods private over protected, unless they are explicitly meant as extension points.

dbu avatar Nov 04 '21 12:11 dbu

I'll work on this! I'll use Rector for this. Should I add the config to the repository or not?

stephanvierkant avatar Dec 07 '21 16:12 stephanvierkant

thanks for offering to help!

to do the cleanup changes, rector sounds like the right tool. about adding the configuration: could we enable some rules in php-cs-fixer to detect incomplete property types rather than adding another tool into the CI?

dbu avatar Dec 07 '21 16:12 dbu

I'd like to see the rector file in the repo, as it's not part of the CI. It will make it easier as rector as more rules for us to adjust to what we use. Especially as we drop support for older versions as they reach EOL.

tacman avatar Feb 09 '22 02:02 tacman