You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The text was updated successfully, but these errors were encountered:
omoustaouda
changed the title
PHP syntax incompatibility in \SilverStripe\RestfulServer\RestfulServer::resolveClassName
PHP syntax incompatibility in resolveClassName function
Oct 15, 2019
Yep, if that's the only occurrence of PHP 7 only syntax then we'd welcome a PR to remove it. While SilverStripe 4.5 onwards will require PHP 7, these satellite modules are currently designed to cater to multiple versions of SilverStripe framework. When the time comes that we will depend on a new feature in core which requires a version bump, we can then start adding new APIs that use PHP 7 syntax.
Package: silverstripe/restfulserver
Version: 2.2.0
Hello,
in this function
\SilverStripe\RestfulServer\RestfulServer::resolveClassName
the return type is specified.
: string
This is raising a syntax parsing error in PHP 5.6
but the package is not preventing the usage of PHP 5.6.
I see that this is the only function having the return type specified,
would be safe to remove the return type here?
If yes I can open a 2-lines PR.
This would restore compatibility again with PHP 5.6.
P.S.
In the return statement the null coalescence operator is used too,
again, is present only in this function.
Pulls request
The text was updated successfully, but these errors were encountered: