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

Mastering Zend Framework:
Building and Executing SQL Queries In Zend
April 08, 2014 @ 12:18:17

The Mastering Zend Framework site (from Matthew Setter) has a new post today showing you how to execute SQL queries directly in a Zend Framework v2 application.

Whilst there are many ways for building and executing SQL queries in Zend Framework 2, the two that I usually use, and which are also used in the ZF2 manual, are closures and the selectWith function. I previously wrote a three part series, showing how to get started using the ZendDbSql classes with Zend Framework 2, but I didn't cover how to actually run them. So in today's tutorial, let's do that.

He gives examples of these two methods starting with closures in a "tableGateway" select call. He shows how to add on parts of the query like "wheres" and an "order by" as well as some basic formatting. He then gets into the "selectWith" examples, showing the same criteria just added a different way. He also includes an example of the "tableGateway" objects used for the examples and how they're configured.

0 comments voice your opinion now!
sql query zendframework2 execute query build tablegateway

Link: http://www.masterzendframework.com/php/building-and-executing-sql-queries-in-zend

Rob Allen:
Investigating Apigility
October 10, 2013 @ 09:48:05

A few days ago at this year's ZendCon PHP conference Zend introduced Apgility, a frontend that makes creating REST APIs with Zend Framework v2 as simple as pointing and clicking. Rob Allen has taken a more in depth look at the tool and has posted his findings to his site.

At ZendCon 2013, Zend announced Apigility which is intended to ease the creation of APIs. It consists of these things: a set of ZF2 modules that do the heavy lifting of creating an API, an application wrapper for creating standalone web API applications, a built-in administration website for use in development to define the API. Rather nicely, it supports REST and RPC and deal with error handling, versioning & content negotiation for you.

He uses his usual demo application (based on this repository) and shows how to get the software installed and running on the built-in (PHP 5.4+) web server with Composer. He walks you through the things you'll need to update in the application to fit it in with the Apigility structure, but they're pretty minimal. Once you fire up the server you'll be dropped into the main Apigility admin interface. From there he shows you how to set up a custom "album" endpoint and testing it with a simple cURL call.

0 comments voice your opinion now!
apigility rest api management build tool zend zendframework2

Link: http://akrabat.com/zend-framework-2/investigating-apigility/

SitePoint PHP Blog:
Continuous Deployment Revisited
September 19, 2013 @ 12:52:50

On the SitePoint PHP blog today David Shirley has a new tutorial looking at continuous deployment with a bit more detail than his previous post.

In an earlier article I talked about what Continuous Deployment was and how it fits into the modern programming process. We took a small swipe at how it works, but some people (okay, one person) felt that I could have gone into more detail and they were right. [...] The essence of Continuous Deployment is that you use automated tools to do a lot of the heavy lifting. This means there may or may not be a bit of a learning curve when you first get started. A number of software elements are brought into play, and if you already know how to use those, great. If you don't, just remember that this is a learning curve, not a barrier.

He's broken down the rest of the tutorial into sections relating to the different pieces needed to effectively set up a continuous deployment (CD) system:

  • Effective use of version control
  • Commitment to automated testing
  • Setup and use of automated build software
0 comments voice your opinion now!
continuous deployment series detail versioncontrol testing build software

Link: http://www.sitepoint.com/continuous-deployment-revisited

WordPress.org:
A New Frontier for Core Development
August 07, 2013 @ 10:21:32

WordPress, by far one of the most popular PHP-based applications out there has a new post to their site officially stating a change in core development practices:

In a little over a decade, we've made twenty five thousand commits to WordPress. WordPress (along with the web itself) has come a long way, but our development workflow has remained largely the same.

As a part 3.7, I'll be leading an effort to revamp and streamline our development workflow. We're going to bring all of our core components - our code, our tests, and our tooling - under one roof. Developers will be able to use and improve the tools we're already working with day-to-day, and we'll be able to add new tools to make working with WordPress even easier.

We're also making sure that any changes are compatible with our current workflow, so you won't have to change the way you work. These changes won't break any existing checkouts or scripts that use core.svn.wordpress.org.

The post also details some of the new things they're doing to improve the development and deployment process. This includes the creation of a "develop.svn.wordpress.org" SVN repository to hold all new WordPress development. There's also a new build process involving a tool called "bumpbot" and the new addition of Grunt.

0 comments voice your opinion now!
core development changes build process svn develop

Link: http://make.wordpress.org/core/2013/08/06/a-new-frontier-for-core-development

Ben Ramsey:
Contributing to PHP Core
July 12, 2013 @ 11:31:06

Ben Ramsey has a new post to his site today related to a talk of his that was accepted at this year's ZendCon conference about contributing to the PHP core:

