Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@nesk/rialto

nesk8.8kMIT1.4.0

Manage Node resources from PHP

php, node, wrapper, communication, bridge, socket

readme

Rialto

PHP Version Composer Version Node Version NPM Version Build Status

A package to manage Node resources from PHP. It can be used to create bridges to interact with Node libraries in PHP, like PuPHPeteer.

It works by creating a Node process and communicates with it through sockets.

Requirements and installation

Rialto requires PHP >= 7.1 and Node >= 8.

Install it in your project:

composer require nesk/rialto
npm install @nesk/rialto

Usage

See our tutorial to create your first bridge with Rialto.

An API documentation is also available.

License

The MIT License (MIT). Please see License File for more information.

changelog

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

Unreleased

In progress…

1.4.0 - 2020-04-12

Added

  • Support symfony/process v5

1.3.0 - 2019-03-14

Added

  • Support string casting for resources

1.2.1 - 2018-08-28

Fixed

  • Heavy socket payloads are no longer unreadable in slow environments
  • Fix an issue where the console object can't be set in some environments

1.2.0 - 2018-08-20

Added

  • Add a log_node_console option to log the output of console methods (console.log, console.debug, console.table, etc…) to the PHP logger

Changed

  • Drastically improve the log contents

Fixed

  • Fix a bug where some standard streams logs were missing
  • Fix double declarations of some JS classes due to a require with two different paths
  • Fix a bug where sending null values was crashing the Node process

1.1.0 - 2018-07-20

Added

  • Support passing Node resources in JS functions
  • Add chaining methods to the JsFunction class
  • Add an async() method to the JsFunction class to allow developers to write await instructions in their JS code
  • The idle_timeout and read_timeout options can be disabled by setting them to null

Deprecated

  • Deprecate the JsFunction::create method in favor of the new chaining methods

1.0.2 - 2018-06-18

Fixed

  • Fix an issue where the socket port couldn't be retrieved

1.0.1 - 2018-06-12

Fixed

  • Fix false values being parsed as null by the unserializer
  • Fix Travis tests

1.0.0 - 2018-06-05

Changed

  • Change PHP's vendor name from extractr-io to nesk
  • Change NPM's scope name from @extractr-io to @nesk

0.1.2 - 2018-04-09

Added

  • Support PHPUnit v7
  • Add Travis integration

Changed

  • Improve the conditions to throw ReadSocketTimeoutException

Fixed

  • Support heavy socket payloads containing non-ASCII characters

0.1.1 - 2018-01-29

Fixed

  • Fix an issue on an internal type check

0.1.0 - 2018-01-29

First release