PHP

January 10, 2021

The Workshop: Easy CLI PHP with Symfony Console 5 - php[architect] Magazine April 2020

Writing console commands with PHP is something I have always taken for granted. I started my career having learned Linux and command line server configuration and was very comfortable writing small applications with BASH scripts, Python, and even dabbling in C and Microsoft Qbasic. These commands copied files to a backup location, process batched data records in CSV, XML, and various other...

learning phparch writing php

Read

January 10, 2021

The Workshop: Specification BDD with Phpspec - php[architect] Magazine May 2020

phpspec is a package in which we can use behavior driven development, BDD, which comes fromtest driven development, TDD. When applying BDD we’ll write our tests first and then only enough code to pass our tests and then refactor and verify the tests still pass exactly as we would with TDD. This cycle continues and is often referred to as red-green development of writing tests that fail and...

learning phparch writing php testing

Read

December 10, 2020

The Workshop: Managing LAMP with Virtualmin - php[architect] Magazine March 2020

Virtualmin is a web hosting and cloud computing control panel. A hosting control panel is a web-based application that runs on a server and manages all the aspects of a hosting account. This includes account information, web sites, web servers, databases, mail servers, and all the other services which ultimately work together to allow you to run your application. A lot of value I get from...

learning phparch writing php

Read

December 2, 2020

The Workshop: GitHub Actions for Continuous Integration - php[architect] Magazine February 2020

You can read the entire article for free at https://www.phparch.com/2020/07/the-workshop-github-actions-for-continuous-integration/

learning phparch writing php

Read

December 1, 2020

The Workshop: Ansible in Practice - php[architect] Magazine January 2020

This month, we're going to dive into a practical application of Ansible by building a playbook with roles to implement a fully functional Linux, MySQL, PHP, and NGINX web server. By the end, you should be able to take the playbook we build together and extend it to suit your requirements. To follow along or review any parts of the playbook we're building, you can clone the repository....

ansible learning phparch writing php

Read

September 26, 2020

The Workshop: Real World PDF Generation - php[architect] Magazine September 2019

Last month we covered the basics of PDF generation by focusing on the FPDF library. We generated a custom PDF by placing cells on the page and adding data to those cells. FPDF is a relatively low-level library in comparison to modern libraries which may do more of the heavy lifting for you. This month we’re going to pick up where we left off with our example application which you can...

learning phparch writing php

Read

September 24, 2020

The Workshop: Introduction to PDF Generation - php[architect] Magazine August 2019

In early July 2019 I asked Reddit What questions do you have about generating PDFs w/ PHP? (Research for an article) : PHP and I was pleasantly surprised at the genuine answers and feedback I received (as opposed to the normal nonstop trolling that Reddit is usually known for). One comment listed 19 different questions! Many of the comments mention different libraries and services and I believe...

learning phparch writing php

Read

September 5, 2020

The Workshop: The Road to 7.3 (Part 2) - php[architect] Magazine February 2019

Last month we explored the world of static analyzers Phan and PhpStan to find compatibility issues any several other common issues in our PHP Easy Math code base. This month we’re going to review our code base and implement new and recent features from PHP 7.x One of the best features of new PHP versions is the performance boost. With every PHP 7 release we have enjoyed some amount...

learning packages phparch writing php

Read

September 4, 2020

The Workshop: The Road to 7.3 (Part 1) - php[architect] Magazine January 2019

Last month as I was writing “The Workshop: Producing Packages (Part 3)” I had a feeling I would end up regretting the line “This will be the third and final installment in this series”. Sure enough I have one more topic I want to cover: upgrading to a new PHP version. Upgrading PHP versions is enough to be its own “The Workshop” series however since 7.3 was just released...

learning packages phparch writing php

Read

September 3, 2020

The Workshop: Producing Packages (Part 3) - php[architect] Magazine December 2018

Over the past two months we've been building PHP Easy Math a purposely simple example library to demonstrate how to build a reusable package for the PHP ecosystem. Make sure to check the previous issues if you're just now joining us! This will be the third and final installment in this series. This month we're going to cover triaging and managing issues users may open as well as pull...

learning packages phparch writing php

Read

September 2, 2020

