My PHP enum style guide
A personal style guide for writing enums in PHP, covering naming conventions, backed enums, and simple methods.
Brent — Curator of Stitcher’s Community Feed, a community-driven, hand-curated content aggregator highlighting thoughtful, high-quality writing from across the web. The feed focuses on software engineering, open source, web development, infrastructure, and the human side of building technology. Readers can browse recent picks, follow via RSS, or contribute their own suggestions.
239 articles from this blog
A personal style guide for writing enums in PHP, covering naming conventions, backed enums, and simple methods.
Attribute usage in top-1000 PHP packages Written on 2022-05-20 Attributes were originally introduced in PHP 8.0 two years ago. Yesterday, I came acros
Explains the purpose of PHP deprecation notices, how to handle them, and why they are beneficial for long-term code health.
A deep dive into the Strategy Pattern in programming, exploring its implementation, extensibility, and potential pitfalls with practical code examples.
An argument for implementing generics in PHP via static analysis, discussing the technical challenges and required mindset shift for developers.
A developer announces leaving Spatie to join JetBrains' PhpStorm team as a developer advocate, focusing on PHP community and content.
Explores the technical and architectural reasons why PHP does not yet support generics, examining three potential implementation methods and their challenges.
An in-depth look at generics in PHP, covering their use beyond collections and how static analyzers implement them via docblocks.
An introduction to generics in PHP, explaining what they are, why PHP lacks them, and their potential future in the language.
A look at PHP's modern features, active development, and thriving community in 2021, debunking the myth that the language is dead.
Practical strategies for updating PHP projects when external dependencies don't yet support the latest PHP version, including testing, contributing, and finding alternatives.
A reflection on API design and developer responsibility, using a historical Windows Kernel function as a case study.
A developer's critique of Twitter's algorithmic Home feed, explaining why it failed to show relevant tech content and seeking alternatives.
An overview of modern PHP features in 2022, including PHP 8.1's enums, readonly properties, and the growing static analysis ecosystem.
Analysis of PHP version usage statistics from January 2022, showing adoption rates for PHP 8.1, 8.0, and older versions.
A step-by-step guide to upgrading PHP to version 8.1 on macOS using the Homebrew package manager, including handling extensions and Laravel Valet.
Overview of new features in PHP 8.1, including enums, fibers, performance improvements, and new syntax like readonly properties.
Real-world performance benchmarks comparing PHP 8.1 to PHP 8.0, showing a 5-8% speed improvement.
A concise overview of PHP 8.1's new features, including enums, readonly properties, fibers, and array unpacking, demonstrated through code examples.
A video and transcript explaining how to implement and use generics in PHP via docblocks, with support from PHPStan, Psalm, and PhpStorm.