Releases: EvilFreelancer/routeros-api-php
socket_options support added
Hello! In this release was added support of socket_options
parameter of Config class, due to #68
- https://www.php.net/manual/en/context.socket.php
- https://github.com/EvilFreelancer/routeros-api-php#list-of-available-configuration-parameters
So now you may specify stream context options like bindto
or tcp_nodelay
.
New timeouts added
To Config class added support of following parameters:
- socket_timeout
- ssh_timeout
Documentation updated.
PHP 8 support added
Now the routeros-api-php
library possible to use in PHP 8 applications!
1.3.1
ssl_options
parameter added to config, you can configure any settings described in SSL context options documentation.
Some additional details available in comments of source code.
Simple usage example:
$client = new Client([
'timeout' => 1,
'host' => '127.0.0.1',
'user' => 'admin',
'pass' => 'admin',
'ssl' => true,
'ssl_options' => [
'ciphers' => 'ADH:ALL', // ADH:ALL, ADH:ALL@SECLEVEL=0, ADH:ALL@SECLEVEL=1 ...
'verify_peer' => true, // Require verification of SSL certificate used.
'verify_peer_name' => false, // Require verification of peer name.
'allow_self_signed' => true, // Allow self-signed certificates. Requires verify_peer.
],
]);
1.3.0
List of changed in version 1.3
Deprecated methods was removed
Here is the list:
- write
- w
- wr
- wri
Instead of these methods now need to use
- query
- q
- qr
- qri
Usage of deprecated methods was also removed from all examples.
Laravel Facade method \RouterOS::getClient() renamed to \RouterOS::client()
Instead of \RouterOS::getClient()
need to use \RouterOS::client()
, plus was added \RouterOS::config()
which contains all settings of installation provided by Laravel configs.
/export command support added
As described in issue #32 was not possible to export configuration from RouterOS, but from 1.3 it will be possbie.
Solution is based on divineomega/php-ssh-connection package.
Export can be triggered in two ways, details is here.
Laravel classes renamed
Instead of long class names, abbreviated names are now used, this makes the code a little more readable.
Tests show that this does not lead to problems, since the service is registered automatically.
Other minor changes
- Documentation updated, added information about:
- More examples and notes about
equal
method - Known issues (which in general issues from RouterOS side)
- information about
/export
and->export()
method
- More examples and notes about
- Code cleanup, non-used code removed, documentation code refactored
- larapack/dd added to require-dev packages list of
composer.json
- Finetune of
preconf.tcl
script, colors disabled, now script work faster phpunit/phpunit
version changed from 7.0 to 8.0- Additional visualization of tests with help of
limedeck/phpunit-detailed-printer
package - Names of some tests was changed
1.2.0
- Migration to PHP 7.2, it now minimal required version
- Laravel support added, library now can be installed as plugin and used via
\RouterOS::getClient();
- Tests fixed, no errors in Travis now
The First
After almost 3 months of hard work I've finally may announce 1.0 release of this beautiful project 🎆🎆🎆
Changes from version 0.9
- Minimal required version of PHP changed from 7.0 to 7.1
- New
ResponseIterator
class was added for issues with large amount of lines in response from RouterOS, it may be called directly via__constructor
of via methodreadAsIterator
in Client class - Logic of reading responses from RouterOS was rewritten in order to increase processing speed of responses, but if this is not enough, then you may use
ResponseIterator
- Documentation updated, all new features described
- And traditional "many bugs fixed (and probably some added)"
Changes in Query class
- New method
->where()
will added to simplify creating queries - New method
->operaions()
will applies operations to the values in the stack - New method
->tag()
will append tag label to your query
Changes in Client class
- New
->query($endpoint, $where, $operations, $tag)
method for creating queries with simplified syntax ->write()
method marked as deprecated, all short methods with->w
was also marked as deprecated
If you have any ideas or suggestions you can contact me via my Twitter EvilFreelancer. Good luck to you!
Stream refactoring
- Part of logic moved to streams
- 100% tests coverage of library
0.8.1: Merge pull request #4 from matracine/login-legacy
- legacy firmware autodetect added by @matracine
0.8
- Simple syntax of queries added
- Test coverage increased
- Refactoring of Client class, socket methods moved to separated Socket trait class