Upgrade to Pro — share decks privately, control downloads, hide ads and more …

The Latest in PHP: April 2018 Edition

The Latest in PHP: April 2018 Edition

Markdown file can be found here https://github.com/trianglephp/latest-in-php

Chris Gmyr

April 12, 2018
Tweet

More Decks by Chris Gmyr

Other Decks in Programming

Transcript

  1. The Latest in PHP
    April 2018 Edition

    View Slide

  2. Presented by
    Chris Gmyr
    @cmgmyr

    View Slide

  3. PHP Releases
    VERSIONS
    4 5.6.35, 7.0.29, 7.1.16, 7.2.4
    4 All bug fixes
    http://php.net/ChangeLog-7.php
    http://php.net/ChangeLog-5.php

    View Slide

  4. View Slide

  5. PHP RFCs
    4 Accepted
    4 Arrays starting with a negative index (8.0)
    4 Implemented
    4 is_countable (7.3)
    https://wiki.php.net/rfc

    View Slide

  6. Negative indexed arrays (current)
    $a = array_fill(-2, 3, true);
    array(3) {
    [-2]=>
    bool(true)
    [0]=>
    bool(true)
    [1]=>
    bool(true)
    }

    View Slide

  7. Negative indexed arrays (new)
    $a = array_fill(-2, 3, true);
    array(3) {
    [-2]=>
    bool(true)
    [-1]=>
    bool(true)
    [0]=>
    bool(true)
    }

    View Slide

  8. Is Countable
    // before
    if (is_array($foo) || $foo instanceof Countable) {
    return count($foo);
    }
    // after
    if (is_countable($foo)) {
    return count($foo);
    }

    View Slide

  9. PHPUnit
    Latest: 7.1.2, 6.5.8
    PHPUnit 5 has reached i
    ts End of Life on February 2,
    2018 and no longer receives bug fixes
    https://github.com/sebastianbergmann/phpunit/wiki

    View Slide

  10. Framework: Laravel
    5.6.[13-16]
    4 Better support for signed routes
    4 Added callback support to optional() helper
    4 Added @elseauth and @elseguest Blade directives
    4 Added view:cache command
    4 Replaced Blade's or operator with null-coalescing operator
    4 Added SessionGuard::logoutOtherDevices() method
    4 Security: Check iv length in Encrypter::validPayload() (5.5.40 also)
    https://github.com/laravel/framework/releases

    View Slide

  11. Framework: Symfony
    2.7.x, 2.8.x, 3.4.x, 4.0.x
    4 Bug Fixes
    https://symfony.com/blog/category/releases

    View Slide

  12. 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

    View Slide

  13. CMS: Wordpress
    4.9.5
    4 Don't treat localhost as same host by default.
    4 Use safe redirects when redirecting the login page if SSL is forced.
    4 Make sure the version string is correctly escaped for use in
    generator tags.
    4 Improved compatibility with PHP 7.2.
    https://wordpress.org/news/2018/04/wordpress-4-9-5-security-
    and-maintenance-release/

    View Slide

  14. IDE: PHPStorm
    2018.1[.1]
    4 Refactor your code to functional style
    4 Creating class from test
    4 Codeception: code coverage
    4 Updated HTTP Client
    https://blog.jetbrains.com/phpstorm/

    View Slide

  15. IDE: VSCode
    1.22
    4 Syntax aware code folding
    4 Convert to ES6 refactoring
    4 Better large file support
    4 Organize JS/TS imports
    4 Emmet performance and smart matching improvements
    https://code.visualstudio.com/updates/v1_22

    View Slide

  16. 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

    View Slide

  17. 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/

    View Slide

  18. 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/

    View Slide

  19. 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

    View Slide

  20. 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

    View Slide

  21. Notable News & Articles
    4 A Concrete Guide to Dependency Injection
    4 PHPStorm tips for power users
    4 Getting Started with Signed Routes in Laravel
    4 Try PSR-12 on Your Code Today
    4 Testing web API clients using Guzzle Mock Handler
    4 Going Deeper with Factories Through Factory States

    View Slide

  22. Next Month @ TrianglePHP
    TDB
    Presented By YOU?!?!
    Thursday, May 17
    6pm
    Atlantic BT
    https://www.meetup.com/trianglephp/events/zgpswmyxhbwb/
    Consider "Chipping In"
    https://secure.meetup.com/trianglephp/contribute/

    View Slide

  23. Have a Job/Need a Job
    Who's hiring?
    Who's looking?
    What are you looking for?

    View Slide

  24. Tonight @ TrianglePHP
    A look at Gutenberg in Wordpress 5.0
    Presented By - Miles Elliot
    Thank you to Atlantic BT for hosting
    and refreshments!

    View Slide