PHP Digest number 102 - interesting news, materials and tools (February 1 - 12, 2017)
We offer to your attention another selection with links to news and materials. Enjoy reading!
News and Releases
WordPress 4.7.2 - The update is noteworthy in that the critical vulnerability was eliminated without publicity, allowing a remote attacker without authentication to change the content of any page through REST API manipulation. Despite the fact that only WordPress versions 4.7.0 and 4.7.1 are vulnerable , a wave of automated attacks has spread across the Internet. More than 1.5 million resources have already been cracked.
PHPUnit 6.0.0 - This release requires PHP version not lower than 7.0, also for most classes now use namespaces instead of prefixes. Full list of changes here . A small tutorial on migration.
RFC: Make Libsodium a Core Extension - The proposal to include the Libsodium cryptographic library into the core has successfully passed the vote and will be implemented already in PHP 7.2. The community also voted to use the sodium_* prefix syntax instead of the \Sodium\* namespace. However, the firehed / sodium wrapper is already available to use functions through the namespace. It should be noted the author's irony .
RFC: Arrow Functions - The fourth attempt to add short syntax for anonymous functions in PHP.
The first sentence with the construction of the form: $x ~> $x + $y did not pass the vote. An alternative syntax was then proposed: function($x) => $x + $y . Further syntax was submitted for consideration: ^($x) => $x + $y . This time it is suggested to use fn(parameter_list) => expr : ')
By the way, the 3v4l.org tool allows you to test the code on the RFC, for which there is a branch with the implementation, in particular, for Arrow Functions.
Instruments
wapmorgan / Morphos - Morphological solution for PHP for the Russian language: the declension of names and nouns, pluralization, cardinal numbers.
SocialConnect / auth - Library for authentication through social. services (OAuth1 / 2, OpenID, OpenIDConnect). 20+ providers out of the box (VK, FB, G +, Twitter, Steam, etc.).