PHP Annotated Monthly – January 2019
Greetings everyone,
Please welcome our first PHP Annotated Monthly of this year, with all the latest news and notable materials coming up from the world of PHP. Read all about the PHP updates, PHPStan, Psalm, Deployer, and other releases. There is news from PHP Internals, Laravel, Yii, and Symfony, some async PHP stuff, useful tools, and a whole lot more!
⚡️ News & Releases
- Nikita Popov Joined PhpStorm Team
- PHP 5.6.40 — Security update. Although the 5.6 branch is already officially unsupported, if major critical security issues are found, the PHP team may release another update.
- PHP 7.3.1
- PHP 7.2.14
- PHP 7.1.26
🐘 PHP Internals
- [RFC] Typed Properties 2.0 — Nikita announced that the feature is ready and merged now. It is recommended to try it out sooner rather than later, so any problems can be revealed in the early stages. Rasmus Schultz with his blog post is considering possible design flaws when using typed properties.
The fun thing is that with typed properties in PHP 7.4 you can emulate typed variables using classes and a reference:<?php declare(strict_types = 1); $a = new class { public ?string $v; }; $typedVariable = &$a->v; $typedVariable = 'foo'; // Ok $typedVariable = 123; // TypeError
There is already a library which implements this idea azjezz/typed.
- [PHP] FFI — Despite some concerns about security and stability, the voting for FFI has passed successfully, and the proposal is now accepted. It means that the feature will be delivered with the next major release.
🛠 Tools
- vimeo/psalm — Powerful static analyzer from Vimeo. In version 3, you can find Language Server support and the possibility to set up an initial state (baseline). Read more in the announcement.
- PHPStan 0.11 — See the details for the fresh update of another neat static analysis tool in the release announcement.
- PHP_CodeSniffer 3.4.0
- doctrine/migrations 2.0
- Deployer 6.4.0 — An awesome deployment tool for PHP applications.
- php-censor 1.0.0 — CI server in PHP.
- ankitpokhrel/tus-php v1.0 — A Client and Server for tus.io an open protocol of resumable file uploads. The protocol is used by Vimeo, Cloudflare, and Git LFS.
- Symplify/Statie — A simple Static Site Generator in PHP. Quickstart tutorial.
- mtownsend5512/read-time — The package will help you to show the remaining time for reading some content.
- sunrise-php/http-header-kit — Helpers for setting some useful HTTP headers in PSR-7.
- sebastianbergmann/foal — This tool can help you find PHP lines in code, that will be removed by OpCache bytecode optimizer. Also, read theblog post on why Xdebug sometimes doesn’t stop on breakpoints.
- formapro/telegram-bot-php — Simple and neat Telegram bot library.
Symfony
- Security Bug Bounty Program for Symfony
- A week of Symfony #628 (7-13 January 2019)
- 🎥 SymfonyLive London 2018 Videos
Laravel
- RJAPI/api-generator — Laravel API application generator based on OpenAPI spec.
- Laracon Online 2019
- 🎥 Laracon Online 2018 Videos
- 🔈 Laravel Snippet #1 — A new podcast from Taylor Otwell.
- blog.laravel.com — The Laravel blog is now based on writingink/wink and hosted on Laravel’s website instead of Medium.
- An empirical study of performance in Laravel applications
- Handling HTTP requests in Laravel
- Best tips and good practices for Laravel 5.7
- 🎥 Laravel Core Adventures
Yii
🌀 Async PHP
- reactphp/child-process — The event-driven library for executing child processes with ReactPHP now supports Windows. Check out the intro post.
- reactphp/socket — Async plaintext TCP/IP socket server and client connections for ReactPHP. Now with TLS 1.3 support.
- concurrent-php/ext-async — Powerful and actively developed extensions for adding the asynchronous capabilities to PHP. Among other things, it allows transparent replacement of standard blocking functions, like
sleep()
or filesystem functions, with async implementations. - 🎥 Fast Web Scraping With ReactPHP #2: Saving to MySQL
- Example of using Swoole coroutines and establishing communication a-la Golang.
🚨 Security
- Exploit PHP Remotely – WAF Rule & Filter Bypass
- Find bypass disable_functions automatically
- Paragon Initiative security roadmap for year 2019
- guardrailsio/awesome-php-security — Good links selection on security with PHP.
- ollyxar/php-malware-detector — Simple scanner for malware based on a set of regexps.
💡 Misc
- New in PHP 7.4
- Tips to speed up PHPUnit tests
- Tips on how to get Faster Code Coverage — Also, give the extension krakjoe/pcov a try, it can help collect coverage information faster than phpdbg.
- Writing serverless Hello World in PHP on AWS Lambda using serverless.com.
- Sergey Zhuk: How to speedup code reviews
- Nikola Poša: Some naming antipatterns — Also check out tips on naming.
- Marcel Pociot: Semantic versioning explained
- Marcel Pociot: Polishing your code
- John Mackenzie: My Modern PHP Development Setup
- phpapprentice.com — An online book for learning the basics of PHP.
Thanks for reading!
Your JetBrains PhpStorm Team
The Drive to Develop
Prev post Nikita Popov joins PhpStorm TeamPhpStorm 2019.1 Early Access Program is now open Next post