Skip to content

Releases: EvilFreelancer/routeros-api-php

socket_options support added

19 Oct 07:57
Compare
Choose a tag to compare

Hello! In this release was added support of socket_options parameter of Config class, due to #68

So now you may specify stream context options like bindto or tcp_nodelay.

New timeouts added

28 Jul 08:26
Compare
Choose a tag to compare

To Config class added support of following parameters:

  • socket_timeout
  • ssh_timeout

Documentation updated.

PHP 8 support added

30 Jan 19:29
Compare
Choose a tag to compare

Now the routeros-api-php library possible to use in PHP 8 applications!

1.3.1

06 Jul 23:52
Compare
Choose a tag to compare

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

01 Jul 20:15
2f822d8
Compare
Choose a tag to compare

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
  • 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

05 Jan 02:52
Compare
Choose a tag to compare
  • 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

25 Jul 09:11
2af5ab7
Compare
Choose a tag to compare

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 method readAsIterator 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

25 Mar 07:36
bb3e52a
Compare
Choose a tag to compare
  • Part of logic moved to streams
  • 100% tests coverage of library

0.8.1: Merge pull request #4 from matracine/login-legacy

03 Mar 15:30
952e4ef
Compare
Choose a tag to compare

0.8

03 Mar 15:32
Compare
Choose a tag to compare
0.8
  • Simple syntax of queries added
  • Test coverage increased
  • Refactoring of Client class, socket methods moved to separated Socket trait class