bump php version to 5.5+, update readme

pull/2/head
toimtoimtoim 8 years ago
parent 030f0d526b
commit f51e71cffd
  1. 14
      README.md
  2. 2
      composer.json
  3. 2
      tests/ModbusMaster/MockServerTestCase.php

@ -2,11 +2,11 @@
Implementation of the basic functionality of the Modbus TCP and UDP based protocol using PHP. Implementation of the basic functionality of the Modbus TCP and UDP based protocol using PHP.
**NOTE: This is a fork to fix & update the library code (and code alone). Notably, the tests are probably all broken.** **NOTE: This is a fork to fix & update the library code (and code alone).**
> **What's new** > **What's new**
> >
> This fork adds a namespace and fixes issues encountered when porting to PHP 7 > This fork adds a namespace and fixes issues encountered when porting to PHP 7, fixes old MS Windows specific tests
## Implemented features ## Implemented features
@ -26,6 +26,7 @@ Implementation of the basic functionality of the Modbus TCP and UDP based protoc
## Requirements ## Requirements
* The PHP extension php_sockets.dll should be enabled (server php.ini file) * The PHP extension php_sockets.dll should be enabled (server php.ini file)
* PHP 5.5+
## Example ## Example
@ -53,6 +54,15 @@ Use the `setTimeout($seconds)` and `setSocketTimeout($read_timeout_sec, $write_t
Most of the code is (to some extent) commented and documented with PhpDoc. You should get useful tooltips in your IDE. Most of the code is (to some extent) commented and documented with PhpDoc. You should get useful tooltips in your IDE.
## Tests
To run the test suite, you need install the dependencies via composer, then
run PHPUnit.
NB: PHP 5.6+ is required for tests
composer install
vendor/bin/phpunit
## GoogleCode legacy docs & downloads ## GoogleCode legacy docs & downloads

@ -4,7 +4,7 @@
"description": "PhpModbus with namespaces and updated to PHP 7", "description": "PhpModbus with namespaces and updated to PHP 7",
"license": "LGPL", "license": "LGPL",
"require": { "require": {
"php": "^5.3.2 || ^7.0", "php": "^5.5 || ^7.0",
"ext-sockets": "*" "ext-sockets": "*"
}, },
"require-dev": { "require-dev": {

@ -23,7 +23,7 @@ abstract class MockServerTestCase extends TestCase
$clientData[] = $output; $clientData[] = $output;
}); });
if ('WIN' !== strtoupper(substr(PHP_OS, 0, 3))) { if (strpos(PHP_OS, 'WIN') === false) {
// wait to spin up. needed for linux. unnessecary on Windows 10. // wait to spin up. needed for linux. unnessecary on Windows 10.
// Ugly but even with 150ms sleep test run faster on Linux // Ugly but even with 150ms sleep test run faster on Linux
usleep(150000); usleep(150000);

Loading…
Cancel
Save