Blog > Category > PHP

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...

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 you...

DevOps Laravel Linux PHP Projects Zend Z-Ray

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...

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,...

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 user...

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 expect to see types, such as...

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...

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 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 awesome. I...

Conferences PHP Speaking Testing

Read

February 5, 2016

Adventures in Laravel

Sunshine 2016 was my second year at coming to this really great conference. Last year I gave my Secure Form Processing talk and it was a great conference as a speaker and as an attendee. When I was invited back to give a tutorial as well as another talk for 2016 I was really excited. The wife and I also arranged for her to join me on the trip to Miami, she wasn't attending the conference, just a...

Conferences Laravel PHP Speaking

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...

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 24, 2015

How I use Laravel Homestead everyday

How I use Homestead in my Laravel (and non-Laravel) Applications I feel like I've been talking about homestead a lot lately. I feel like Vagrant is such an important part of a developer's workflow. If you are still using MAMP, WAMP, or installing Virtual Machines manually you are wasting so much of your own time (and your clients money) by not using prebuilt development environments. Homestead is...

Laravel PHP Vagrant

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...

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...

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...

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

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...

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...

PHP

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...

PHP

Read