PHP Annotated Monthly

PHP Annotated — January 2022

PHP Annotated Monthly

Greetings everyone,
Catch up on the latest from the PHP world with our specially curated news, articles, tools, and videos.

News

  • The PHP Foundation Update, January 2022
    The PHP Foundation started its work at the end of November as a non-profit organization whose mission is to ensure the long life and prosperity of the PHP language.

    We already have the first results. Applications for sponsorship from core developers have been received and are being processed.

    The foundation team will be publishing monthly updates so you can subscribe to our Twitter @thephpf to stay up to date with the news.

    To learn more about The PHP Foundation check out the Voices of the ElePHPant Ep 366 podcast with Joe Watkins, Sara Golemon, and Sebastian Bergmann.

  • PHP 8.0.15, PHP 8.1.2, PHP 7.4.27
    Bug fixes for current PHP branches have been released. In the case of PHP 7.4 this is the last regular release, and from now on only security updates will be issued for the PHP 7.4 branch.
  • PHP version stats: January, 2022
    Here are some fresh stats for PHP versions according to packagist.org. Version 8.1 only came out two months ago, but it’s already gained a 9.1% share. However, there’s still a lot of PHP 7.4 (44%).
  • [RFC] User Defined Operator Overloads
    A proposal to add operator overloading to PHP failed to pass the vote. You can, however, listen to the PHP Internals News podcast with the author Jordan LeDoux to learn the details.
    Jordan also published very thorough instructions on How to make an RFC for PHP.

    In the meantime, operator overloading can already be used in PHP thanks to lisachenko/z-engine and FFI. For an example of the implementation of operators for matrices, see: lisachenko/native-php-matrix.

Releases

  • thephpleague/flysystem 3.0.0 – A major update of the popular library for working with file systems. Check out the blog post with all the details.
  • Cycle 2.0 – The second major release of Cycle – a DataMapper and ORM for PHP that can be used in both traditional and daemonized PHP applications.
  • ankitpokhrel/tus-php 1.0 – Server and client implementation of the tus.io, an open protocol for renewable file uploads. The protocol is used, for example, in Vimeo and Cloudflare.
  • Infection PHP 0.26.0 – An update to the PHP mutation testing framework. The new version adds HTML reports, mutation of only changed strings, and more.
  • Doctrine ORM 2.11 – The update brings support for enumerations, virtual columns, read-only properties, nested attributes, and more.
  • Roave/BetterReflection 5.0 – Improved Reflection API: you can get information without loading classes, from closures, and much more. The new version adds support for PHP 8.1 and has better performance.

Tools

  • viewi/viewi – A powerful tool for creating reactive applications using only PHP and HTML. In essence, it’s a server-side template engine + frontend framework. But the zest is that you describe all components and logic in PHP and then the tool transpiles them into native JS.

    The project website viewi.net details the mechanism of operation and has code examples. You can also follow a step-by-step tutorial and check out the Symfony integration.

  • Roach PHP – A tool for web scraping inspired by the popular Python library, Scrapy.
  • symfony/html-sanitizer – A new component to clean up untrusted HTML and protect against XSS. It could be a good alternative to HTML Purifier.
  • EventSaucePHP/ObjectHydrator – A library for hydrating raw data (like JSON) into objects.
  • ajthinking/archetype – A simple interface for modifying PHP files/classes.
  • framjet/php-enum-bitmask – Using enumerations from PHP 8.1 as bitmasks.
  • beyondcode/httpdump – Laravel application for debugging incoming HTTP requests (debugging web hooks, etc.). Creates random URLs and dumps all the requests to them in a nice way. You can see it in action at httpdump.app.
  • spatie/ignition – This library for displaying debugging error pages, familiar to many from Laravel, but now framework-independent, has been updated and can be used in any application. See the overview blog post.
  • chevere/xr – A debug server on ReactPHP, inspired by the spatie/ray, but instead of a desktop application it’s just a CLI command to run. Video demo.
  • JustSteveKing/php-sdk, Sammyjo20/Saloon – Two similar libraries with the same idea: simplify SDK creation for services or organize access to different APIs in the common style.
  • AliSaleem27/wordle-cl – A CLI version of the popular five-letter word guessing game Wordle.
  • staabm/phpstan-dba – An extension for PHPStan that checks the validity of SQL queries in PDO, MySQLi, and Doctrine/DBAL. Demo.
  • flow-php/etl – An implementation of the Extract Transform Load pattern to use in your PHP application. Check out the thread from the author to learn more.

Symfony

Laravel

Yii

Misc

Community


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 me a tweet.

Subscribe to PHP Annotated

Your JetBrains PhpStorm team
The Drive to Develop


Discover more