The Workshop: Producing Packages (Part 2) - php[architect] Magazine November 2018

Last month we started building PHP Easy Math, a small library which can be included in PHP projects to provide simple methods to do basic addition and subtraction. We're using this as an example library to focus on what makes a library "good" we are less worried about the practical need for and usage of our package. If you have not yet read Part 1 pause here and go read The...

learning packages phparch writing php

Read

September 1, 2020

The Workshop: Producing Packages (Part 1) - php[architect] Magazine October 2018

This month we are diving into creating PHP packages and ensuring our packages are held to a high standard of having tests, license information, and other best practices for creating and maintaining high quality PHP packages. Composer changed the entire PHP ecosystem by giving us Composer, a fantastic package manager and Packagist, the public repository of libraries. PHP developers can...

learning packages phparch writing php

Read

August 27, 2020

The Workshop: Describe Your Tests with Kahlan - php[architect] Magazine September 2018

This month we're covering a full featured unit and behavior driven development (BDD) test framework named Kahlan. Kahlan is similar to Rspec (Ruby) and JSpec (Java) using BDD style syntax where you describe the behavior your application should have. We already have tons of PHP testing frameworks readily available in the PHP ecosystem such as PHPUnit, phpspec, Codeception, Behat, and...

learning phparch writing testing php

Read

August 26, 2020

The Workshop: Make PhpStorm Work for You - php[architect] Magazine August 2018

This month we're going to dive into using PhpStorm and cover configuration from personal preferences to obeying standards and day to day usage. PhpStorm is practically the de facto integrated development environment (IDE) for PHP development. It's a paid product from a company named JetBrains. Jetbrains develops and maintains several IDEs for specific languages such as WebStorm for...

learning packages phparch writing php

Read

November 7, 2018

Adding MySQL 8 support to Laravel Homestead

My friend Beau Simensen has been doing awesome stuff building and streaming his work on astrocasts.com. He's inspired me to start streaming again and last night I spent some time adding a feature to Laravel Homestead to add MySQL 8 as an option. Video from the live stream:

devops linux php projects ubuntu vagrant

Read

February 10, 2018

Slim PHP when you do not need the kitchen sink

This year a SunshinePHP I debuted a brand new talk "Slim PHP when you Don't need the kitchen sink" Description: Full stack frameworks can often be too much for an application. What if you have a one off project that doesn't need "everything and the kitchen sink"? What if you have a large project you want to build yourself to be as lean as possible? Join us for an introduction into the Slim...

conferences php slimphp speaking

Read

February 6, 2018

Homestead Welcomes Z-Ray by Zend

Since the release of Homestead version 7.1.0 and base box version 5.1.0 Homestead now supports the Zend Z-Ray plugin for PHP 7.2. You can start leveraging the power of Z-Ray in your application with a small changes to your Homestead project. First make sure you have updated Homestead to v7.1.0 of the Homestead repo and version 5.1.0 of the base box. You can check what versions of the base box...

devops laravel linux php projects zend zray

Read

January 16, 2018

How to move a dependency to Composer while requiring an old version

A common problem I run into with older applications are dependencies that have been added and loaded from the application's repository. You would often see a "libraries" folder with a "className.php" type file. If you're lucky you'll have the entire folder of the dependency including the release notes to be able to find out exactly what version you're using. Composer lets us easily move to this...

day job php today i learned

Read

July 6, 2017

Install and Configure PHP 7.1 on Cloud 9 Workspaces

July 8th I'm giving a general PHP training day at the Fedex Institute of Technology and because I'm targeting absolute beginners I wanted to use Cloud 9. Cloud 9 is an online editor that gives you a full linux workspace to build your project in. The first thing I noticed was the container Cloud 9 provides is running PHP 5.5. I've created a simple bash script to update PHP to 7.1 and update...

community general linux php projects speaking ubuntu

Read

May 25, 2017

Why does Guzzle put an underscore in my url!?

"Why does Guzzle put an underscore in my url!?" This was an issue I agonized over for more time than I'm willing to admit. I was parsing URLs out of an Apache access log to gather real world usage to run against my test server for the day job. I was having the issue when I read the URL from the file and passed the URL to Guzzle that Guzzle would append an underscore to every URL, causing it to...

