News Feed
Sections




News Archive
feed this:

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

Lorna Mitchell:
Using Phing with Travis CI
July 18, 2014 @ 11:23:45

Lorna Mitchell has a quick post to her site today showing you how to link up Travis-CI and phing to execute the phing build on the Travis-CI service.

We've started using Travis CI on one of my projects to run some build processes to check that everything looks good before we merge/deploy code. One thing I ran into quite quickly was that I wanted to install phing in order to use the build scripts we already have and use elsewhere, but that it isn't provided by default by Travis CI.

To get it all cooperating, she uses the "before_install" settings/functionality Travis provides to use PEAR to discover and install phing. Then in the "script" section, the build can call the phing executable without problems. She does point out one "magic" kind of thing that rehashes the Travis environment and lets to know phing exists: the...well..."rehash" configuration setting.

0 comments voice your opinion now!
phing travisci beforeinstall tutorial build process

Link: http://www.lornajane.net/posts/2014/using-phing-with-travis-ci

Adam Culp:
Fun with Travis CI and PHP projects
July 14, 2014 @ 10:43:53

Adam Culp has a new post to his site sharing some of his fun with Travis CI and his PHP-based applications. He recently started using it and provides a step-by-step guide of how he got started with some handy tips along the way. Travis CI is a continuous integration platform providing processes that run automated testing or other build processes when new commits are made to a repository.

I know I should have done this a long time ago, but I finally got my hands dirty with Travis CI. I wanted to set up a php project on github to use Travis CI to monitor the status, in case I forgot to run the tests prior to pushing. Unfortunately it was not as easy as it's made out to be. But now that I've done it once, it'll be easier next time. So, here is how I tackled it.

He walks you through five (or really six) different steps to getting a build process set up for your repository (complete with screenshots):

  • Create a Travis CI account and link it to your GitHub account
  • Add the repository to connect the build to
  • Make a ".travis.yml" file to configure the build (his runs PHPUnit tests)
  • Validate that PHPUnit runs locally
  • Verify the webhook for Travis CI has been set up correctly

Finally, he includes a bit of description about a successful build and how to add the "badge" showing the current build status to the README of your repository (using Markdown syntax).

0 comments voice your opinion now!
travisci introduction project adamculp guide

Link: http://www.geekyboy.com/archives/908

SitePoint PHP Blog:
PHP and Continuous Integration with Travis CI
May 13, 2014 @ 11:18:55

If you've ever wanted to get into continuous testing and validation of your code but didn't want the hassle of having to set up a new instance/server just to do it, you're in luck. Travis-CI does exactly that and is a hosted platform anyone can use. Today on the SitePoint blog Michael Calkins wants to help you get started using Travis-CI for your PHP-based applications.

Continuous integration (CI) allows a team to commit their work quickly, which means there will be multiple commits to a repository daily. Every time there is a commit it is verified by an automated build (including test) to alert you of any build or test errors immediately. Once the process of integrating and verifying your work into the master becomes automatic you are able to develop cohesive software rapidly.

He starts by introducing Travis -CI and what it has to offer developers. He shows you how to get started, linking it with Github, and how to sync the repositories you want tested in the configuration. He talks about the ".travis.yml" configuration file, provides an example and how to start up a new build. There's also a mention of the build status images you can add to your repository to show the current build status. The rest of the article talks about other topics like pull request testing, a branch summary and how to view the build history.

0 comments voice your opinion now!
continuous integration travisci introduction github tutorial

Link: http://www.sitepoint.com/php-continuous-integration-travis-ci/

Matthew Turland:
Travis and Composer and virtPHP, oh my!
March 27, 2014 @ 10:28:55

Matthew Turland has a new post today to his site looking at the combination of three different technologies - TravisCI, Composer and VirtPHP - and an odd error he was getting from his build about a missing requirement "php".

In the first build, everything worked fine under 5.4 and 5.5, but upon getting to the composer install instruction to install project dependencies and PHPUnit, the job for 5.3 failed with some rather unintuitive output from Composer that implied it didn't recognize the platform package requirement that I'd provided for the minimum PHP version. [...] Since the cause of my issue wasn't immediately obvious from Composer's output, my first thought was that I needed to begin my attempt at troubleshooting the issue by replicating it on my local machine.

This is where VirtPHP came in. This tool provides an environment where you can install and configure multiple PHP configurations and switch between them easily. It provides a "glue" between the phpenv and php-build projects to make management of the results simpler. He talks about how he configured and set up his environments...and figured out his Composer problem.

0 comments voice your opinion now!
travisci composer error virtphp environment

Link: http://matthewturland.com/2014/03/26/travis-and-composer-and-virtphp-oh-my

NetTuts.com:
Travis-CI What, Why, How
September 19, 2013 @ 11:10:31

If you've ever wanted to put together automated builds for your project but didn't want to have to worry about all the setup and systems involved, Travis-CI might fit your needs. To help get you started NetTuts.com has posted this introduction to the (free) service and its features.

Travis CI makes working in a team for a software project easier with automated builds. These builds are triggered automatically when each developer checks in their code to the repository. In this article, we will go through how we can integrate Travis CI easily with our project, which is hosted on Github. With automation, notification and testing in place, we can focus on our coding and creating, while Travis CI does the hard work of continuous integration!

They focus on its use in a Node-based project, but Travis-CI is language agnostic, so the ideas still apply to PHP-based apps too. They introduce you to the Travis interface and show you how to hook it into your Github account. They also point out another handy feature of Travis - executing on pull requests to see if the results would break anything if merged. Plenty of screenshots are included in the post showing you different states of passing and failing builds. They also include a bit about showing the build status image in your project's README Markdown file.

0 comments voice your opinion now!
travisci continuous integration introduction nodejs

