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

Andreas Möller:
Makefile for lazy developers
Jan 26, 2018 @ 17:45:18

In a post to his site Andreas Möller shares a tool that he uses to get an application up and running quickly, providing a makefile for lazy developers.

Whatever the size of the software project, I believe in, subscribe to, and promote Continuous Integration. Personally, I rely on Travis CI as an automated build system. Regardless of whether an automated build system can be set up and used for a project or not, I prefer to be able to run build steps locally. This prevents stress testing the automated build system and taking away resources from other developers. Also, it gives me more confidence before committing and pushing changes upstream.

[...] For a couple of years now I have been using make, after having been introduced to it when working on a project in 2014. While it has its limitations, it’s short and simple, and most of all, it get’s the job done.

He then talks about the repository he's created to get up and running quickly that creates a simple Makefile to define several make commands and shortcuts for some common tasks. The make it task is the most used, executing all of the other tasks to ensure that all tests pass, the code is well-structured and generates a coverage report to ensure as much of the code is covered by tests as it should be.

tagged: makefile make tutorial repository common task lazy

Link: https://localheinz.com/blog/2018/01/24/makefile-for-lazy-developers/

Master Zend Framework:
How to Build a Docker Test Environment
Sep 28, 2016 @ 16:20:40

The Master Zend Framework site continues their series covering the creation of a Docker-based testing environment in this second part highlighting the addition of testing support.

In the first part in this series on developing web applications using Docker, we saw how to create a local development environment using Docker; one ideally suited to creating Zend Expressive (or any other kind of PHP-based web application). But, what we didn’t cover was how to handle testing in a Docker-based environment.

[...] How do you run tests when working with Docker containers? After a bit of searching, I found that it’s not that difficult. But you have to use the right combination of commands.

Since unit tests can be run locally if need be (they shouldn't need any resources from the service if they're true unit tests) he focuses on acceptance testing. For his examples he uses the Codeception testing tool. He walks you through the setup of some simple tests based on the "home" page functionality of the Zend Expressive skeleton application. With that in place, he shows the updates that will need to be made to execute the tests from outside the instance via a "docker exec" call. The post finishes with a look at adding two other tools to the mix as well: Make and Phing.

tagged: docker test environment series part2 testing acceptance codeception make phing

Link: http://www.masterzendframework.com/how-to-build-a-docker-test-environment/

Matthew Weier O'Phinney:
Deployment with Zend Server (Part 8 of 8)
Sep 18, 2014 @ 16:20:04

Matthew Weier O'Phinney has posted the last part of his "Deployment with Zend Server" series with part eight. This part focuses on some hints around the actual deployment and automation.

This is the final in a series of eight posts detailing tips on deploying to Zend Server. Zend Server SDK to deploy your Zend Server deployment packages (ZPKs) from the command line. Today, I'll detail how I automate deployment with zf-deploy and zs-client (the Zend Server SDK), and wrap up the series with some closing thoughts.

He quickly summarizes the previous parts of the series as individual steps and wonders if there's a better way than doing each of them manually. He shows exactly this with the automation handling that zf-deploy and zs-client offer combined with a make script defining steps for the deploy, ZPK update and a cleanup/Composer update task.

tagged: deployment zendserver tip series part8 automation make command zfdeploy zsclient

Link: https://mwop.net/blog/2014-09-18-zend-server-deployment-part-8.html

php[architect]:
May 2014 Issue Released - Making a Difference
May 20, 2014 @ 17:20:43

php[architect] has announced the release of the latest edition of their magazine, the May 2014 edition: "Making a Difference".

Our May issue is now available. While it’s easy to focus on our own needs and tasks, in this issue, we look at how you Make a Difference and bank some karma too.

Articles in this issue include:

  • Joe Devon covering Global Accessibility Awareness Day
  • Michael Crumm on working with Guzzle and APIs
  • Aaron Saray looking at filter_var and other built-in functions
  • Matthew Setter finishes up his Phalcon introduction

You can pick up your copy of this month's magazine either as a single issue or as a part of a yearly (print or PDF...or both!) subscription.

tagged: phparchitect may2014 issue release make difference

Link: http://www.phparch.com/2014/05/may-2014-phparchitect-magazine-released-making-a-difference/

Nefarious Designs Blog:
Website builds using Make
Feb 26, 2010 @ 16:09:05

New from the Nefarious Designs blog today is a comprehensive post on using make to create automated website builds. He looks specifically at how to manage and build the Javascript and CSS portions of a site (but parts of it could be applied to just about any files you might want to automate).

In the interests of improving quality in production, of eliminating repetitive tasks, and of general development time saving, it’s often a good idea to automate some of the website build process. What do I mean by "website build process"? Put simply, the task of preparation and publication to production (your live, open-to-the-internet environment), from a development environment. [...] I’m going to look at how you can automate the CSS and JavaScript part of the build process using Make, a handy little program that is installed with the standard build tools on most *nix based systems.