I've been accepted to speak at ZendCon this year. One of the three talks I'll be presenting is a new one: "Contributing to Core: My Journey to Add array_column() to the PHP Core." While PHP conferences sometimes include talks or tutorials on creating PHP extensions or the intricacies of the PHP internals, I've never seen a talk about one's personal experiences contributing to core, from start to finish, and how one would go about getting started. That's what this talk is about.

He also shares a tool that he used when he was doing his own work on the array_column function - a PHP development Puppet setup that could be spun up and reproduced as needed. He also spends some time talking about the build cycle, how to run tests and a link to the Puppet Cookbook he kept close for reference.

0 comments voice your opinion now!
contribute core puppet development build unittest

Link: http://benramsey.com/blog/2013/07/contributing-to-php-core

Bob Majdak:
On SQL in PHP
May 16, 2013 @ 10:11:29

In a new post to his site Bob Majdak looks at using SQL in PHP and some of the challenges he's come across (some of them with his own tools). He talks about things line inline SQL, loading SQL by unique key or creating a "build object".

There is no right or wrong way, but no matter what there is no *pretty* way to do SQL inside of a PHP application. I have been having a personal debate with myself all week about how to make SQL statements nicer in an application without going to a huge DBAL package like Doctrine.

He looks at each idea and provides some of the pros and cons about each of them, noting that he hasn't quite decided on which is the best method. Some sample code is included to help clarify the points, showing the "find by unique key" version and how a more complex query might be created with the "builder object."

0 comments voice your opinion now!
sql load unique key build object pros cons method inline

Link: http://catch404.net/2013/05/on-sql-in-php

PHPMaster.com:
Maven and PHP
May 09, 2013 @ 12:42:37

PHPMaster.com has a new tutorial posted that introduces you to a build tool that's more common in the Java world but can easily support PHP projects, Apache's Maven.

Apache Maven is a build automation tool with the purpose of building, reporting, and creating documentation of projects. It builds projects using a Project Object Model (POM) and a set of plugins shared by all projects using Maven, thus providing a uniform build system. Once you familiarize yourself with how one Maven project builds, you automatically know how all Maven projects build. [...] Through this article you will gain familiarity with Maven for PHP, and how to install and use the PHP-Maven plugin from the command line and in Eclipse.

The tutorial walks you first through the basic install of Maven and get you started with an example "settings.xml" file helping to set up the PHP-Maven plugin. They help you create your first project using the Archetype plugin and its related "pom.xml" file. The project already has a defined structure (similar to what you might see in a Composer-loadable PHP repo on Github) for the source of your app and the tests. They show you how to hook in PHPUnit and phpDocumentor for testing/dcumentation builds and, finally, how to integrate it all into Eclipse to allow for easier, in-IDE interactions.

0 comments voice your opinion now!
maven build tool eclipse tutorial install configure phpmaven

Link: http://phpmaster.com/maven-and-php

Luis Atencio:
Notes on Continuous Delivery - Continuous Integration
March 26, 2013 @ 12:20:31

Luis Atencio has posted the third part of his continuous delivery series (parts one and two), this time with a focus on continuous integration as a part of the process.

This is a continuation from my previous post and overall the series on Continuous Delivery. If you haven't been following, that's okay, every topic is self-contained, so read along. The contents of these posts are taken from the book titled "Continuous Delivery" by Humble and Farley (resources below) overlaid with my own professional experience. In this article, we talk a bit more about Continuous Integration (CI) and some practices developers should follow to ensure a smooth environment.

He talks some about what "continuous integration" is and how much it relies on an automation of the process around your delivery of software. He mentions integration of testing (unit/acceptance/integration) and how it can help discover issues early. He includes a list of essential practices that come along with the idea of CI integration including:

  • Don't check in on a broken build
  • Keep a stable build at all times
  • Anticipate being able to revert your changes
  • Using TDD
  • Distributed Version Control

He also recommends using any downtime (like waiting on a build to "go green" again) to take a few minutes away from the code - it can benefit you and your code.

0 comments voice your opinion now!
continuous delivery overview integration build deploy


Lorna Mitchell:
First Phing Plugin
March 25, 2013 @ 10:49:23

In the latest post to her site, Lorna Mitchell walks you through the creation of a first Phing plugin, an extension to the popular PHP-based build tool.

I'm a huge fan of Phing and use it regularly for build and deployment tasks. Often, I'll ask about a plugin that I wish existed, and get a very courteous "patches welcome" from the nice people in the #phing channel on freenode. This has happened a few times, so I thought I should probably look at how to make a new phing plugin, this article shows you how to make the simplest thing I could think of: a simple "hello world" plugin.

She points you to the location to grab the latest version of the tool (the github repository) and how to define a configuration file for your test runs. Then she includes the sample code showing how to create the "HelloTask" plugin. It takes an input value of "name" and displays a greeting when executed. She shows the syntax for defining this in the XML build file and the sample result when executed.

0 comments voice your opinion now!
phing plugin install build configuration xml helloworld task



Community Events





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


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

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