Category: library

  • PHP Library for Project Version Management

    Version Stable License

    This library provides tasks for automating versioning of your PHP projects.

    It allows you to increment the version based on different levels (major, minor, patch, dev, beta, rc), and update version references in various files such as PHP files, README.md, package.json, and readme.txt.

    Installation

    Run the following command in your project directory:

    composer require --dev magicoli/php-bump-library

    And add the following script to your composer.json file:

     "scripts": {
        "bump-version": "robo --load-from=vendor/magicoli/php-bump-library/RoboFile.php bump:version"
      }

    Usage

    composer bump-version [level]

    Replace [level] with the desired level of version increment, such as major, minor, patch, rc, beta, or dev. If you ommit it, the default level is patch.

    Alternatively, you can run the script directly with the following command:

    robo bump:version
    # or
    robo --load-from=path/to/RoboFile.php bump:version

    Make sure to adjust RoboFile.php to the actual path of the file in your project.

    About Versioning

    Semantic Versioning follows a specific order of version increments:

    Development stages (M.m.p-stage):

    • Dev: development versions that are not yet stable or released.
    • Beta: pre-release versions that are closer to the stable release but may still have minor issues.
    • RC: release candidates, which are close to the final release but may require additional testing.

    Releases (M.m.p):

    • Patch: backward-compatible bug fixes.
    • Minor: added functionality, still backward-compatible manner.
    • Major: big bada boom.

    Note that dev, beta, and rc versions are considered inferior to the normal versions and are typically used in pre-release stages or development cycles: 1.0-dev < 1.0-beta < 1.0-rc < 1.0.

    For example, if your version is 1.0.0 and you bump it on the dev level, new version will be 1.0.1-dev (note the pach increment). If you bump the dev to beta, it will keep its main version and become 1.0.1-beta. And if you bump 1.0.1-beta without arguments, the new version will be 1.0.1.

    License

    This library is licensed under the AGPL-v3 License.

  • OpenSimulator REST PHP library and command-line client

    Version 1.0.5 Stable 1.0.5 Requires PHP 5.7 License AGPLv3

    This library allows to communicate with Robust or OpenSimulator instance with rest console enabled.

    It can be used inside a PHP project, or as a command-line client for OpenSimulator grids.

    Available commands can be found here: http://opensimulator.org/wiki/Server_Commands

    Prerequisites

    Remote connection must be enabled in your Robust .ini file.

    Do not leave default values!. You should never need to type username and password manually, so you can safely generate long random strings.

    You must choose a specific port, not already used by another service. It is good practice to limit access to this port to authorized IP addresses only in your firewall settings.

    [Network]
      ConsoleUser = arandomgeneratedstring
      ConsolePass = anotherrandomgeneratedstring
      ConsolePort = 8009
      ; choose a port not already used by another service

    Command-line client

    Download the executable from this repository, make sure opensim-rest-cli is executable and move it to /usr/local/bin/.

    chmod +x /path/to/opensim-rest-cli
    sudo mv /path/to/opensim-rest-cli /usr/local/bin/opensim-rest-cli

    You can run commands like

    opensim-rest-cli /path/to/Robust.ini show info
    opensim-rest-cli /path/to/Robust.ini show regions

    If you save the credentials in ~/.opensim-rest-cli.ini, you can skip the Robust.ini argument.

    opensim-rest-cli show info
    opensim-rest-cli show regions

    PHP class

    Download class-rest.php file in your project or install with composer. Do not keep opensim-rest-cli or opensim-rest-cli.php inside a public website.

    composer require --dev https://github.com/magicoli/opensim-rest-php
    cp magicoli/opensim-rest-php/class-rest.php lib/

    In your project PHP:

    
    require(dirname(__FILE__) . '/lib/class-rest.php');

    $session = opensim_rest_session( array( ‘uri’ => "yourgrid.org:8009", ‘ConsoleUser’ => ‘yourConsoleUsername’, ‘ConsolePass’ => ‘yourConolePassword’, ) );

    if ( is_opensim_rest_error($session) ) { error_log( "OpenSim_Rest error: " . $session->getMessage() ); } else { $responseLines = $session->sendCommand($command); }

    Return value: an array containing the line(s) of response or a PHP Error

  • OpenSimulator Helpers

    Helpers required to enable common functionalties like search, currency, events in OpenSimulator grids.

    They were initially based on a collection of different projects (see Credits below), but were entirely rewritten to use an unified code and set of parameters, as well as for integration in larger projects like w4os OpenSim WordPress Interface.

    Formerly known as Flexible Helper Scripts.

  • (DEPRECATED) w4os plugin translations

    w4os (Web interface For OpenSulator) translations are managed on https://poeditor.com/join/project/PySFgkkGP6

  • OpenSimulator Helpers

    Helpers required to enable common functionalties like search, currency, events in OpenSimulator grids.

    They were initially based on a collection of different projects (see Credits below), but were entirely rewritten to use an unified code and set of parameters, as well as for integration in larger projects like w4os OpenSim WordPress Interface.

    Formerly known as Flexible Helper Scripts.