He shows how to automate the compression of multiple Javascript/CSS files into a single one (to reduce the number of HTTP requests required) by figuring out what's needed for the page. He shows how to build the Makefile with a few simple rules that concatenate the files together, run a minification tool on them and clean up any onld versions that might be out there. The final step is automatically updating the HTML to include the newly created Javascript/CSS file without having to do each one manually.

Examples of what you'll need to have in your Makefile are all included as well as the commands to issue to get it all working.

tagged: webiste automatic build make tutorial

Link:

Alexey Zakhlestins' Blog:
Pake: PHP5 project build system
Aug 04, 2009 @ 17:51:34

Alexey Zakhlestins has posted about a build system created by developers of the Symfony framework as PHP's answer to Make and Rake - Pake.

Often, while working on software projects, one finds, that there are repetitive tasks, which would be much easier to deal with, if automated. In the C/Unix world, this task is often solved by Make, Java programmers prefer Apache Ant, Ruby programmers use Rake. The fact, which is not commonly known, is, that PHP also has such instrument, and it is called Pake. It was originally created by authors of Symfony framework. Unfortunately, they never wrote any documentation, which killed adoption rates.

He shows what a sample "Pakefile.php" file might look like and links to the github page for his revamp of the project to add a few more helpers. You can also install it as a PEAR pacakge.

tagged: pake build system make ant rake

Link:

Jani Hartikainen's Blog:
Improved Zend Framework package maker
Nov 14, 2008 @ 14:49:51

Jani Hartikainen has made a few updates to his packageizer script for the Zend Framework to improve its interface.

Now, based on some feedback from users, I've improved the user interface of the tool: You can now select multiple items for inclusion in the package, and I've made it possible to get the packages in .phar format. It also has initial support for different libraries, ie. Zend Framework 1.6 and Zend Framework SVN trunk, but currently only 1.6 stable is available.

The tool allows you to select just the packages out of the Zend Framework that you might want to work with and packages them up, along with their dependencies, into a simple, portable file that can be used anywhere the Framework normally could.

tagged: zendframework package packageizer dependencies make

Link:

Zak Greant's Blog:
OSCON Highlight: Rasmus' "How to Make Money with PHP" session
Jul 28, 2006 @ 10:44:13

On his blog today, Zak Greant points out the talk that Rasmus Lerdorf has given at this year's OSCON - "How to Make Money with PHP", complete with a link to slides.

Rasmus is presenting his "How to Make Money with PHP" session for the Portland PHP User group, OSCON attendees and OSCAMP attendees. This session is one of my favorite Rasmus talks - the concepts that he teaches are key to helping PHP developers move from being frustrated novices to being happy and productive PHP hackers.

Some of the key things that the session covers are how to find bottlenecks in your PHP application, how to plan for capacity and (of course) how to make huge amounts of money with PHP.

As mentioned, here's the link for the slides. It looses a bit when it's not being presented right there in front of you, but the 23 slides provide more than enough information to keep one busy for a while.

tagged: make money oscon2006 highlight talk make money oscon2006 highlight talk

Link:

Zak Greant's Blog:
OSCON Highlight: Rasmus' "How to Make Money with PHP" session
Jul 28, 2006 @ 10:44:13

On his blog today, Zak Greant points out the talk that Rasmus Lerdorf has given at this year's OSCON - "How to Make Money with PHP", complete with a link to slides.

Rasmus is presenting his "How to Make Money with PHP" session for the Portland PHP User group, OSCON attendees and OSCAMP attendees. This session is one of my favorite Rasmus talks - the concepts that he teaches are key to helping PHP developers move from being frustrated novices to being happy and productive PHP hackers.

Some of the key things that the session covers are how to find bottlenecks in your PHP application, how to plan for capacity and (of course) how to make huge amounts of money with PHP.

As mentioned, here's the link for the slides. It looses a bit when it's not being presented right there in front of you, but the 23 slides provide more than enough information to keep one busy for a while.

tagged: make money oscon2006 highlight talk make money oscon2006 highlight talk

Link:

Justin Silverton's Blog:
Using PHP and Postgres
Mar 06, 2006 @ 13:43:10

Justin Silverton has posted a quick introductory tutorial on how to use the PostgreSQL database from inside PHP.

This is a simple guide on how to start connecting to a postgres database with php. I also assume that you already have a database setup with a table/tables.

He shows how to make a connection to a database, perform a simple query, and provides the names of some other "helpful functions" from the PostgreSQL part of the manual along with what they do.

tagged: postgresql introduction make connection query postgresql introduction make connection query

Link:


Trending Topics: