Download the PHP package php-opcua/laravel-opcua without Composer

On this page you can find all versions of the php package php-opcua/laravel-opcua. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-opcua

OPC UA Laravel Client

Tests Coverage Latest Version PHP Version Stars Laravel Version

Linux macOS Windows


Laravel integration for OPC UA built on opcua-client and opcua-session-manager. Connect your Laravel app to PLCs, SCADA systems, sensors, and IoT devices with a familiar developer experience: a Facade, .env-based configuration, named connections (like config/database.php), and an Artisan command for the optional session manager daemon.

What you get:

Note: This package wraps the full opcua-client API with Laravel conventions. For the underlying protocol details, types, and advanced features, see the client documentation.

### Tested against the OPC UA reference implementation The underlying [opcua-client](https://github.com/php-opcua/opcua-client) is integration-tested against **[UA-.NETStandard](https://github.com/OPCFoundation/UA-.NETStandard)** — the **reference implementation** maintained by the OPC Foundation, the organization that defines the OPC UA specification. This Laravel package is additionally integration-tested via [uanetstandard-test-suite](https://github.com/php-opcua/uanetstandard-test-suite) in both direct and managed (daemon) modes, ensuring full compatibility across all connection strategies. Like [opcua-client](https://github.com/php-opcua/opcua-client) and [opcua-session-manager](https://github.com/php-opcua/opcua-session-manager), unit tests run cross-OS — **Linux, macOS, and Windows** across PHP 8.2–8.5 × Laravel 11/12/13 — on every push. Integration tests stay on Linux (Docker-hosted OPC UA servers).
### Runs on Linux, macOS, and Windows The session manager IPC auto-selects the right transport per platform — zero app-side changes. | Platform | Default transport | Endpoint URI | |---|---|---| | Linux / macOS | Unix-domain socket | `unix://` | | Windows | TCP loopback | `tcp://127.0.0.1:9990` | `config/opcua.php → session_manager.socket_path` defaults to the platform-appropriate URI. Override by setting `OPCUA_SOCKET_PATH` in `.env` to either a `unix://`, a `tcp://127.0.0.1:` (loopback-only — non-loopback hosts are refused on both client and daemon sides), or a scheme-less path (= `unix://`, backwards-compatible with pre-v4.2.0 configs).

Quick Start

That's it. Facade, .env, connect, read. Everything else is optional.

See It in Action

Browse the address space

Read multiple values with fluent builder

Write to a PLC

Call a method on the server

Subscribe to data changes

Auto-publish — no manual publish loop

With auto_publish enabled, the daemon handles subscriptions automatically. Just register Laravel event listeners:

React to events

47 PSR-14 events are dispatched automatically — connections, reads, writes, alarms, subscriptions, cache, retries. Just register listeners:

See Events documentation for the full reference of all 47 events.

Switch connections

Test without a real server

Features

Feature What it does
Facade Opcua::read(), Opcua::browse(), etc. with full PHPDoc for IDE autocompletion
Named Connections Define multiple servers in config/opcua.php, switch with Opcua::connection('plc-2')
Ad-hoc Connections Opcua::connectTo('opc.tcp://...') for endpoints not in config
Session Manager Artisan command php artisan opcua:session for daemon-based session persistence
Transparent Fallback Daemon available? ManagedClient. Not available? Direct Client. Zero code changes
String NodeIds 'i=2259', 'ns=2;s=MyNode' everywhere a NodeId is accepted
Fluent Builder API readMulti(), writeMulti(), createMonitoredItems(), translateBrowsePaths() chain
PSR-3 Logging Laravel's log channel injected automatically via config
PSR-14 Events 47 dispatched events covering every OPC UA operation for observability and extensibility
PSR-16 Caching Laravel's cache store injected automatically. Per-call useCache on browse ops
Write Auto-Detection write('ns=2;i=1001', 42) — omit the type and the client detects it automatically
Read Metadata Cache Cached node metadata avoids redundant reads; refresh on demand with read($nodeId, refresh: true)
Trust Store FileTrustStore with configurable TrustPolicy, auto-accept modes, and certificate management
Type Discovery discoverDataTypes() auto-detects custom server structures
Auto-Publish Daemon auto-publishes for sessions with subscriptions, dispatches PSR-14 events to Laravel listeners
Auto-Connect Per-connection auto_connect with declarative subscriptions config — daemon sets up monitoring on startup
Subscription Management createMonitoredItems(), modifyMonitoredItems(), setTriggering(), transferSubscriptions()
MockClient Test without a server — register handlers, assert calls
Timeout & Retry Per-connection timeout, auto_retry via config or fluent API
Auto-Batching readMulti/writeMulti transparently split when exceeding server limits
Recursive Browse browseAll(), browseRecursive() with depth control and cycle detection
Path Resolution resolveNodeId('/Objects/Server/ServerStatus')
Security 10 policies (RSA + ECC), 3 auth modes, auto-generated certs, certificate trust management

