What's needed to do it? A list of new shiny stuff and rules for it? Could be done. What else?
On Wed, Dec 15, 2021 at 5:34 PM Alessandro Lai <alessandro.la...@gmail.com> wrote: > > Hello and welcome! > PSR-12 is unfortunately not up to date with the latest shiny stuff that we > got with PHP 8+. We recently approved the PER workflow, so we could try to > migrate PSR-12 to a PER, and make it easier to update. > > Anyone willing to help on this? > > Il giorno mercoledì 15 dicembre 2021 alle 15:32:40 UTC+1 ajn.n...@gmail.com > ha scritto: >> >> Hello, >> >> I wanted to request an exception rule for PSR-12. >> >> Currently there is this rule: >> >> > Method and function names MUST NOT be declared with space after the method >> > name. The opening brace MUST go on its own line, and the closing brace >> > MUST go on the next line following the body. [...] When the argument list >> > is split across multiple lines, the closing parenthesis and opening brace >> > MUST be placed together on their own line with one space between them. >> >> This means, if you want to use PHP 8 constructor property promotion with >> PSR-12 it looks like this: >> >> class User { >> public function __construct( >> private Service $service >> ){ >> } >> } >> >> which I think looks broken. Could we add a rule that opening and closing >> brace can be on the same line when used for constructor and if body is empty? >> >> So it would be ok to look like this: >> >> class User { >> public function __construct( >> private Service $service >> ){} >> } >> >> ? >> > -- > You received this message because you are subscribed to the Google Groups > "PHP Framework Interoperability Group" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to php-fig+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/php-fig/3a674fc4-37af-4a1d-af68-f9debccb996an%40googlegroups.com. -- You received this message because you are subscribed to the Google Groups "PHP Framework Interoperability Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to php-fig+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/CA%2BFA5VXitvoS5wGq1nrSiQZKvJRga4a0PvZ6JvEDxg7c_Re9dQ%40mail.gmail.com.