News Feed
Jobs Feed
Sections




News Archive
feed this:

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

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


Lukas Smith's Blog:
Travis, CI for OSS
November 14, 2011 @ 09: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.

0 comments voice your opinion now!
travis ci continuousintegration build test hosted travisci



Community Events











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


framework unittest package hack install introduction facebook component hhvm code language opinion symfony2 security overview podcast threedevsandamaybe release application composer

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