Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Christian Scheb:
PHPStorm Inspections for your Continuous Integration Process
Feb 27, 2019 @ 21:24:33

In a new post to his site Christian Scheb has written up a guide to help you set up inspections in PHPStorm to help make your continuous integration process simpler.

Did you know that PHPStorm (or any other Jetbrains IDE) can run inspections from command line and generate XML files for the results? This is a great “hidden” feature of those IDEs and machine-readable output means it can be somehow integrated with a continuous integration (CI) process. So let’s do this!

He walks you through the full process to get the integration set up to easily report the results of various code inspections:

  • Setting Up PHPStorm on a Server
  • Plugin installation (such as the PHP annotations checker)
  • Running the inspections (including configuration)
  • Publishing the result

All commands and configuration examples are included.

tagged: phpstorm continuousintegration inspection tutorial setup configure

Link: https://www.christianscheb.de/archives/808

Lukas Smith's Blog:
Travis, CI for OSS
Nov 14, 2011 @ 15:50:55

In a new post to his blog Lukas Smith looks at a recently introduced service, Travis CI that helps make continuous integration simple (and without having to set up the software yourself). He talks about his experiences in getting his trial project up and working with their system.

Continuous integration is one of these topics that had a slow start, but in recent years has really taken off. The slow start is likely to be attributed to the fact that it was perceived as hard to setup and maintain. But solutions around Jenkins and Sismo are making it easier and easier. But thanks to the new Travis CI service, its now essentially so easy that there is no excuse not to use CI for PHP projects, at least if you are hosting your OSS code on github.com. What makes this service so crazy cool is that you can run your tests against multiple PHP versions, multiples databases (heck even RabbitMQ) and against multiple versions of various libraries.

Thanks to the "first class" PHP support they offer, setting up a PHP project is as simple as creating a ".travis.yml" file in your github-based project (including PHP versions to test against, dependency management and "before script" tasks to execute). If you're looking for a CI platform without a lot of the hassle involved in the usual setup, you'd do well to check out Travis CI.

You can also see another example of a project setup in this post from Travis Swicegood.

tagged: travis ci continuousintegration build test hosted travisci

Link:

Volker Dusch's Blog:
Dealing with segfaults while PHPUnit code coverage generation for CI
Apr 14, 2011 @ 16:55:13

Volker Dusch has a new post to his blog looking at handling segfaults during code coverage generation that might come up during your continuous integration process (with PHPUnit flavor unit tests).

About half the "Build failed" mails I’ve gotten from Jenkins in the last two weeks where not due to me breaking the tests but just PHPUnit segfaulting. "Wait! I know PHPUnit can’t segfault!", only PHP itself can. And it does, quite often. For some reason that probably has to do with using PHP 5.2.OLD it doesn’t survive generate the clover.xml file or the HTML report about 20% of the times it’s being run.

He finds a solution to keep this from happening - not correcting the segfault as much as running the testing again to get it to pass. He wraps the call to PHPUnit inside of a simple shell script that tries to execute the PHPUnit testing suite as long as a segfault isn't thrown. If something was seriously broken, this could cause all sorts of problems, but in theory it's a simple hack that gets the job done.

tagged: jenkins phpunit build continuousintegration codecoverage segfault

Link:

Mayflower Blog:
Cinder now available at Mayflower Open Source Labs
Dec 24, 2010 @ 15:50:05

On the Mayflower blog today there's a new post about an extension that's been released for Eclipse environments that lets you work with the error output from your continuous integration server right in the IDE.

Cinder is a plug-in for your eclipse-based IDE (eclipse, Zend Studio, etc.) to display results of your Continuous Integration environment right inside your IDE. [...] You open the XML file containing the errors and warnings of your build (for us that's typically the PHP_CodeBrowser XML generated by a Hudson build) and get an overview of reports. Now you can sort them, categorize them and work on them in any order. Cinder can grab these files periodically if you make them available via http or on a filesystem.

They've included two screenshots with the list of errors and the panel showing the specific problem directly in the code.

tagged: cinder eclipse plugin opensource continuousintegration error

Link:


Trending Topics: