DEV Community

Cover image for Bitbucket Pipelines & The SoapClient
Jae James
Jae James

Posted on

Bitbucket Pipelines & The SoapClient

Hello, World!

This is my first post on the Dev community and it's just a quick little trick that I feel may help others!

I'm a big lover of BitBucket pipelines and for a lot of Laravel Projects I can just use the generic PHP docker image however, this doesn't include the one thing I needed for one project which is the SoapClient. The reason I need the SoapClient in Pipelines is because PHPUnit runs tests against a WSDL API to ensure that we don't get garbage back and that the API and parser client is working correctly.

The Snippet

- apt-get update -y && apt-get install -y libxml2-dev && apt-get clean -y && docker-php-ext-install soap  

All you need to do is add the above snippet into your bitbucket-pipelines.yml file under script:! It really is that simple! Your PHP docker image will then have access to the PHP SoapClient.

Top comments (0)