day job php today i learned

Read

December 21, 2016

Mocking Swift Mailer -- 3 Steps to better code

A few days ago an issue came across my Jira queue that mentioned odd characters showing up in the subject line of our notification system. We use SwiftMailer library which is a fantastic library for sending mail. The bug report included text similar to: Something was taking our twig template that we use for our email subject and changing the encoding. This is normally done when you want to...

php testing

Read

December 6, 2016

Laravel Release Schedule

I always have a hard time figuring out what versions where released when and how much longer We'll have support for which versions. I decided to do some research and come up with a chart. General rule is that Laravel will release new version in January and July. (To coincide with Laracon Events) Based on that here's a current list of Laravel versions and their support dates from Laravel 5.0 to...

laravel php

Read

August 31, 2016

PHP User Group Sticker Exchange 2016

I started a thread on the PHP UG Admins email list of doing a User Group sticker exchange and the idea took off pretty quickly. The idea is that user groups that want to participate send stickers to a central location. Stickers are then broken up into packets where every group that sent stickers will receive a packet of stickers from all the other user groups. The goal would be for every...

community php

Read

August 31, 2016

Solidify Fragile Tests

On my first week at the new job I was tasked to fix some tests that were logging data. While the fix was simple enough, by using `Psr\Log\NullLogger as Logger` instead of `Monolog\Logger` in the test, during the process I ran into another test that appeared quite fragile. Fragile test: Our `getFood()` method returns an array of all foods by type. Given that, we would...

php testing

Read

April 26, 2016

Join me at php[tek] 2016!

You should come to php[tek] May 23-27, 2016 As you'll learn in the video below, I'll be doing a full day in person training on Laravel. I'll also be giving a brand new talk "So you just inherited a $Legacy application..." Hope to see you there!

conferences php speaking

Read

March 29, 2016

Validating and Releasing Packages with Producer

Producer is a pretty neat project that wants you to release higher quality packages. Well, actually (sorry) it's "a command-line tool to validate, and then release, your PHP library package. It supports Git and Mercurial for version control, as well as Github, Gitlab, and Bitbucket for remote origins." I was immediately interested in this tool because the Phergie project I manage (with...

php

Read

March 21, 2016

Adding Homestead to a SlimPHP App

I've been a fan of SlimPHP for a really long time. Recently I started using it for a site that I do freelancing development for and wanted to share a quick solution to local development. It's no secret that I love Laravel's Homestead vagrant environment. Using the per-project installation method, you are only three commands away from running a SlimPHP skeleton application in a local Homestead...

php slimphp vagrant

Read

February 6, 2016

Acceptance and Functional Testing with Codeception -- SunshinePHP 2016

Feedback via Twitter SunshinePHP 2016 was the second time I formally gave my Acceptance & Functional Testing with Codeception talk. I had built the talk from a handful of demo sessions at my local user group: MemphisPHP.org. The first time I gave the talk was at DevSpaceConf in October 2015. I only had two attendees show up to the talk which turned out to be really...

conferences php speaking testing

Read

December 8, 2015

Installing PHP 5.6.x on CentOS 5.11

Install Nginx, PHP 5.6.15 and PHP-FPM on CentOS 5.11 I know... I know. But I had to figure it out. So here's what made it happen: Starting Point: Install Extra Repos: Enable Repos and install nginx and php: I had to install php-pear and php-pecl-json before the big install because I was getting warnings: Final Result: Your milage may vary. I hope no one ever needs this.

devops linux php

Read

October 23, 2015

ZendCon 2015 Thoughts

ZendCon 2015 was my first ZendCon experience. I was selected to give two talks, "Laravel Forge: Hello World to Hello Production" and "DevOps for Small Teams". This was my first time giving the updated talk about Forge which also includes a basic Envoyer review and I feel like the talk went really well. Attendees seemed to enjoy it and a lot of people told me afterward they enjoyed the talk. I...

community conferences devops laravel php speaking

Read

August 12, 2015

On Community Silos

