Luracast / Restler

Simple and effective multi-format Web API Server to host your PHP API as Pragmatic REST and/or RESTful API
http://luracast.com/products/restler/
GNU Lesser General Public License v2.1
1.36k stars 315 forks source link

specify php7 incompatibilities in composer #566

Closed jeff1985 closed 7 years ago

jeff1985 commented 7 years ago

The 3.0.0 version is currently not php7 compatible. You can easily verify that by running: vendor/luracast$ find . -type f -name "*.php" -exec php -l {} \; | grep -v 'No syntax errors'

For 3.0.0 version from composer the command shows:

Fatal error: Cannot use Luracast\Restler\Data\String as String because 'String' is a special class name in ./restler/features/bootstrap/RestContext.php on line 4
Errors parsing ./restler/features/bootstrap/RestContext.php
Warning: The use statement with non-compound name 'PDO' has no effect in ./restler/public/examples/_007_crud/DB/PDO/Sqlite.php on line 9
Fatal error: Cannot use 'String' as class name as it is reserved in ./restler/vendor/Luracast/Restler/Data/String.php on line 14
Errors parsing ./restler/vendor/Luracast/Restler/Data/String.php
Fatal error: Cannot use Luracast\Restler\Data\String as String because 'String' is a special class name in ./restler/vendor/Luracast/Restler/Resources.php on line 4
Errors parsing ./restler/vendor/Luracast/Restler/Resources.php
Fatal error: Cannot use Luracast\Restler\Data\String as String because 'String' is a special class name in ./restler/vendor/Luracast/Restler/Routes.php on line 5
Errors parsing ./restler/vendor/Luracast/Restler/Routes.php
Fatal error: Cannot use Luracast\Restler\Data\String as String because 'String' is a special class name in ./restler/vendor/Luracast/Restler/UI/Forms.php on line 6
Errors parsing ./restler/vendor/Luracast/Restler/UI/Forms.php

I also have seen, that you denied to accept a pull request fixing compatibility issues in the master branch. As specified here, the problems have been resolved only in RC6 branch. Please also note, that this pull request is now 6 months old. So it seems clear to me, that you've chosen currently not to support php7 in the master branch.

Currently packagist does not show any maximum php version requirements. Please specify the maximum php version in branches before RC6 to allow composer to output a compatibility warning when trying to install i.e. 3.0.0 on a system running php7.

Arul- commented 7 years ago

Agreed 👍 Thanks for contributing to Restler!

Arul- commented 7 years ago

On a second thought decided to make it compatible with PHP 7 instead

See 581d8d6dc5d37f439765f89725a92f85e98f1826

jhfrintrop commented 7 years ago

Please update https://github.com/Luracast/Restler-Framework

Arul- commented 7 years ago

@jhfrintrop Done! Sorry for the delay