Given that PSRs packages are just interfaces, the problem space comes down to type hinting and that’s basically it. There’s no need for an interface only file to have a declare(strict_types); declaration since it has no effect on a file with no real code. The nature of exceptions (implements \Throwable versus extends \Exception) falls on the edge of the type hinting issue.
So the question is: How much do we want scalar type hinting (and return type hinting, throwable, iterable) in PSRs? Do we want these things enough to exclude PHP 5 consumers? More to the point, who is our real audience? I don’t think our audience is WordPress (still defining their minimum version as 5.2.5). Is our audience a bunch of green fielders who are pulling in Symfony 4 (which requires 7.1+) ?
--
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+u...@googlegroups.com.
To post to this group, send email to php...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/e4b31600-770b-4d26-a9b6-5e0114dd04ee%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to php-fig+unsubscribe@googlegroups.com.
To post to this group, send email to php...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/e4b31600-770b-4d26-a9b6-5e0114dd04ee%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/58C2F471-8E84-4DA7-AEB6-F2E78F3393CC%40gmail.com.
To unsubscribe from this group and stop receiving emails from it, send an email to php-fig+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/CAAqcDMj7nuahPK86RVPT%3DQ%2B0fFAqBu0LzZ3tZKuu%2Bi4Q8EEtJA%40mail.gmail.com.
Ok, I see.Could this be solved with php 7.2, that implements parameter type widening? (https://wiki.php.net/rfc/parameter-no-type-variance)So we can keep releasing interfaces compatible with php5 and in a short future release the v2.0 compatible with php ^7.2.I think that this feature was added specially for things like this.El 28 oct 2017, a las 19:54, Michael Cullum <m...@michaelcullum.com> escribió:Oscar,This was discussed on Slack however those there agreed it didn't make sense to do releasing new version of the interface for each PHP version.The reason being as then you have a client application that has one library requiring one version, and another library requiring another version which would be incompatible with each other.Implementing libs also couldn't support both 1.x and 2.x if they support PHP 7 as you can't leave out the type declaration of extending an interface, and having it in PHP 5 will throw an error. So implementing libs would require 1.x or 2.x but never both causing the above issue in client applications.
--
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+u...@googlegroups.com.
To post to this group, send email to php...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/a67e9ae8-506c-49ce-842e-45f5e3617d40%40googlegroups.com.