Before starting this conversation (I really hope it becomes a conversation) I would like to concede a few points. This may also give insight as to where my observations are coming from. I am a PHP Developer. Professionally since 2005, Hobbyist since 1998/1999. I am an active member in the PHP Community. I am an active member in the Laravel Community. I love Laravel and have been using it since...

community laravel php

Read

June 20, 2015

Install Homestead into your project

I've previously shared a project I built that allowed you to easily add the Laravel Homestead vagrant environment into your project. My goal with the package was to give an easy way of installing the core homestead files into your project needed to have an isolated vagrant machine. I pinged Taylor Otwell about possibly adding this sort of functionality to the homestead application itself. This...

homestead laravel php vagrant

Read

June 5, 2015

Mentoring -- Things I wish I knew sooner

I was recently contacted by someone who saw my post about being a PHP mentor on PHPMentoring.org and was curious if I was still open to taking an apprentice. This was very neat because most of my outside-of-work mentoring (as an apprentice and as a mentor) has been very informal. I'm hesitant to jump into such a relationship because it really depends on so many factors. We need to figure out what...

community mentoring php

Read

May 18, 2015

Using Laravels Homestead from your project

I love Laravel's Homestead environment. I've been using it since it was first released and have found it incredibly handy. I often use it for non-Laravel uses as well. It's a great PHP 5.6+ / nginx / MySQL vagrant box. With Homestead version 2, Homestead was changed to run from your home folder and it pushed you more towards using one Homestead machine for all of your Laravel projects. This is...

devops laravel php vagrant

Read

February 20, 2015

Speaking Engagements! A Brief Recap

"Insert clever statement of ‘it's been a long time since I last posted here'" Now that we have that out of the way, the past few months have been quite busy for me. I gave my "Laravel Forge: Hello World to Hello Production"  talk at the first php[world] conference (organized by the great people behind php[tek] and php[architect] magazine) and it was my first non-local conference...

php speaking

Read

December 15, 2014

Weekend Project: NerdsAreDrinking -- Laravel, Twitter, and Commands

Last Friday I was enjoying an after work beer at my favorite taproom with Brian and Nicole. Brian is one of my two cohosts of the Nerds Drinking Podcast. As we sat there talking each one of us checked into our beers via untappd and I made the comment: "Wouldn't it be amusing if the @nerdsdrinking twitter account retweeted our beer checkin whenever we had untappd tweet?" We had a decent chuckle...

laravel php

Read

August 22, 2014

php[architect] Magazine published my article "HTML Form Processing with PHP"

Back in February 2014 I was contacted by php[architect] magazine about turning one of the talks I submitted to php[tek] 2014 (among many other conferences) into a magazine article. I'm proud to say that you can now read that article in the August 2014 Issue of php[architect] Magazine!

php phparch security

Read

July 29, 2014

TeamCity + Codeception + Laravel = Automated build testing

I'm going to start out by saying this: I'm probably not doing this the "right" way. I've not been able to find anything that really pushes me into the "right" way so I'm documenting what I currently have working in hopes that someone will come along and show me a better way. The project I'm working with is for my day job and covered by some signed documents so I can't really divulge anything...

laravel php testing

Read

July 16, 2014

Laravel Forge post to Slack channel on deploy

Update! Added github info from https://twitter.com/vistikloft We've been using Slack at the day job for a couple of months now and one of the first things I did was start playing with integrations, mainly bitbucket to post to a slack channel so we can see what everyone is working on. We are also using Laravel Forge for a custom application and I love the automatic deployments on branch...

devops laravel php

Read

June 26, 2014

Unit Testing Laravel 4 w/ Cartalyst Sentry + Mockery

I had a really hard time piecing this together so I thought I'd share it and maybe it would help someone (or me in 2 months when I forget all of this and stumble upon it again). The use case: I have a Controller "BoxesController" that I want to unit test the store() method on. The thing I had to play with some was having the test act as an admin user because I was posting to a route only admins...

php testing laravel

Read

December 19, 2013

Using a repository that doesnt have composer.json

Have you ever run across a repository that you'd love to throw into your project via composer and the repository author didn't include composer.json? I ran into that exact issue with a project and had to figure out what the best way to handle the situation was. There are a few different ways you could include the repo. I'll show you how I did it without having to copy the repository directly into...

composer github laravel php version control

Read