PHP
May 2, 2024
PHP to Rust via Copilot
I set out to build a small project in Rust. I wanted to scrape a website and parse a JSON payload. I ran into issues quickly as this was my first real project build it Rust. I thought this might be a great use case to see if GitHub Copilot could help me convert some PHP code I had to Rust. Below is the PHP code I wanted to convert to Rust. Savvy PHP developers will quickly spot this is a...
ReadMay 13, 2022
The Workshop: Apache and PHP – Back to Basics - php[architect] Magazine January 2022
This month we’re diving into Apache and PHP configuration to better understand the relationship between the web (HTTP) server and our application. When getting started with PHP it’s quite common for tutorials and guides to skip over the webserver and focus more on the language aspects. PHP developers need to have a strong understanding of how the webserver executes their code as requests...
learning phparch writing php apache
ReadFebruary 25, 2022
The Workshop: Testing with Pest Framework - php[architect] Magazine August 2021
Pest is a PHP testing framework focused on simplicity and brings a powerful expectations API to PHP. Pest is influenced by Jest, a JavaScript testing framework. Pest was created by Nuno Maduro originally via Sponsorware license, and ultimately has been published under the MIT open source license. You can think of Pest ha an alternative to other testing frameworks, such as Codeception, which can...
learning phparch writing php testing
ReadJune 11, 2021
The Workshop: S3 Storage with MinIO - php[architect] Magazine January 2021
This month we’re diving into running our own S3 compatible open-source server via the open-source project MinIO. We’ll configure MinIO alongside our local development environment so we can easily replicate the integration of our application with S3 object storage without operating on “production” storage buckets or having to setup “dev” buckets. Amazon’s Simple Storage Service...
learning phparch writing php s3 data storage
ReadJanuary 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...
ReadJanuary 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
ReadDecember 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...
ReadDecember 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
ReadSeptember 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...
ReadSeptember 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...
ReadSeptember 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
ReadSeptember 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
ReadSeptember 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
ReadSeptember 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
ReadSeptember 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
ReadAugust 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
ReadAugust 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
ReadNovember 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
ReadFebruary 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
ReadFebruary 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
ReadJanuary 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...
ReadJuly 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
ReadMay 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...
ReadDecember 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...
ReadDecember 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...
ReadAugust 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...
ReadAugust 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...
ReadApril 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!
ReadMarch 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...
ReadMarch 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...
ReadFebruary 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
ReadDecember 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.
ReadOctober 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
ReadAugust 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...
ReadJune 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...
ReadJune 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...
ReadMay 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...
ReadFebruary 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...
ReadDecember 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...
ReadAugust 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!
ReadJuly 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...
ReadJuly 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...
ReadJune 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...
ReadDecember 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
ReadAs Seen On
Recent Posts
- PHP to Rust via Copilot
- Compiling Python 3.12 from Source Tarball on Linux
- HTML Form Processing with PHP - php[architect] Magazine August 2014
- The Workshop: Local Dev with Lando - php[architect] Magazine November 2022
- Getting back into the swing of things
- All Posts
Categories
- ansible
- apache
- applesilicon
- aws
- blackwidow
- cakephp
- community
- composer
- conferences
- copilot
- data-storage
- day-job
- devops
- docker
- fpv
- general
- github
- givecamp
- homestead
- jigsaw
- joindin
- keyboard
- laravel
- learning
- linux
- maker
- mamp
- mentoring
- music
- nonprofit
- opensource
- packages
- php
- phparch
- projects
- provisioning
- python
- razer
- rust
- s3
- security
- slimphp
- speaking
- static-sites
- storage
- testing
- tiny-whoop
- today-i-learned
- training
- ubuntu
- vagrant
- version-control
- windows
- writing
- wsl
- wsl2
- zend-zray