Get your next remote job on LaraJobs.
PHP Packages

The best PHP packages to use in 2024

Benjamin Crozat
Published on Feb 1, 2024 0 comments Edit on GitHub
The best PHP packages to use in 2024

Introduction

As a developer in the ever-evolving landscape of PHP, I’ve found myself relying directly or indirectly on a handful of remarkable packages that have significantly improved my coding efficiency and product quality. Let me share some of these gems with you.

The best PHP packages to use

Monolog - Versatile logging for PHP

Monolog’s official website

Monolog is a must-have. It’s incredibly flexible, allowing you to send logs to various outputs like files, sockets, and databases. Its compatibility with the PSR-3 interface makes it a versatile choice for integrating logging into any PHP project. Whether you’re managing error logs or system health data, Monolog will do its job well. It’s such a great package that Laravel has adopted it as their default logging library.

Carbon - Date and time the easy way

Carbon’s official website.

Handling date and time in PHP is something we all have to do. And Carbon makes it even easier. It extends PHP’s DateTime class and offers a plethora of functionalities that simplify date-time management. What I appreciate the most is its human-readable syntax, making time manipulations and calculations a breeze.

Flysystem - File storage made simple

Flysystem’s official website.

Flysystem is a file storage library that abstracts different file system types. Be it local storage or cloud storage like AWS S3, Flysystem provides a unified API to manage them all. This package has saved me from the hassle of handling storage differences when deploying across various environments. This package has also been adopted by Laravel.

Faker - The master of fake data

Faker’s official website.

When it comes to testing or seeding databases with dummy data, Faker is my go-to package. It’s incredibly easy to generate any type of fake data, from names and addresses to lorem ipsum text. It supports multiple languages too, which is handy for localization testing. I personally don’t know what I’d do without it.

league/commonmark - A Markdown parser

league/commonmark’s official website

Need to parse Markdown? The league/commonmark package is a highly-efficient Markdown parser for PHP. It adheres to the CommonMark specification and is extendable, allowing you to add custom features. It’s used by Laravel by default and therefore, the one I use on this blog. league/commonmark’s code is well put together, making it hard to understand and extend. But when you finally get it, it’s extremely powerful.

Wait, there's more!

Be the first to comment!

Get help or share something of value with other readers!

Great deals for enterprise developers
  • Summarize and talk to YouTube videos. Bypass ads, sponsors, chit-chat, and get to the point.
    Try Nobinge →
  • Monitor the health of your apps: downtimes, certificates, broken links, and more.
    20% off the first 3 months using the promo code CROZAT.
    Try Oh Dear for free
  • Keep the customers coming; monitor your Google rankings.
    30% off your first month using the promo code WELCOME30
    Try Wincher for free →
The latest community links
- / -