PHP Digest No. 145 (November 26 - December 10, 2018)
Fresh selection with links to news and materials. In the release: PHP 7.3.0, Symfony 4.2, Composer 1.8.0 and other releases, the end of support for PHP 5.6 and PHP 7.0, the latest offers from PHP Internals, a portion of useful tools, video recordings of reports and much more.
Enjoy reading!
Short audio version of the digest in the podcast Five Minute PHP Issue No. 44
News and Releases
- PHP 7.3.0 - The long-awaited major PHP release is delivered on schedule. Thanks to all contributors and release managers for the work done! The new version of the interpreter has a number of improvements:
• Improved Heredoc and Nowdoc RFC syntax
• Functionsjson_encode()
andjson_decode()
will throw an exception in case of error and the corresponding RFC flag
• Ability to use a comma after the last argument of the RFC function
• Added functionsarray_key_first()
andarray_key_last()
RFC
• New function hrtime (), which returns high precision time and does not depend on the system time PR
• A function has been addedis_countable()
to check for RFC enumeration
• Using links in thelist()
RFC
• Significant improvement in the garbage collector improves the work with a large number of PR objects
• The regular expression engine has been updated to PCRE2 RFC
A complete list of changes in the UPGRADING document .
I highly recommend looking at the migration guide from PHP 7.2.x to PHP 7.3.x , thanks lex111 for the translation. - The world also saw updates to PHP 5.6.39 , PHP 7.0.33 , PHP 7.1.25 and PHP 7.2.13 . And these are the latest releases of branches 5.6 and 7.0 , and PHP 7.1 goes into security support mode . Thus, at present only branches of PHP 7.2 and PHP 7.3 remain relevant.
- PHP on AWS Lambda - At the AWS re: Invent 2018 conference, among other things, support for custom runtimes for AWS Lambda was announced. PHP out of the box is supported through stackery / php-lambda-layer , but you can also make your own implementation. This means that instead of crutches in the form of launching through Nodejs or Go, now you can write full-fledged lambdas in pure PHP.
- Composer 1.8.0
- CakePHP 3.7.0
- PHPUnit 7.5.0
PHP internals
- [RFC] FFI - Foreign Function Interface - The concept from Dmitry Stogov is now designed as a full-fledged offer. The implementation will make it possible to use functions and data structures from C-modules directly. As an example, look at PHP binding for TensorFlow . True, great opportunities also open up wide scope for potential problems and vulnerabilities, therefore, it is proposed by default to allow FFI only in CLI scripts and preloaded files.
- [RFC] Covariant Returns and Contravariant Parameters - It is proposed to make the types more consistent, in particular, to allow "narrow" the type of the return value in the heirs, and "expand" the type of parameters.Hidden text
interface X { function m(Y $z): X; } interface Y extends X { // Тут можно будет сужать тип function m(X $z): Y; } interface Concatable { function concat(Iterator $input); } class Collection implements Concatable { // А тут можно будет расширять тип function concat(iterable $input) {/* . . . */} }
Instruments
- spatie / period - The library allows you to make complex comparisons of dates, for example, to find intersections of periods, differences, spaces, extreme borders and more.
- scrivo / highlight.php - The highlight.js port , which allows syntax highlighting on the server. Integration with markdown via spatie / commonmark-highlighter .
- 3v4l.org/live - Interactive online PHP shell (REPL).
- j6s / phparch - A library for architectural testing of PHP projects, inspired by archlint (C #) and archunit (Java). Development in progress.
- halaxa / json-machine - Stream reading (decoding) JSON. For streaming encoding, violet-php / streaming-json-encoder is suitable .
- DivineOmega / password_exposed - Checks using haveibeenpwned.com The API has been compromised.
- skollro / alexa-php-sdk - SDK for developing skills for Amazon Alexa in PHP.
- pyrech / composer-changelogs - Conveniently displays information about updated packages after execution
composer update
. - RubixML / RubixML - A library for using machine learning in PHP. Alternative php-ai / php-ml .
Learning Materials
Symfony
- Symfony 4.2.0 - A list of the most interesting changes here .
- Symfony Week # 623 (December 3-9, 2018)
- Symfony Week # 622 (November 26 - December 2, 2018)
- EasyCorp / EasyAdminBundle 2.0.0
- Best PhpStorm Plugins for Symfony Development
- How to manage configuration in Symfony without using the Bundle, Extension, and Configuration classes.
- Five Minute PHP Issue # 43 - Reporting with SymfonyCon: Using Symfony Forms with Rich Domain Models.
Yii
- cebe / yii2-openapi - REST API generator for Yii2 based on the OpenAPI 3.0 specification.
Laravel
- beyondcode / laravel-websockets - WebSocket server for Laravel based on Ratchet . Allows you to implement all kinds of real-time applications, without the need to use Pusher. There is a demo application . More details in the announcement of the tool , documentation or briefly in the video review .
- qcod / laravel-gamify - A package for adding gamification elements in the form of points and badges to the Laravel application. There is also a standalone gamification engine based on Symfony sveneisenschmidt / yay .
- spatie / laravel-collection-macros - A set of useful macros for Laravel collections.
- Back up your Laravel database to Google Drive
- Quick performance tips in Laravel
Async php
- friends-of-reactphp / mysql - Asynchronous client for MySQL on ReactPHP. A post in support of the release on added lazy compounds .
- walkor / shadowsocks-php - Another SOCKS5 proxy, a clone of the popular shadowsocks based on the Workerman asynchronous engine .
- Coroutines in PHP on Swoole 4.x vs Golang coroutines
CMS
- WordPress 5.0 “Bebo” - The release includes a new Guttenberg editor and a new Twenty Nineteen theme. The old editor is available in the Classic Editor plugin and will be supported until the end of 2021.
- WordPress is finally updating PHP! In April, the minimum version will be increased to 5.6, and by the end of 2019 - to PHP 7 (probably 7.2).
- Magento Tech Digest # 38: Nov 26 - Dec 03, 2018
- Magento 2.3.0 GA Platform Release
- Magento Meetup Kharkiv No. 4 - video reports
- Warehouse Management System Using CQRS and Event Sourcing (Magento)
Security
- ajinabraham / CMSScan - Vulnerability scanner in popular CMS Wordpress, Drupal, Joomla, vBulletin. Wrap over wpscan , droopescan , vbscan , joomscan .
- PHP Security Advent Calendar 2018 - Interesting information about vulnerabilities in WordPress plugins is published every day throughout December.
- Vulnerabilities in PHP and PHPMailer
- Slice Of PIE # 01 - Answers to security questions from ParagonIE.
- A couple of vulnerabilities in Symfony: CVE-2018-19789 (disclosing the path of downloaded files), CVE-2018-19790 (redirect vulnerability in Security \ Http)
- NPM Dependency Hell: Comparison with Symfony, Laravel and API Platform - Analysis of dependency maintainers of popular PHP frameworks after malicious code was detected in the popular event-stream JS library .
- Configuring code generation in PhpStorm
- 14 bad tips on how to write poorly read and unsupported PHP code
- We migrate to password_verify and update the password hashes in the existing database.
- create exceptions on the fly - Using anonymous classes to
- How to taxi with legacy code when the project was needed yesterday
- Click-fame, or how to excite a robot and ... others
Audio and video
- Five Minute PHP Issue # 44 - The audio version of this release of the PHP Digest.
- Five Minute PHP Release # 42 - MySQL 8 and caching_sha2_password
- PHP Podcast Roundtable # 81 - About PHP-FIG 3.0, PSR-18 and more.
Entertaining
- MagicalTux / goro - An attempt to implement PHP on Go.
Thanks for attention!
If you notice a mistake or inaccuracy - please inform me in PM .
Questions and suggestions write to mail or twitter .
More news and comments on the PHP Digest telegram channel .
Send link
Search links for all digests
← Previous release: PHP Digest No. 144