PHPackages                             freshcells/soap-client-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. freshcells/soap-client-bundle

ActiveLibrary[API Development](/categories/api)

freshcells/soap-client-bundle
=============================

SoapClientBundle for symfony

4.0.0(2mo ago)35151.0k↓17.7%10MITPHPPHP &gt;=8.5CI passing

Since Jan 23Pushed 2mo ago3 watchersCompare

[ Source](https://github.com/freshcells/soap-client-bundle)[ Packagist](https://packagist.org/packages/freshcells/soap-client-bundle)[ Docs](https://github.com/freshcells/soap-client-bundle)[ RSS](/packages/freshcells-soap-client-bundle/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (30)Versions (28)Used By (0)

Freshcells SoapClientBundle
===========================

[](#freshcells-soapclientbundle)

[![Latest Version on Packagist](https://camo.githubusercontent.com/8b1eff53a06b46af8a0c9050ebcec23b958e4cc15c9f6745b637c8655531bef5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f667265736863656c6c732f736f61702d636c69656e742d62756e646c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/freshcells/soap-client-bundle)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![soap-client-bundle](https://github.com/freshcells/soap-client-bundle/actions/workflows/test.yml/badge.svg)](https://github.com/freshcells/soap-client-bundle/actions/workflows/test.yml)[![Coverage Status](https://camo.githubusercontent.com/8a3e3e345db3e9aa6cc7eeb91e96f3611d37de8213b201389d3a8273e6ce1ad0/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f667265736863656c6c732f736f61702d636c69656e742d62756e646c652e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/freshcells/soap-client-bundle/code-structure)[![Quality Score](https://camo.githubusercontent.com/d9d4ea53c43c862a0ddbbb695a3237c77a9c190cd16d9c8668fa30fcb20a4dd0/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f667265736863656c6c732f736f61702d636c69656e742d62756e646c652e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/freshcells/soap-client-bundle)[![Total Downloads](https://camo.githubusercontent.com/8b635f41a3bc098e7652ce2a9a3c9e944034e356dc0697cf3357d499f9616d3d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f667265736863656c6c732f736f61702d636c69656e742d62756e646c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/freshcells/soap-client-bundle)

Symfony integration for an advanced SoapClient.

[![Profiler](/freshcells_soap_client_bundle_profiler.png?raw=true "Profiler Soap Client Bundle")](/freshcells_soap_client_bundle_profiler.png?raw=true)

Features
--------

[](#features)

- Logging of requests, responses and faults
- XML can be anonymized before logging
- DataCollector and symfony profiler integration
- Events are dispatched before, after requests and in case of SoapFault
- Provide mock requests and responses while testing and developing

Install
-------

[](#install)

Via Composer

```
$ composer require freshcells/soap-client-bundle
```

Usage
-----

[](#usage)

Initalize the bundle:

```
freshcells_soap_client:
  logger: monolog.logger.soap
  anonymize_logs: # in case you need to anonymize certain elements in the xml logs
    elements:
      - 'GivenName'
      - 'ns1:GivenName'
    attributes: [ 'PhoneNumber' ]
    namespaces:
      dummy: 'http://gcomputer.net/webservices/'
  truncate_element_logs: # in case you need to truncate some elements because values are too long for logging
    elements:
      - 'DailyDilbertResult'
    namespaces:
      dummy: 'http://gcomputer.net/webservices/'
    max_length: 2
  truncate_logs: # in case you need to truncate request/response logs
    max_length: 350

```

Create a Soap Client service and tag it with `freshcells_soap_client.client`

```
parameters:
    mock_requests:
        'http://gcomputer.net/webservices/DailyDilbert': './tests/Fixtures/MockRequest.xml'
    mock_responses:
        'http://gcomputer.net/webservices/DailyDilbert': './tests/Fixtures/MockResponse.xml'
    soap_options:
        mock_requests: '%mock_requests%'
        mock_responses: '%mock_responses%'
services:
    _instanceof:
        Freshcells\SoapClientBundle\SoapClient\SoapClient:
            tags: [ 'freshcells_soap_client.client' ]

    Freshcells\SoapClientBundle\SoapClient\SoapClient:
        arguments: ['%soap_wsdl%', '%soap_options%']
        public: true

```

SoapClients are created outside of the bundle to give more flexibility, f.e when using generators like .
The bundle provides an advanced SoapClient that takes care of dispatching events, mocking and error handling.
Make sure that you use this client or extend from it.

```
$response = $this->container->get('Freshcells\SoapClientBundle\SoapClient\SoapClient')->DailyDilbert();
```

**Note:**
Mock requests can also be detected by a callable in case if Action and Location are not different by request, which is the case with some Soap servers. See tests for implementation.

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

Todo
----

[](#todo)

- add to timeline in profiler
- mock indicator
- make middlewares
- error / soap fault indicator in accordion header
- use options-resolver

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Freshcells engineering](https://github.com/freshcells)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

65

—

FairBetter than 99% of packages

Maintenance84

Actively maintained with recent releases

Popularity44

Moderate usage in the ecosystem

Community20

Small or concentrated contributor base

Maturity91

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 71.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~113 days

Recently: every ~157 days

Total

27

Last Release

81d ago

Major Versions

1.8.0 → 2.0.02021-04-07

2.3.2 → 3.0.02024-06-05

3.2.0 → 4.0.02026-02-26

PHP version history (7 changes)1.0.0PHP ^7.1

1.5.0PHP ^7.2

2.0.0PHP ^7.4

2.1.0PHP ^7.4 || ^8.0

3.0.0PHP ^8.1

3.1.0PHP ^8.2

4.0.0PHP &gt;=8.5

### Community

Maintainers

![](https://www.gravatar.com/avatar/a281e7f725fbe1ea8de5835c34e19c649afe33c2a1fbf48188ccff1274165fb1?d=identicon)[ivoba](/maintainers/ivoba)

---

Top Contributors

[![ivoba](https://avatars.githubusercontent.com/u/471254?v=4)](https://github.com/ivoba "ivoba (100 commits)")[![gimler](https://avatars.githubusercontent.com/u/200904?v=4)](https://github.com/gimler "gimler (17 commits)")[![gisostallenberg](https://avatars.githubusercontent.com/u/11526270?v=4)](https://github.com/gisostallenberg "gisostallenberg (10 commits)")[![llaville](https://avatars.githubusercontent.com/u/364342?v=4)](https://github.com/llaville "llaville (3 commits)")[![stuartwilsondev](https://avatars.githubusercontent.com/u/4374988?v=4)](https://github.com/stuartwilsondev "stuartwilsondev (3 commits)")[![ajdinmore](https://avatars.githubusercontent.com/u/5090062?v=4)](https://github.com/ajdinmore "ajdinmore (2 commits)")[![Lappihuan](https://avatars.githubusercontent.com/u/7474162?v=4)](https://github.com/Lappihuan "Lappihuan (2 commits)")[![TNAJanssen](https://avatars.githubusercontent.com/u/2812277?v=4)](https://github.com/TNAJanssen "TNAJanssen (1 commits)")[![xeno-suter](https://avatars.githubusercontent.com/u/64072009?v=4)](https://github.com/xeno-suter "xeno-suter (1 commits)")

---

Tags

soapsymfonysoapSymfony Bundlesoap-clientfreshcells

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/freshcells-soap-client-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/freshcells-soap-client-bundle/health.svg)](https://phpackages.com/packages/freshcells-soap-client-bundle)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M386](/packages/shopware-core)[contao/core-bundle

Contao Open Source CMS

1231.6M2.4k](/packages/contao-core-bundle)[numero2/contao-storelocator

Contao Plugin for managing stores (or in common address data) and providing a frontend-search based on geo data

121.5k](/packages/numero2-contao-storelocator)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