ECC disclaimer: ECC security policies (ECC_nistP256, ECC_nistP384, ECC_brainpoolP256r1, ECC_brainpoolP384r1) are fully implemented and tested against the OPC Foundation's UA-.NETStandard reference stack. However, no commercial OPC UA vendor supports ECC endpoints yet. When using ECC, client certificates are auto-generated if client_certificate/client_key are omitted, and username/password authentication uses the EccEncryptedSecret protocol automatically. | History Read | Raw, processed, and at-time historical queries | | Typed Returns | All service responses return public readonly DTOs |

Documentation

Full documentation is available in docs/. Highlights:

Section Covers
Getting started — Upgrading Concepts, install, first connection
Configuration — Publishing & overriding .env, config file, named connections
Using the client — Using builders Facade, DI, lifecycle
Operations — History Read/write, browse, subscribe, history
Session manager — Monitoring Persistent sessions via daemon
Events — Queued listeners PSR-14 + Laravel listeners
Observability — Telescope & Pulse Logs, cache, dev tools
Security — Trust store Security policies, certs, trust
Testing — Integration tests Unit + integration tests
Integrations — Filament Laravel ecosystem
Reference — Exceptions Public API
Recipes — Production deployment Task-oriented walkthroughs

Testing

146+ unit tests with 99%+ code coverage. Integration tests run against uanetstandard-test-suite — a Docker-based OPC UA environment built on the OPC Foundation's UA-.NETStandard reference implementation — in both direct and managed (daemon) modes.

Ecosystem

Package Description
opcua-client Pure PHP OPC UA client
opcua-cli CLI tool — browse, read, write, watch, discover endpoints, manage certificates, generate code from NodeSet2.xml
opcua-session-manager Daemon-based session persistence across PHP requests. Keeps OPC UA connections alive between short-lived PHP processes via a ReactPHP daemon and Unix sockets. Separate package by design — see ROADMAP.md for rationale.
opcua-client-nodeset Pre-generated PHP types from 51 OPC Foundation companion specifications (DI, Robotics, Machinery, MachineTool, ISA-95, CNC, MTConnect, and more). 807 PHP files — NodeId constants, enums, typed DTOs, codecs, registrars with automatic dependency resolution. Just composer require and loadGeneratedTypes().
laravel-opcua Laravel integration — service provider, facade, config (this package)
uanetstandard-test-suite Docker-based OPC UA test servers (UA-.NETStandard) for integration testing

Community

Have questions, ideas, or want to share what you've built? Join the GitHub Discussions.

Connected a PLC, SCADA system, or OPC UA server? We're building a community-driven list of tested hardware and software. Share your experience in Tested Hardware & Software — even a one-liner like "Siemens S7-1500, works fine" helps other users know what to expect.

Contributing

Contributions welcome — see CONTRIBUTING.md.

AI-Ready

This package ships with machine-readable documentation designed for AI coding assistants (Claude, Cursor, Copilot, ChatGPT, and others). Feed these files to your AI so it knows how to use the library correctly:

File Purpose
llms.txt Compact project summary — architecture, Facade, configuration, session manager. Optimized for LLM context windows with minimal token usage.
llms-full.txt Comprehensive technical reference — every config key, method, DTO, event, trust store, managed client. For deep dives and complex questions.
llms-skills.md Task-oriented recipes — step-by-step instructions for common tasks (install, read, write, browse, named connections, session manager, security, testing, events). Written so an AI can generate correct, production-ready code from a user's intent.

How to use: copy the files you need into your project's AI configuration directory. The files are located in vendor/php-opcua/laravel-opcua/ after composer install.

Versioning

This package follows the same version numbering as php-opcua/opcua-client. Each release of laravel-opcua is aligned with the corresponding release of the client library to ensure full compatibility.

Changelog

See CHANGELOG.md.

License

MIT


All versions of laravel-opcua with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
php-opcua/opcua-client Version ^4.4.0
php-opcua/opcua-session-manager Version ^4.4.0
psr/event-dispatcher Version ^1.0
illuminate/support Version ^11.0|^12.0|^13.0
illuminate/console Version ^11.0|^12.0|^13.0
illuminate/contracts Version ^11.0|^12.0|^13.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package php-opcua/laravel-opcua contains the following files

Loading the files please wait ...