The signatures will be compatible in *PHP >= 7.2*, because of PHP RFC: 
Parameter Type Widening 
<https://wiki.php.net/rfc/parameter-no-type-variance> – many thanks to 
Niklas, btw.

It's a new standard, thus it should have its own namespace and package – 
otherwise one will never be able use both PSRs within one project.

On Tuesday, April 11, 2017 at 11:40:25 PM UTC+2, Stefano Torresi wrote:
>
> Hey Michael,
>
> That would trigger a fatal error because the signatures are not compatible.
>
> Il giorno mar 11 apr 2017 alle ore 23:01 Michael Mayer <
> [email protected] <javascript:>> ha scritto:
>
>> Compatibility ftw!
>>
>> Hence, a new namespace and a new composer package – I do not care about 
>> the concrete new names though:
>>
>> namespace Psr\Log;
>>
>> interface LoggerInterface
>> {
>>     public function alert($message, array $context = array());
>> }
>>
>>
>> namespace Psr\Log\V2;
>>
>> interface LoggerInterface
>> {
>>     public function alert(string $message, array $context = array()):void
>> ;
>> }
>>
>> class Logger implements \Psr\Log\LoggerInterface, \Psr\Log\V2\
>> LoggerInterface
>> {
>>     public function alert($message, array $context = array()):void
>>     {
>>         // …
>>         return;
>>     }
>> }
>>
>> Bests,
>> Michael Mayer
>>
>

-- 
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/php-fig/bb51e9a9-c1dc-40f8-81ae-c54106bf177a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to