Fresh Resources for Web Designers and Developers (March 2022)

PHP, despite being dubbed as a “dead” language, keeps improving over the years. With the latest release of PHP 8.1, a lot of new features have been added to the language that make it more powerful to build any type of application with.

How to Upgrade PHP to Latest Version

How to Upgrade PHP to Latest Version

PHP7.4 has been released with a handful of new features — like the arrow function array_map(fn (Foo $foo)… Read more

In this round of the series, we are going to highlight some resources on the PHP ecosystem. You’ll find a library to detect client devices, create CLI, make compiling Phar easier, combine WordPress and Laravel, a server for PHP to boost performance, and a few references to help you improve your PHP skills. So, let’s jump in to see the full list.

Fresh Resources for Web Designers and Developers (February 2022)

Fresh Resources for Web Designers and Developers (February 2022)

One of the benefits of being a web developer is that this field is inundated with free resources,… Read more

Device Detector

A PHP library to detect the client device. With this library, you can check if it’s a desktop, mobile device, a bot, or even a TV or feature phone. It’s a really handy library to get to know your website’s users.

Device Detector

PHP Box

Phar is a PHP mechanism that allows you to ship your code in just a single file; encapsulating and minimising conflict with other PHP code. Box provides the build setup that makes the process to compile it to Phar much easier.

PHP Box

Setup PHP

This tool gives you a cross-platform interface to spin-up the PHP environment you need to run automated tests of your PHP applications in Github Actions.

You can spin up different PHP versions, from 5.3 up to the latest in development. It also provides an easy way to install PHP extensions like Redis, Swoole, as well as some popular tools like WP-CLI, Psalm, and PHPstan.

Setup PHP

API Platform

A framework designed to build an API-based application in. It’s compatible with many API specifications including GraphQL, JSON-LD, and HAL.

It’s also equipped with the tools for productivity such as an automatic documentation generator with Swagger or OpenAPI, a scaffold to build PWA with a modern JavaScript framework, and a developer-friendly testing tool.

API Platform

CommonMark

A PHP library to transform Markdown syntax into HTML. It fully supports the CommonMark specification as well as the Github Markdown flavors which include additional formatting for tables, task list, and strikethrough.

CommonMark

Lighthouse PHP

A framework to serve GraphQL on Laravel application. This framework provides all the necessary abstraction that allows you to build a GraphQL server and its query with the same convenience provided in Laravel.

Lighthouse PHP

Acorn

Acorn is a PHP library that acts as a bridge between WordPress and Laravel. It allows you to use Laravel components as well as the artisan command inside WordPress, which gives WordPress a more modern development experience. Acorn can be installed through Composer or as a WordPress mu-plugins.

Acorn

Symfony Console

A library designed to build CLI applications with PHP more intutitive. It provides the abstraction that allows you to grab the user input, set options and return the output.

You can also easily style the output such as styling for error or success message, changing the color, and more.

Symfony Console

Collision

Collision makes error reporting on CLI applications look better. It shows the error with a better layout, color, and sections that make it more readable. It’s compatible with many popular frameworks out of the box including Laravel, Symfony, and PHPUnit. Another handy library to build CLI with PHP.

Collision

RoadRunner

RoadRunner is a PHP application server written in Go. It operates as a load balancer and process manager, only it runs much faster than a traditional PHP server setup.

It also provides a number of official plugins for integrating with tools you’d typically need for your application such as Redis, GZIP, Websockets, and many more.

RoadRunner

MailCow

Using MailCow, you can spin up and operate your own mail server. It also comes with UI that allows you to administer domain, emails, spam, and a lot more.

MailCow

Deployer

Built purely with PHP, Deployer is a tool that streamlines the deployment process. It can automatically configure the server including setting up a firewall, installing PHP, MySQL, SSL, and allows you to roll back to the previous releases quickly.

It also has pre-built deployment configuration that makes integrating with popular CMS or framework a lot easier.

Deployer

Livewire

Livewire is a full-stack framework that allows you to develop dynamic UI applications without the overhead complexity. You can write the UI and the business logic purely with PHP. Livewire will smartly render the content on the front end. No complex build steps.

Livewire

Wink

Wink is a simple blogging platform built with Laravel. It’s easy to install with Composer and just a couple of lines of command to get it fully set up. You can integrate it with S3 to store the blog images, or use Unsplash.

Wink is unopinionated on how you’d display content on your site. You can use Blade or any templating engine.

Wink

What’s new in PHP 8.1

This article outlines a lot of cool stuff added in PHP 8.1 A few things that got me excited are – Enum, read only properties, and intersection types. All these new improvements make PHP a better programming language.

What's new in PHP 8.1

Getting Ready for PHP 8.1

Not a fan of reading? Watch this video by Laravel. This video also some features of PHP8.1 that I’m excited about. There are also other great PHP 8.1 videos such as this one from Laracasts that walk you through more real examples to utilize these new features. And also the one from Beyond Code which dives in more about Enum.

Getting Ready for PHP 8.1

PHP Benchmark

Aside from introducing a number of cool new features, PHP 8.1 also brings better performance than it’s predecessors. According to this report, its average performance increase on WordPress application is about 47% faster compared to PHP8.0.

This benchmarks over 14 PHP applications including Drupal, Joomla, Symfony, and many more.

PHP Benchmark

PHP the Right Way

The document layouts a long list of PHP fundamentals from the setting up PHP, Dependency Management, Coding Styles and Practices, Database, Templating, and a lot more.

This is one document that I always visit once in a while. So whether you’re just getting started with PHP or an experienced developer, you should have it bookmarked.

PHP the Right Way

Clean Code PHP

This document outlines some suggestions to write clean PHP code. You will learn how to name variables properly and how to structure Clean PHP code that makes it easier to read and maintain.

Clean Code PHP

PHP Design Patterns

It’s time to dig deeper with Design Patterns in PHP. Design Pattern is a set of well-tested patterns to solve problems in programming. It gives a structure that solves the problem while also making the code flexible, reusable, and maintainable.

PHP Design Patterns