Download the PHP package meabed/php-parallel-soap without Composer

On this page you can find all versions of the php package meabed/php-parallel-soap. 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 php-parallel-soap

Parallel, Multi-Curl PHP SoapClient

CI Status Latest Version PHP Version Total Downloads Software License

A drop-in replacement for PHP's native SoapClient that can fire many SOAP requests in parallel using curl's multi handle, while keeping the familiar synchronous SoapClient API when you need it.

Working with SOAP is often painful:

ParallelSoapClient lets you send requests concurrently and gives you hooks for a PSR-3 logger, response parsing, custom SOAPAction headers, XML formatting and arbitrary curl options (such as TLS session sharing and connection reuse).

Features

Requirements

The library is tested in CI against PHP 8.1, 8.2, 8.3, 8.4 and 8.5 (including a TLS suite).

Upgrading from 3.x? 4.0 moves the client out of the now-reserved Soap\ namespace into Meabed\ParallelSoap\. Change use Soap\ParallelSoapClient; to use Meabed\ParallelSoap\ParallelSoapClient; — the API is otherwise unchanged. 3.x also fatal-errors on PHP 8.4/8.5, so upgrading is required there. See UPGRADING.md and the CHANGELOG.

Installation

Usage

Synchronous (single) call

Behaves exactly like the native SoapClient, but the transport is curl:

Parallel (multi) call

Queue any number of calls, then execute them all at once with run():

Handling errors in parallel mode

In parallel mode exceptions are not thrown; instead each result is either the parsed response or a SoapFault object, so you inspect the result type:

Calling a method that does not exist in the WSDL short-circuits before any HTTP request and returns a string prefixed with ParallelSoapClient::ERROR_STR (*ERROR*).

Running a subset of queued requests

Configuration

All hooks are passed through the constructor $options array (and are removed before being handed to the native SoapClient):

Option Type Purpose
logger Psr\Log\LoggerInterface PSR-3 logger; defaults to NullLogger.
resFn callable($method, $res) Transform/unwrap each parsed response.
soapActionFn callable($action, $headers) Build the outgoing SOAPAction header(s).
formatXmlFn callable($xml) Format the request XML before it is logged.
debugFn callable($res, $id) Receive each response/exception for debugging or metadata capture.

Plus the runtime setters:

See the example/ directory for complete, runnable scripts.

How it works

__doRequest() is overridden to build a curl handle per call instead of sending the request immediately. In parallel mode the handles are accumulated and executed together through curl_multi_*; the raw responses are then fed back through the native SOAP parser so you get ordinary PHP objects (or SoapFaults) out the other end. A shared curl handle per endpoint enables TLS session, DNS and cookie reuse across the batch.

For a deeper walkthrough — the request lifecycle, the local SOAP server used by the tests, and diagrams — see docs/development.md.

Testing

The test suite has two layers:

You can also run the local SOAP server on its own with composer dev-server and call it directly — see docs/development.md for a worked example.

Contributing

Contributions are welcome — please review the guidelines:

Changelog

See CHANGELOG.md for a list of notable changes.

Acknowledgements

Thanks to everyone who has reported issues and contributed fixes, including @c266 for independently diagnosing the PHP 8.5 __doRequest() signature break (#180, #179).

License

Released under the MIT license.


All versions of php-parallel-soap with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
ext-soap Version *
ext-curl Version *
ext-libxml Version *
psr/log Version ~1.1 || ~2.0 || ~3.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 meabed/php-parallel-soap contains the following files

Loading the files please wait ...