I'd argue what is confusing here is the lack of parenthesis on the 
anonymous class in the example and not that section 4 doesn't cover 
anonymous classes explicitly. If we do anything, it would be that we add 
adjust the code sample and describe the change in errata.

On Friday, January 24, 2020 at 3:35:55 AM UTC-8, Alex Makarov wrote:
>
> I'd prefer errata as well. 
>
> On Fri, Jan 24, 2020 at 2:23 PM Alessandro Lai 
> <[email protected] <javascript:>> wrote: 
> > 
> > First we need the opinion of the editor (Korvin Szanto), to decide if we 
> want to correct course or just clarify our intention. 
> > 
> > IMHO, looking at the code example, it seems that we're not requiring the 
> parentheses, but it would be inconsistent, so I would prefer an errata that 
> requires them. 
> > 
> > This PR contains my proposed fix, minus the errata text that should be 
> added in the meta: https://github.com/php-fig/fig-standards/pull/1206 
> > 
> > Il giorno venerdì 24 gennaio 2020 11:12:59 UTC+1, Alex Makarov ha 
> scritto: 
> >> 
> >> How would you word it instead? 
> >> 
> >> On Fri, Jan 24, 2020 at 11:46 AM Alessandro Lai 
> >> <[email protected] <javascript:>> wrote: 
> >> > 
> >> > While following PSR-12 implementation on PHP-CS-Fixer, a comment 
> indicated a possible inconsistency in the PSR-12 text: 
> https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues/4502#issuecomment-578006523
>  
> >> > 
> >> > The issue is in the fact that chapter 4 says: 
> >> > 
> >> > The term “class” refers to all classes, interfaces, and traits. 
> >> > [...] 
> >> > When instantiating a new class, parentheses MUST always be present 
> even when there are no arguments passed to the constructor. 
> >> > 
> >> > But chapter 8 for anonymous classes says: 
> >> > 
> >> > Anonymous Classes MUST follow the same guidelines and principles as 
> closures in the above section. 
> >> > 
> >> > <?php 
> >> > 
> >> > $instance = new class {}; 
> >> > 
> >> > 
> >> > Should we make this clearer? 
> >> > 
> >> > -- 
> >> > 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 [email protected] <javascript:>. 
> >> > To view this discussion on the web visit 
> https://groups.google.com/d/msgid/php-fig/4f9352d1-f65b-47bb-9c08-e06ecc6ece1f%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 [email protected] <javascript:>. 
> > To view this discussion on the web visit 
> https://groups.google.com/d/msgid/php-fig/53ab5bcd-6f18-4b71-aee3-1f1838a98d84%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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/php-fig/e7f2b331-0d37-467e-a240-c726f08d325a%40googlegroups.com.

Reply via email to