Link: http://net.tutsplus.com/tutorials/tools-and-tips/travis-ci-what-why-how/

DPCRadio:
Episode #2012-16 - Travis CI - Distributed CI for the Masses
November 21, 2012 @ 09:36:12

DPCRadio (recordings of the sessions at this year's Dutch PHP Conference) has posted its latest episode - a recording of Josh Kalderimis' talk Travis CI - Distributed CI for the Masses!.

Continuous Integration has typically been a practice only performed by companies who want that piece of mind for their client software, but does it need to be like this? Travis CI is a continuous integration service for the open source community. We make testing OS projects dead simple and fun. But most importantly, we help improve code quality for large projects like Doctrine2 and symfony, to smaller libraries like FOSRest. The vision behind Travis CI is to become for builds what PEAR is for distributing libraries. In this talk Josh, one of the core members of the Travis CI team, will introduce you to the vision behind Travis, the how it is implemented, and why it matters to everyone in the OS community.

You can listen to this latest episode either by using the in-page player or by downloading the mp3. You can also subscribe to this podcast.

0 comments voice your opinion now!
dpcradio podcast dpc12 travisci continuous integration distributed


Matthias Noback:
Experiences with PHP Open Source Software in a Symfony-Friendly Environment
November 14, 2012 @ 11:24:19

Matthias Noback has a new post today sharing some of his experiences working with Open Source software, specifically as it relates to this dealings with a "Symfony-friendly environment".

These days, good PHP object-oriented libraries are all around and easily available. To me, it is actually thrilling to be part of this flourishing community, while working with Symfony2 and blogging about the Framework, the Components and their neighbors (like Silex). [...] Still, to me, contributing felt like too big a step to take right now. Until a few weeks ago, when I was looking for something I needed (a PHP client for the Microsoft Translator API) and could not find a decent solution. I decided to make it myself, and share it online.

He shares his "checklist" of steps he followed to get the library up and working (less about the library and more about the process):

  • Write the code
  • Initialize a Git repository
  • Add a composer.json file
  • Add unit tests
  • Make it open source and developer friendly
  • Push your code to GitHub
  • Register your project at packagist.org
  • Register the Packagist Service Hook
  • Versioning
  • Continuous integration using Travis CI

He also suggests that, at least at the outset, you skip some of your tests that might rely on external data sources/resources (so the build can start as green on Travis) then coming back and refactoring to mock things out correctly. It might look like an intimidating list for a beginner, but it's a great process to follow to have a robust, effective development/deployment process.

0 comments voice your opinion now!
opensource software process checklist github composer unittest travisci packagist


Till Klampaeckel:
Continuous Integration Automated database setup with Doctrine on Travis-CI
August 14, 2012 @ 10:55:57

Till Klampaeckel has a new post to his site showing how you can use the external continuous integration system Travis-CI to handle automated database testing for your PHP app using Doctrine.

Testing is important - most people understand that by now. A lot of people write tests for their open source code already, but in-house testing is still hard. [...] While I prefer to run my database tests against a SQLite in memory database, there are these edge cases, where I work with multiple database or I write a direct query (and by-pass the ORM-magic). In these cases I need to have that database server available in my test environment! The following blog posts explains how to solve these things with Travis-CI. I will walk you through the setup on Travis-CI's business service. But most of this applies to their open source offering as well.

He's broken it up into a few different steps - the setup and configuration of the ".travis.yml" file, adding in a "composer.json" file with the needed dependencies and the recommendation of a "phpunit.xml" in your project's root. He shows how to use Doctrine's "SchemaTool" utility to generate his schema off of the comments on his entities (instead of checking in SQL). This setup them gives him access to Doctrine's EntityManager object in his tests and he can go from there. If you're thinking about doing something similar, check Travis' list of supported databases before you do anything, just to be sure.

0 comments voice your opinion now!
database testing autmation travisci continuous integration tutorial doctrine


DZone.com:
TravisCI Intro and PHP Example
March 22, 2012 @ 12:20:26

In introduces you to using TravisCI to provide continuous integration services for your project (externally). Continuous integration is a way to provide "quality control" of your code, making it easier to run testing, check syntax and more, small pieces at a time.

Travis CI in fact works by tying itself to a particular project on Github, and by triggering a new build every time new commits are available on the chosen branch (master, usually). Your build shows up on the main page along with all the other projects in the newsfeed, so try to maintain it green. :) Travis CI adds this other aspect to Github's social coding.

He talks a bit about how it works - builds running on VMs, some with advanced tools like Selenium - and includes an example based off a simple travis.yml file defining a script to run pre-build. He also points out a special caveat about databases - they support things like MySQL, Sqlite, MongoDB and CouchDB, but you'll have to generate them from scratch every time, sample data and all.

0 comments voice your opinion now!
travisci example continuous integration external tutorial


Henrik Bjørnskov's Blog:
Travis & Composer sitting in a tree K-I-S-S-I-N-G
November 18, 2011 @ 11:03:01

Henrik Bjørnskov has a quick new post today showing how to combine two powerful technologies into a simple, configurable autoload system in a Symfony Travis-CI build with Composer.

To integrate your project with travis the only thing necesarry is to have a .travis.yml file and a working PHPUnit test setup like http://github.com/simplethings/SimpleThingsFormExtraBundle. Where the Tests/vendors.php script is executed before the tests are perfomed. But it would be way cooler to just have Composer handle the autoloading and dependencies.

A sample .travis.yml file is included in the post (also here) as well as instructions for grabbing dependencies and including the autoload process in your application's bootstrap.

0 comments voice your opinion now!
composer travisci build system yml configuration tutorial



Community Events





Don't see your event here?
Let us know!


symfony bugfix laravel install language opinion release interview framework introduction library podcast api series package community deployment tips voicesoftheelephpant list

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework