PHP Annotated – September 2022

Greetings everyone!

Welcome to the September installment of PHP Annotated, where we’ll catch up on the most interesting things that have happened in the PHP world over the last month, including curated news, articles, tools, and videos.

News

PHP 8.2 RC 3 has been released
Another RC has been delivered according to the schedule. The next RC 4 is expected on October 13.

For a detailed list of what’s coming in PHP 8.2, see PHP.Watch or stitcher.io.

Also, check out the flash newsletter, The Road to PHP 8.2.

PHP 7.4.32, PHP 8.0.24, and PHP 8.1.11 have been released
❗️These are security releases of currently supported branches. All users are encouraged to upgrade.

PhpStorm 2022.3 EAP Is Open!
Here’s what you can already try as part of the Early Access Program for PhpStorm:

Beta access to the new UI
Full PHP 8.2 support
Quick-fix previews
And more

PHP Core

Most of the Core news is covered in detail in the PHP Core Roundup series from the PHP Foundation. You can find all the latest developments of the PHP Core team in the sixth episode of the Roundup series, so we’ll only mention it briefly:

? RFC: json_validate #PHP 8.3
In this RFC, Juan Carlos Morales proposes to add a new function called json_validate() that verifies if a string contains a valid JSON:

var_dump(json_validate(‚{ „test“: { „foo“: „bar“ } }‘)); // true

? RFC: Improve unserialize() error handling #PHP 8.3
Tim Düsterhus proposes adding a new UnserializationFailedException, which is thrown when unserialization fails:

try { $result = unserialize($serialized);
var_dump($result);
} catch (UnserializationFailureException $e) {
// unserialization failed
}

? RFC: StreamWrapper Support for glob() #PHP 8.3
Timmy Almroth proposes implementing StreamWrappers support for glob() function.

glob(‚vfs://*.ext‘)

☝️ RFC: Deprecations for PHP 8.3
An umbrella RFC that lists features to be considered for deprecation in PHP 8.3 and removal in PHP 9.

Tools

play.phpsandbox.io – Try Composer packages right in your browser without installing anything. Brilliant!
matthiasnoback/php-ast-inspector – A command-line step-debugger for your Abstract Syntax Tree. How to use it.

kladskull/xEroS – A Bitcoin-like blockchain written in 100% PHP. Good for educational purposes.

sfx101/deck – A desktop tool to spin up Docker-based local dev environments in a single click.

cspray/annotated-container – A dependency injection framework to configure a PSR-11 container with attributes!

phparkitect/arkitect – This tool lets you define architectural constraints for your PHP codebase to run them on CI.

openai-php/client – A client that allows you to interact with OpenAI API.
There is also orhanerday/open-ai if you need an alternative way to access OpenAI’s GPT-3 API.

WordPress/wordpress-wasm – Run WordPress in the browser thanks to WebAssembly magic.

nadrad/h-m-m – Hackers Mind Map – a simple, fast, keyboard-centric terminal-based tool for working with mind maps.

The interesting thing is that it’s just a single PHP file with literally zero dependencies. Neat!

Symfony

Revisiting Lazy-Loading Proxies in PHP by Nicolas Grekas.

Symfony ParamConverter: the best friend you don’t know yet by Thomas Bertrand.

Designing Symfony Validator the TDD way by Mike Zukowsky.

Solving the modern applications dilemma with Symfony UX by Titouan Galopin.

Asserting the output of Symfony console commands by Andreas Möller.

CQRS with Symfony Messenger by Adrian Garay.

StenopePHP/Stenope – A static website-building tool for Symfony. You can create a full-fledged Symfony app, and then deploy it as a static page wherever you want.

phpsword/sword-bundle – Modern WordPress development with Symfony. Instead of being WordPress with extra features like roots/bedrock, Sword is a Symfony framework embedding WordPress. Learn more at What is Sword?

Laravel

?‍? Laracon Online – All the talks from the Laravel community available on YouTube. Among other things, Celeb Porzio presented the future of Livewire, and Taylor Otwell announced Laravel Bootcamp – A brand new learning site from the Laravel team.

? What’s new in Laravel 9.31.0 – Concise video overview from Christoph Rumpel.

Working with OS process in PHP by Steve (King) McDougall.

Drawbacks behind Laravel Facades by Grzegorz Korba.

A Deep Dive Into Laravel Queues by Farhan Hasin Chowdhury.

Sammyjo20/laravel-haystack – Beautifully simple but powerful database-driven job chains.

dietercoopman/mailspfchecker – A package to check if you can send an email through a given mail server on behalf of a given email address. How to use it.

ksassnowski/venture 4.0.0 – A package to create and manage complex async workflows in your Laravel apps.

YorCreative/Laravel-Scrubber – A package to scrub sensitive information that breaks operational security policies from being leaked, accidentally or otherwise, by developers. How to use it.

hotmeteor/receiver – A drop-in webhook handling library for Laravel.

dedoc/scramble – An automatic OpenAPI docs generator for Laravel. No PHPDoc annotations required.

findapr.io – A site to help you find open-source Laravel and PHP projects to contribute to.

Other Frameworks

spiral/framework v3.0.0 – A major update of the framework from the creators of RoadRunner.
It requires PHP 8.1 and brings new filters and validation, job serializers, an error handler, queue and console interceptors, an event dispatcher (PSR-14), injectable enums, a more flexible router, optimized bootloaders, and better performance.

Phalcon PHP Framework reached its major 5.0 release.
Phalcon is a unique framework because it comes as a PHP extension. But according to the roadmap, the team decided to switch to a traditional model, and the next major release is planned to be a PHP package.
For a detailed list of what’s new in 5.0, check out the Upgrade page.

api-platform/api-platform 3.0 – Built on top of Symfony, this mature framework allows creating REST and GraphQL APIs and much more.

Appwrite 1.0 – A major stable release of an open-source backend-as-a-service solution that provides APIs required for building a modern web or mobile application.

Last year Appwrite migrated from nginx+php-fpm to Swoole and experienced a 91% performance boost.

Life is too short to argue which framework is best.

Just use what’s good for you and move on ??

— James Brooks ? (@jbrooksuk) September 20, 2022

Misc

Asymmetric visions by Brent Roose.

Increase code coverage successively by Andreas Heigl.

Testing Randomness of PHP Random Number Functions by Ayesh Karunaratne.

Granular interfaces by Sebastian De Deyne.

Adding the last types to PHP code by Damien Seguy.

The three nothings of PHP by Damien Seguy explaining the difference between null, void, and uninitialized.

Is it a DTO or a Value Object? by Matthias Noback.

Named arguments by Sebastian De Deyne.

Can we consider DateTimeImmutable a primitive type? – Matthias Noback concludes “not”, Andreas Möller goes further in his Enhancing types blog post and suggests it’s a simple type.

How PHP engine builds AST by Anton Sukhachev.

Pholyglot (PHP to PHP+C polyglot transpiler) – A small hobby project transpiler that takes a subset of PHP as input, and outputs polyglot code that can be run in both PHP and C.

Plotting the memory of a PHP process with Gnuplot by Grégoire Paris.

Have you ever wondered what a particular piece of code is doing?

Say hello to TLDR pic.twitter.com/wATh13uJyD

— Marcel Pociot ? (@marcelpociot) September 21, 2022

Video

? PHP For Beginners – If someone asks you “How do I learn PHP in 2022?”, the answer is this course by Jeffrey Way.

? PHP in 1 minute by Brent Roose.

? PHP is breaking my code! by Brent Roose.

? Pest From Scratch with Luke Downing.

Conferences

In-person events are in full swing. Check out these upcoming big PHP gigs worth visiting and applying to CFP:

ForumPHP – Disneyland Paris (France), October 13–14.

International PHP Conference – Munich (Germany), October 24–28.

Longhorn PHP – Austin, TX (US), November 3–5.

SymfonyCon – Disneyland Paris (France), November 17–18.

PHP UK Conference – London (UK), February 14–16, 2023.

And if you are wondering When is the Next PHP Meetup? – Tomas Votruba has got you covered with his lovely friendsofphp.org meetup aggregator.

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

Subscribe to PHP Annotated

Your JetBrains PhpStorm team
The Drive to Develop

Roman Pronskiy

Product marketing manager for @PhpStorm, helped to launch @The PHP Foundation.

Twitter | GitHub

Sergey Panteleev

PHP 8.2 release manager, PHP Documentation maintainer.

Twitter | GitHub

The PhpStorm Blog : The Lightning-Smart IDE for PHP Programming | The JetBrains Blog
Read More

Generated by Feedzy