PHP Annotated – October 2023

PHP Annotated Monthly

Welcome to the October edition of PHP Annotated! We’ll recap the most interesting developments in the PHP community over the past month, featuring handpicked news, articles, tools, and videos.

Highlights

  • PHP 8.3.0 RC5 has been released

    Another release candidate has been delivered according to schedule. The sixth RC is expected on November 9, and it’ll be the last one before the final release of PHP 8.3.

    For a detailed list of what’s coming in PHP 8.3, see php.watch or stitcher.io.

    Here are some other resources about the upcoming version that you may want to check out:

  • The PHP 8.1.25 and PHP 8.2.12 bug-fix releases are now available
  • What was that final noise about after all?
    Another minor stir in the PHP community was caused by the release of the stevebauman/unfinalize package. It goes through all library classes in the `vendor` directory and removes the final keyword from all classes and methods.

    The motivation for Unfinalize is that some developers want to be able to extend classes from vendor packages. But the maintainers of the packages mark classes as final for good reasons: They want to keep some classes or methods internal and be able to modify them without breaking users’ code.

    The topic is not new in the CS world and is known as the fragile base class problem.

    In some programming languages, Kotlin, for example, classes are final by default 😱. In others, modifiers are just conventions, but if you don’t respect them, updating your dependencies might break your application.

    And this is precisely where the #[Override] attribute from PHP 8.3 will help! If you, for some reason, need to remove final from a class and then extend it, in PHP 8.3, you’ll be able to mark your methods in your child class with #[Override]. In this case, at least, if the base class methods change, you’ll be notified.

    Here are some other pieces from the community on the topic:

PHP Core

Most of the Core news is covered in detail in the PHP Core Roundup series from the PHP Foundation, so we’ll only make a few brief mentions:

Tools

  • dunglas/frankenphp – A modern PHP application server with everything you need: automatic HTTPS, HTTP/3, 103 Early Hints, Zstandard, and worker mode for PHP. It’s built on top of Caddy and offers the simplest configuration process.
  • utopia-php/framework – A fast and light micro PHP framework that is easy to learn. Maintained by the Appwrite team.
  • saloonphp/saloon 3.0.0 – A package for building beautiful API integrations and SDKs.
  • phpro/soap-client 3.0.0 – If you ever need to deal with SOAP, don’t use unmaintained PHP-extensions. Instead, try this general-purpose SOAP client for PHP. It may become your new go-to option.
  • flow-php/flow – Flow PHP is a strongly typed data processing framework.
  • benholmen/defrag – This package generates 90’s defragmentation tools style output for your PHPUnit test suite.
  • flavioheleno/watchr – A command-line utility and GitHub Action that checks for the expiration dates of domain names and TLS certificates.
  • ad-aures/castopod – An open-source hosting platform built with CodeIgniter and made for podcasters who want to engage and interact with their audiences.

PhpStorm

Symfony

Laravel

Misc

Fun

  • 📺 PHP is 4x faster than JavaScript! by Nuno Maduro.
  • php.net/robots.txt has Asimov’s laws of robotics in it 🤖:
  • jeremeamia/mu – This "real" 🌚 micro-framework fits in just three lines of code (3-LOC).
    (new µ)->get('/hello/(?<name>\w+)', function ($app, $params) {
        echo "<p>Hello, {$params['name']}!</p>";
    })
    ->run();
    

Conferences

Check out these upcoming PHP gigs worth visiting and applying to present at:

If you’re wondering when the next PHP meetup near you is happening, Tomas Votruba has got you covered with his lovely friendsofphp.org meetup aggregator. There is also a calendar on php.net – Events: November 2023.

That’s all for today. Thanks for reading!

If you have any interesting or useful links to share via PHP Annotated, please leave a comment on this post or send us a tweet.

Subscribe to PHP Annotated


Roman Pronskiy

Developer Advocate at the @PhpStorm team, Operation Manager at @The PHP Foundation.

Twitter | GitHub

image description