Chris Gmyr
Developer, entrepreneur, drummer, biker, dog owner, husband, and proud dad. Loves Laravel and coffee

The Latest in PHP: April 2018 Edition

04/13/2018

Every month for the last year at TrianglePHP we've been presenting a segment called "The Latest in PHP" where we look at new features, product and framework releases, and spotlight news articles. Not everyone in the community is as up-to-date as others, so this gives everyone a chance to see what's new before our main presentation.

The original idea for this came from Eric Poe which did something similar for the Kansas City PHP User Group.

Including this segment at our meetup has helped our group in many ways. First, as I mentioned, it gives all of the members an easy and quick, way to get up to date on latest news and changes since the last meetup. Second, it allows newer PHP community members to get a glimpse of what resources are available to them. Lastly, since the segments are usually only 10-15 minutes long, it gives an excellent opportunity for new speakers to get their feet wet talking to a group.

I'd love to see more meetup groups implement something similar to this and help the PHP community grow. You can visit our GitHub Repository for a general outline and presentation template. If your group starts presenting this segment, please tweet a picture and slidedeck to @TrianglePHP and me - we'd love to see how it goes!



Presented by: Chris Gmyr (@cmgmyr)


PHP Releases

VERSIONS

  • 5.6.35, 7.0.29, 7.1.16, 7.2.4
  • All bug fixes

http://php.net/ChangeLog-7.php

http://php.net/ChangeLog-5.php


PHP Supported versions April 2018

PHP RFCs

  • Accepted
    • Arrays starting with a negative index (8.0)
  • Implemented
    • is_countable (7.3)

https://wiki.php.net/rfc


Negative indexed arrays (current)

$a = array_fill(-2, 3, true);

array(3) {
  [-2]=>
  bool(true)
  [0]=>
  bool(true)
  [1]=>
  bool(true)
}

Negative indexed arrays (new)

$a = array_fill(-2, 3, true);

array(3) {
  [-2]=>
  bool(true)
  [-1]=>
  bool(true)
  [0]=>
  bool(true)
}

Is Countable

// before 
if (is_array($foo) || $foo instanceof Countable) {
    return count($foo);
}

// after
if (is_countable($foo)) {
    return count($foo);
}

PHPUnit

Latest: 7.1.2, 6.5.8

PHPUnit 5 has reached its End of Life on February 2, 2018 and no longer receives bug fixes

https://github.com/sebastianbergmann/phpunit/wiki


Framework: Laravel

5.6.[13-16]

  • Better support for signed routes
  • Added callback support to optional() helper
  • Added @elseauth and @elseguest Blade directives
  • Added view:cache command
  • Replaced Blade's or operator with null-coalescing operator
  • Added SessionGuard::logoutOtherDevices() method
  • Security: Check iv length in Encrypter::validPayload() (5.5.40 also)

https://github.com/laravel/framework/releases


Framework: Symfony

2.7.x, 2.8.x, 3.4.x, 4.0.x

  • Bug Fixes

https://symfony.com/blog/category/releases


CMS: Drupal

7.58, 8.3.9, 8.4.6, 8.5.1

highly critical security vulnerabilities

A remote code execution vulnerability exists within multiple subsystems of Drupal 7.x and 8.x. This potentially allows attackers to exploit multiple attack vectors on a Drupal site, which could result in the site being completely compromised.

https://www.drupal.org/psa-2018-001

https://www.drupal.org/project/drupal/releases


CMS: Wordpress

4.9.5

  • Don't treat localhost as same host by default.
  • Use safe redirects when redirecting the login page if SSL is forced.
  • Make sure the version string is correctly escaped for use in generator tags.
  • Improved compatibility with PHP 7.2.

https://wordpress.org/news/2018/04/wordpress-4-9-5-security-and-maintenance-release/


IDE: PHPStorm

2018.1[.1]

  • Refactor your code to functional style
  • Creating class from test
  • Codeception: code coverage
  • Updated HTTP Client

https://blog.jetbrains.com/phpstorm/


IDE: VSCode

1.22

  • Syntax aware code folding
  • Convert to ES6 refactoring
  • Better large file support
  • Organize JS/TS imports
  • Emmet performance and smart matching improvements

https://code.visualstudio.com/updates/v1_22


PHP Conferences - April

DrupalCon Nashville April 9–13, Nashville, TN https://events.drupal.org/nashville2018

Longhorn PHP Conference April 19–21, Austin, TX https://www.longhornphp.com


PHP Conferences - May

PHP Serbia Conference May 25–27, Belgrade, Serbia https://conf2018.phpsrbija.rs/

php[tek] May 29–June 1, Atlanta, GA https://tek.phparch.com/


Nomad PHP

April 19

US How to Use Generators to Beat Memory Bloat By Korvin Szanto

Europe Mining Your Code for Efficient Documentation By Damien Seguy

https://nomadphp.com/


Open Call for Papers

All Things Open Oct 23-24, Raleigh, NC CFP Ends: April 24 https://allthingsopen.org/call-for-papers/

Texas Camp May 31–June 2, Austin, TX CFP Ends: April 19 https://2018.texascamp.org/submit-session


Upcoming regional events

April 28-29 - WordCamp Raleigh https://2018.raleigh.wordcamp.org

Aug 16-17 - Southeast PHP (Nashville, TN) https://southeastphp.com

Oct 7-8 - NCDevCon http://ncdevcon.com

Oct 23-24 - All Things Open http://allthingsopen.org


Notable News & Articles