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

SitePoint PHP Blog:
Composer Global Require Considered Harmful?
Jun 08, 2016 @ 09:53:05

The SitePoint PHP blog has a post about a feature Composer provides to help make tools and libraries easier to use - the ability to install things globally. In this post editor Bruno Skvorc wonders if this feature should be "considered harmful" and a bad practice.

We’ve discussed Composer best practices before, and I’ve always advocated using composer global require when installing packages that can be used across several projects – particularly command line tools. Then, the other day, I ran into this discussion. The short of it is – the majority of people now seem to feel like global require is bad practice, unless the globally installed package has zero dependencies.

The article he references offers an alternative option however: install locally to the project and just update your paths to allow for it to be easily found. This can be difficult and hard to maintain so Bruno offers a counter-suggestion, the "[consolidation/cgr]"(https://github.com/consolidation-org/cgr) tool. This tool handles the "global" install in a way that still isolates it and then automatically updates your .bash_aliases with the command and path to make it easier to use.

tagged: composer global require harmful cgr tool local project

Link: https://www.sitepoint.com/composer-global-require-considered-harmful/

SitePoint Web Blog:
Please: Automated CMS and Framework Installs in Vagrant
May 25, 2016 @ 10:29:08

On the SitePoint.com site's "Web" category they're posted a tutorial showing off an interesting piece of software that helps make automated installs of CMS/frameworks easy: a simple bash script tool called Please.

If you’re a web developer, possibly one of your most boring and repetitive tasks is the configuration of the basic setup for every new project. Configuring your my-project.dev domain, creating the database, installing WordPress (or any other CMS/Framework) for the thousandth time: you already know how to do it. What if you could automate all of that?

Well, actually, you can. Please is a simple bash script that helps to automate the installations of many CMSs and Frameworks by configuring them automatically into your Vagrant box, adding a development domain name into your host file, and even a database if needed.

They start off by helping you get a Vagrant box up and running to use for the Please handling. You then clone the Please repository locally and can use the command line tool to set up the process for multiple CMS/framework types including WordPress, Laravel and React. There's also a section covering the creation of your own environment if you need something more custom. Please is currently in beta at the time of this post so be aware that there may still be issues that need resolving before it becomes stable.

tagged: please automated installation tool commandline cms framework vagrant

Link: https://www.sitepoint.com/please-automated-cms-and-framework-installs-in-vagrant/

/Dev/Hell Podcast:
Episode 76: No, YOU'RE a Tool
May 10, 2016 @ 11:23:15

The /Dev/Hell podcast, hosted by PHP community members Chris Hartjes and Ed Finkler, has posted its latest episode: Episode #76: No, YOU'RE a Tool.

Chris and Ed sit down to talk about their recent travels to conference both near and far and to also discuss what tools and languages they have been using at their day jobs.

Some of the topics mentioned include:

  • Editors like PHPStorm, Nano and Vim
  • Libraries/tools like Vue.js, HTTPie and Docker
  • Languages besides PHP including Javascript and Python

You can listen to this latest episode either through the in-page audio player or by downloading the mp3 of the show. If you enjoy it, be sure to subscribe to their feed and get the latest shows as they're released.

tagged: devhell podcast ep76 tool library chrishartjes edfinkler

Link: http://devhell.info/post/2016-05-08/no-youre-a-tool/

Laravel News:
Announcing Laravel Valet
May 06, 2016 @ 09:46:28

The Laravel News site Eric Barnes has a post about the latest addition to the Laravel ecosystem (that includes the framework, Envoyer and Homestead) - Laravel Valet.

Laravel Valet is the next generation development environment for Mac minimalists. No Vagrant, No Apache, No Nginx, No /etc/hosts file. “I wanted to have the convenience of php artisan serve without ever having to run php artisan serve“, Taylor said when asked why he created it.

Valet works by hooking into your Mac’s built-in PHP server then it utilizes DnsMasq to proxy all requests to the .dev TLD to sites on your local machine.

The post links to the official documentation and an article he's written up with a "first look" at the new tool.

tagged: laravel valet tool setup configure website simple opinionated

Link: https://laravel-news.com/2016/05/announcing-laravel-valet/

TutsPlus.com:
Deploy Your PHP Application With Rocketeer
May 04, 2016 @ 14:19:01

On the TutsPlus.com site there's a new tutorial posted that aims to help you deploy your PHP application with Rocketeer, a PHP-based deployment tool with lots of built in functionality for more complex deployments.

There used to be a time when PHP developers had to use deployment tools that were aimed at general web applications. [...] But nowadays, we're blessed with a few deployment tools written in our language that enable deeper integration. One of these tools is Rocketeer, a tool that takes inspiration from Capistrano and the Laravel framework.

Rocketeer is a modern tool that brings a great approach for your deployment needs. That is to run tasks and manage your application across different environments and servers.

They start with a brief introduction to the Rocketeer tool (basically a SSH driven command execution engine) and show you how to get it installed on your system. They then help you initialize the setup directory (.rocketeer) and describe each of the pieces and how the deployment happens. They show you how to configure events and tasks in the system to perform during execution. They also show the definition of "strategies" to execution events/tasks in groups, work with plugins and, finally, running an example deployment.

tagged: rocketeer deployment tool introduction configuration example

Link: http://code.tutsplus.com/articles/deploy-your-php-application-with-rocketeer--cms-25838

QaFoo Blog:
Common Bottlenecks in Performance Tests
Apr 22, 2016 @ 11:24:46

On the QaFoo blog there's a post sharing some of what they've learned about the common bottlenecks in performance testing and some things you can to do determine the issues in your own tests.

Most developers by now internalized that we should not invest time in optimizations before we know what happens exactly. [...] This is true for optimizations in your PHP code but also for optimizations regarding your infrastructure. We should measure before we try to optimize and waste time. When it comes to the assumed performance problems in your system architecture most people guess the root cause will be the database. This might be true but in most projects we put under load it proved to be false.

So, how can we figure out where the problems are located in our stack?

They talk about some common testing practices using basic tools (like ab and siege) and having them perform common operations on the application. They then talk about testing for high load, monitoring the stack for the impact and a few tools you can use to gather statistics. They end the post with a quick mention that, despite popular opinion, the issue isn't always the database's fault. Sometimes other technology that's in play - like file locking issues or processing for server-side includes - and other things that may only show up under high load.

tagged: common bottleneck performance test advice server monitor tool

Link: https://qafoo.com/blog/082_common_bottlenecks_in_performance_tests.html

SitePoint PHP Blog:
Easy Deployment of PHP Applications with Deployer
Apr 08, 2016 @ 09:42:51

The SitePoint PHP blog has a tutorial showing you how to deploy your applications with Deployer, a simple deployment tool that aims to make it as easy as a single command to release you application to production.

Everybody tries to automate their development process, testing, code formatting, system checks, etc. This is also the case for deploying our applications or pushing a new version to the production server. Some of us do this manually by uploading the code using an FTP client, others prefer Phing, and Laravel users will prefer Envoyer for this process. In this article, I’m going to introduce you to Deployer – a deployment tool for PHP.

To introduce you to the tool they walk you through the deployment of a demo application, a simple tool that was used in a previous tutorial to connect to the 500px API. They help you get it installed and start in on some of the basic configuration:

  • setting up the target servers and environments
  • using SSH authentication
  • defining basic tasks
  • making use of "zero downtime" releases
  • using some common built-in tasks

Finally, they link to a recipes section on the Deployer website that gives you more advanced and wider reaching examples.

tagged: deployment deployer tutorial tool example introduction configuration

Link: http://www.sitepoint.com/deploying-php-applications-with-deployer/

Freek Van der Herten:
Converting PHP 7 code to equivalent PHP 5 code
Apr 01, 2016 @ 09:50:56

Freek Van der Herten has a post to his site about another new library he's worked on (along with two others) to help convert PHP 7 code back to PHP 5 code - 7to5.

In the JavaScript world converting modern code to an older syntax is quite common. In the PHP world you don’t see that happen often. Symfony provides a few [polyfills](https://github.com/symfony/polyfill), but a full fledged conversion isn’t available. At the meetup of [our local PHP user group](http://www.meetup.com/phpantwerp/) [Jens Segers](https://twitter.com/jenssegers), [Hannes Van de Vreken](https://twitter.com/hannesvdvreken) and I were toying around with the idea of converting PHP 7 code to equivalent PHP 5 code automatically.

Today our little hobby project called 7to5 was tagged 1.0.0. You can view the repo on GitHub.

He starts by talking about what the library does to backport the code from PHP 7 to PHP 5 and how to install/use the command line tool. He then gets into things "behind the curtains" with a sample PHP 7 class and the resulting PHP 5 code. They made use of the PHP Parser tool for processing the PHP code provided. It does matching on certain element types and performs the token replacement. He gives examples of this with the null coalesce operator replacement and scalar type hinting.

tagged: convert php7 php5 code tool 7to5 introduction library

Link: https://murze.be/2016/03/converting-php-7-code-equivalent-php-5-code/

SitePoint PHP Blog:
Sourcehunt March 2016: PHP in Rust, Pathfinding, Eve Online
Mar 22, 2016 @ 12:12:13

The SitePoint PHP blog has posted their latest edition of their "Sourcehunt" series, highlighting interesting and useful projects around the PHP community. In this latest edition they mention a wide range of projects including:

There's one other library mentioned in the list for the Eve Online players out there showing details for its public market API. Each item on the list includes a brief description and the number of stars the repository currently has.

tagged: sourcehunt series march2016 library tool spotlight

Link: http://www.sitepoint.com/sourcehunt-2016-03-php-in-rust-pathfinding-eve-online/

That Podcast:
Episode 26: Show me the Monii
Mar 09, 2016 @ 09:13:26

That Podcast, a show hosted by PHP community members Beau Simensen and Dave Marshall, has posted their latest episode - Episode #26: Show me the Monii.

Beau and Dave start a series of episodes discussing Beau's new startup, Monii. We talk briefly about the features and scope of their first product, including how he can really see how it would have helped him while he was self-employed.

We then take a dive in to some of the tech stack, with Beau telling us all about the front-end, including the frameworks, libraries and build tools.

Other topics mentioned in this episode include React, the JSON API project, Babel and Webpack. You can listen to this latest episode either through the in-page audio player or by downloading the mp3 directly. If you enjoy the show, be sure to subscribe to their RSS feed or on iTunes to get the latest episodes as they're released.

tagged: thatpodcast ep26 monii frontend framework library build tool

Link: https://thatpodcast.io/episodes/episode-26-show-me-the-monii