PHP Annotated – September 2023
Welcome to the September 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.0.30, PHP 8.1.22, and PHP 8.2.9 have been released
phar_dir_read()
).If you’re still using PHP 7.*, Remi’s Repository has updates with backported security fixes.
- PHP 8.3.0RC2 has been released
- RFC Vote
Brent Roose has launched a project for community voting on RFCs.
While official RFC voting is limited to internal developers, RFC Vote provides a voice for everyone. This will not have a direct impact on the official PHP RFC results, but it may serve as a valuable resource for those involved in the decision-making process.
The project, brendt/rfc-vote, is open-source, and Brent is streaming the whole process of developing it at PHP Annotated on YouTube.
- WordPress 6.3 “Lionel” is out
It brings significant performance improvements, among other things.
- PhpStorm 2023.2 Is Available and the PhpStorm 2023.3 roadmap has been released
- The PHP Foundation is hiring PHP core developers
If you have experience contributing to PHP core or developing extensions and you would like to do paid open-source work, this might be a great opportunity for you.The application form is open until September 30.
- CakePHP 5 is out
This release brings improved type hints throughout the framework, an upgrade to PHPUnit 10.x, new enum type mapping support in the ORM, support for PSR17 HTTP factories, and more.
- Concerns over the European Union’s Cyber Resilience Act (CRA)
WordPress, Drupal, Joomla!, and TYPO3 projects published an open letter to the EU legislators with critiques and recommendations on how to improve the CRA for a better future of open source in Europe.Individuals, SMEs, and institutions will be hampered either by enormous administrative burdens or a chilling effect on their activities (and a potential rush towards the American Tech Giants) for fear of risking penalties under the CRA.
The best summary of the EU-CRA can be found in this blog post by the Apache Software Foundation.
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:
- 📣RFC: A new JIT implementation based on IR Framework
Dmitry Stogov proposes a new JIT implementation that is based on a separately developed IR Framework.
If accepted, the average PHP user may not notice any significant performance gains. With the new JIT in its current state, CPU-bound applications such as PHP-Parser and AMPHP will experience a slight speed boost. Further optimizations will provide additional acceleration, but the increase won’t be dramatic.
The primary advantage of the new engine is its simplicity of use. It has been developed as a component separate from PHP, which means that the IR project can be utilized outside of PHP. This could potentially help reduce the "bus-factor" associated with the JIT implementation.
- 📣RFC: DOM HTML5 parsing and serialization
Niels Dossche proposes to add two new classes to the DOM extension:
andDOM\HTMLDocument
.DOM\XMLDocument
The
HTMLDocument
class will add support for spec-compliant HTML5 document parsing and serializing. The
class will serve as a modern alternative toXMLDocument
, which is retained for compatibility. These new classes will also provide a more misuse-resistant API for loading documents.\DOMDocument
Existing DOM classes in the global namespace will get an alias in the new DOM namespace, so the new implementation will be default.
- Who Is Behind PHP by Christoph Rumpel.
In this blog post, Christoph clarifies all sorts of non-obvious points of the PHP development process, including who gets to vote, what karma is karma, and how to become a contributor to PHP.
Tools
- theodo-group/LLPhant – A comprehensive PHP generative AI framework that uses OpenAI GPT 4, inspired by Langchain and LLamaIndex.
It allows you to automatically define your function in one line and execute the function when OpenAI says so in the response.
Super happy that I've added a crazy simple way to make @OpenAI calls any function from your codebase with #LLPhant in #PHP 🐘
This is one of my favorite feature from #GPT4 because it opens a vast amount of possibilities.
If you don't know it, OpenAI has refined its model to… pic.twitter.com/hwH25mJap2— Maxime Thoonsen 🌳 (@maxthoon) August 23, 2023
More examples can be found in this blog post: Leverage Generative AI in your PHP E-Commerce website with Qdrant and LLPhant.
You can even make an AutoGPT clone with PHP:
🤩Really happy to announce AutoPHP, the autonomous agent in #PHP !
Here is a video to showcase it with the objective :
"find the name of wives or girfriends from at least 2 players from the 2023 male french football team" pic.twitter.com/AGeHhnrET6— Maxime Thoonsen 🌳 (@maxthoon) September 15, 2023
- emreyarligan/enum-concern – A package for effortless enumeration handling with Laravel collections.
- hyperf/hyperf – A Swoole-based coroutine framework that focuses on hyperspeed and flexibility.
- loupe-php/loupe – A full-text search engine based on only PHP and SQLite, with tokenization, stemming, typo tolerance, filters, and geo support.
- TomasVotruba/lines – A CLI tool that runs anywhere for quickly measuring the size of PHP projects.
- Chemaclass/bashunit – A minimalistic testing library for bash scripts.
- laminas/laminas-text – Ever wanted a cool ASCII text banner?
$figlet = new Laminas\Text\Figlet\Figlet(); echo $figlet->render('PHP Rocks');
- espocrm/espocrm – A mature and open-source CRM built with PHP.
- Can I PHP? — Quickly check which PHP version introduced a given feature.
Symfony
- 6x faster Docker builds for Symfony and API Platform projects by Kévin Dunglas.
- A new way to squash your Doctrine migrations by Grégoire Pineau.
- Symfony vs Flask vs Spring Boot – Usability and Speed of Codingby Sergii Demianchuk.
- Unlock the Power of DTO in Symfony with This One Library! by Jakub Skowron.
- Symfony 7.0 Type Declarations by Wouter de Jong.
- zenstruck/messenger-monitor-bundle – A UI for monitoring your Messenger workers, transports, schedules, and messages.
- ❗CVE-2023-41336: symfony/ux-autocomplete Prevent injection of invalid entity ids for "autocomplete" fields by Ryan Weaver.
- ❗Twig 2 end of life by Fabien Potencier.
Laravel
- Filament 3.0.0 has been released.
- Experiment: How I replaced Symfony DI with Laravel Container in ECS and Removing Service from Laravel Container is not that Easy by Tomas Votruba.
- How to create a custom filesystem adapter in Laravel by Benjamin Crozat.
- Making the case for Laravel as a Next.js alternative by Andrew Schmelyun.
- The State of Laravel survey results.
- NativePHP Tutorial: Building a Mac MenuBar application by Shane D Rosenthal.
- Using Hashid With Laravel (instead of UUID) by Julien Bourdeau.
- Unorthodox Eloquent by Muhammed Sari.
- thedevdojo/genesis – An application starter kit built with Laravel Folio and Volt.
- WendellAdriel/laravel-lift – Eloquent models with PHP attributes.
- Is Laravel the happiest developer community on the planet by Klint Finley – Posted on GitHub’s ReadME project blog.
Misc
- Building Resilient Code: Harnessing the Power of Value Objects by Paul Conroy.
- How to Remove Transitional Dependencies You don’t Need by Tomas Votruba (Rector).
- Understanding Serialisation in PHP by Ryan Chandler.
- Concealed Code by Derick Rethans – TIL: The order in which you add extensions in php.ini really matters; specifically, Xdebug should be added after Opcache.
- Security considerations when parsing user-provided INI strings and files by Ayesh Karunaratne.
- PHP Fibers: A practical example by Keith Maika.
- The PHP stat cache explained by Benjamin Eberlei (Tideways, PHP Foundation).
- Software Architectural Patterns by Roman Dykyi – A concise explanation of DIP, SOLID, GRASP, CQR, CQRS, hexagonal architecture, layered architecture, modular monoliths, microservices, event-driven architecture, and DDD.
- Infrastructure management for several high-traffic PHP applications by Mohamed Said.
- Using SQLite as Vector Store in PHP by Andreas Gohr.
- 📺 When to use Traits, Interfaces, and Abstract Classes in PHP by Andrew Schmelyun.
- 📺 Debugging FFI and PHP by Derick Rethans (Xdebug, PHP Foundation).
- PHP 8: Attributes by Brent Roose (JetBrains).
- An Internet of PHP by Timo Tijhof (Wikimedia).
- Upgrading PHP by Rasmus Schultz – Guidelines for upgrading the minimum PHP version requirements of packages and projects.
Fun
- PHPUnit output in the style of a disk defragmenter:
Update: the somebody is me, I'm doing it.
My prototype is mostly working! Now to hook into the PHPUnit event system. https://t.co/0TFWShakuI pic.twitter.com/nU0LBdHZbj
— Ben Holmen (@benholmen) September 18, 2023
- phpgl/flappyphpant – A simple Flappy Bird-like game written in PHP and built on PHP-GLFW and the VISU framework.
- A love snippet from Frédéric Bouchery:
<?php for ($y = 15; $y >= -15; $y--) { for ($x = -30; $x < 30; $x++) { echo ( pow(pow($x*0.05, 2)+pow($y*0.1, 2)-1, 3)- pow($x*0.05, 2)*pow(($y*0.1), 3) <= 0 ) ? 'LovePHP!'[($x - $y) % 8]:' '; } echo "\n"; }
P!LovePHP vePHP!Lov ePHP!LovePHP!Love !LovePHP!LovePHP! vePHP!LovePHP!LovePHP!LovePHP!LovePHP!Lov vePHP!LovePHP!LovePHP!LovePHP!LovePHP!LoveP vePHP!LovePHP!LovePHP!LovePHP!LovePHP!LovePHP ePHP!LovePHP!LovePHP!LovePHP!LovePHP!LovePHP! PHP!LovePHP!LovePHP!LovePHP!LovePHP!LovePHP!L HP!LovePHP!LovePHP!LovePHP!LovePHP!LovePHP!Lo P!LovePHP!LovePHP!LovePHP!LovePHP!LovePHP!Lov !LovePHP!LovePHP!LovePHP!LovePHP!LovePHP!Love ovePHP!LovePHP!LovePHP!LovePHP!LovePHP!Love ePHP!LovePHP!LovePHP!LovePHP!LovePHP!Love PHP!LovePHP!LovePHP!LovePHP!LovePHP!LoveP !LovePHP!LovePHP!LovePHP!LovePHP!Love ovePHP!LovePHP!LovePHP!LovePHP!Love ePHP!LovePHP!LovePHP!LovePHP!Love P!LovePHP!LovePHP!LovePHP!Lov ovePHP!LovePHP!LovePHP!Lo PHP!LovePHP!LovePHP!L LovePHP!LovePHP PHP!LoveP Lov v
Conferences
In-person events are in full swing! Check out these upcoming PHP gigs worth visiting and applying to present at:
- Longhorn PHP – Austin, TX, USA, November 2–4, 2023.
- Laracon AU – Sydney, Australia, November 16–17, 2023.
- PHPCon Poland – Zawiercie, Poland, November 17–18, 2023.
- SymfonyCon – Brussels, Belgium, December 7–8, 2023.
- Laracon EU – Amsterdam, The Netherlands, Feb 5-6, 2024. CFP 🆕
- PHP UK – London, UK, February 15–16, 2024. CFP
- PHP[TEK] 2024 – Chicago, IL, USA, April 23–25, 2024. CFP 🆕
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.