Continuous Testing of PHP Compiled to .NET Core on Linux Virtual Hosting

We are back to working on Peachpie compiler and achieved a major milestone this week: continuous testing of our build using Travis CI.

Continuous Testing with Travis CI

Testing the latest build of a project using one of the available CI platforms has become standard practice for any serious project. However, in the case of Peachpie compiler, this was not as simple. Not only do we have to test that the latest build passed the compilation process correctly, but we essentially have to compare two platforms at once. We needed to configure Travis CI in such a way that it also tests whether the PHP input performs the same thing as the resulting .NET output.

Nevertheless, this is now achieved and we have finally implemented continuous testing of Peachpie compiler:Commit passed on Travis CI

That little green check mark can be considered a proof of concept, showing that Peachpie works as intended. If there had previously been any doubts, the fact that a commit passed the test means that the PHP input performs the same action as the resulting .NET code. Furthermore, each pull request by a contributor has to pass through the test, which means that the master build will always be stable.


First and foremost, the implementation of continuous testing means that no merged pull request will cause Peachpie to fail. This will not only make it easier for developers to contribute to the project, but it will also make it easier for us to maintain it.

Peachpie tests on Travis CI

This announcement may be more groundbreaking than it seems at first. The fact that we are using Travis CI already shows that the compiled PHP runs on Linux, hosted for free. In addition, it shows that .NET works side by side with PHP on Linux, which had not been possible for the case of .NET until quite recently.

Another implication is that you can now test a hybrid application in PHP and .NET. This means that any company can securely migrate to .NET with Peachpie without changing their hardware and system. We have received many requests from companies looking to migrate their PHP app to .NET, and the Travis CI testing will enable them to do this safely.

Finally, our configuration of Travis CI is a great demonstration of how to use Peachpie on Linux. The script includes all the necessary instructions needed to run Travis.

Future work

We are not quite done with regards to testing Peachpie compiler. We would also like to implement automated benchmarks, checking every commit and ensuring that the compiler’s performance hasn’t decreased with the latest changes.

In addition, we are continuously migrating the tests that were already implemented Phalanger – there are literally thousands of them. Furthermore, we will also publish a blog on the technical background of our Travis CI implementation.

Posted on November 1, 2016, in category Announcement, Information, News, tags: , , , , , , , , ,