Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Community News:
Latest PECL Releases (01.15.2019)
Jan 15, 2019 @ 08:05:01

Latest PECL Releases:

  • pq 2.1.5
    * Fix PHP-7.3 compatibility

  • datadog_trace 0.9.1
    ### Added - Ability to reset all overrides via `dd_trace_reset`

    Changed

    • By default do not throw an exception when method or function doesn't exist

    Fixed

    • Eloquent integration calling protected performInsert method
  • mcrypt 1.0.2
    - The mcrypt extension as it was in PHP 7.1, before it was removed from core.
  • gRPC 1.18.0RC1
    - gRPC C Core 1.18 uptake
tagged:

Link:

Laravel News:
Laracon Online 2019 Announcement
Jan 11, 2019 @ 13:47:57

The Laravel News site has posted an announcement about the latest in their series of Laracon events: Laracon Online 2019.

Laracon Online 2019 is coming to a couch near you on March 6th, 2019! Back and better than ever in this 2019 edition, you will hear from the likes of Laravel creator Taylor Otwell, Tighten Partner and Laracon US speaker Matt Stauffer, Refactoring UI tag-team Adam Wathan and Steve Schoger, Laracon US speakers Freek Van Der Herten and Samantha Geitz, and Laracon 2018 EU speaker Marcel Pociot.

Just like last year, the event is hosted entirely online and the event is super affordable for the early bird price of $12. No hotels, no airfare, just signup and spend the day watching some of the best speakers right from your computer.

And there's good news for those out there wanting to attend the event - they're giving away 355 tickets for free based on the generous donations from several sponsors. Naturally, if you can afford the $12 (that's like 2 cups of fancy coffee!) then don't enter the drawing. They want as many people as possible to enjoy the event. If you're interested in the kind of content presented at these events, check out last year's talks or just head over and get your ticket now.

tagged: laracononline19 conference online registration giveaway announcement

Link: https://laravel-news.com/laracon-online-2019

Matt Glaman:
Writing better Drupal code with static analysis using PHPStan
Jan 11, 2019 @ 12:09:23

Matt Glaman has written up a post for his site showing how you can write better Drupal code using PHPStan, the PHP static analysis tool.

PHP is a loosely typed interpreted language. That means we cannot compile our scripts and find possible execution errors without doing explicit inspections of our code. It also means we need to rely on conditional type checking or using phpDoc comments to tell other devs or IDE what kind of value to expect. Really there is no way to assess the quality of the code or discover possible bugs without thorough test coverage and regular review.

If you use PhpStorm, you will notice all of their helpers which analyze your code and add static analysis. [...] That's awesome. It's pretty amazing that PhpStorm and a few plugins can give us some stability in our PHP code.

While the functionality in PhpStorm is useful, there are some pitfalls including the fact that everyone would have to use PhpStorm. He makes the suggestion that PHPStan can effectively replace these helpers and, with a bit of customization, provide just as much quality control for your Drupal code. He links over to a custom PHPStan extension for Drupal and an example YAML configuration. He also includes helpful tips around bootstrapping the autoloader, return typing and changes it provides for using the entity manager.

tagged: static code analysis drupal tutorial phpstan extension

Link: https://glamanate.com/blog/writing-better-drupal-code-static-analysis-using-phpstan

Tomas Votruba:
9 Steps to Migrate From Jekyll to Statie
Jan 11, 2019 @ 11:22:58

In a new post to his site Tomas Votruba walks you through the process he followed for moving his site [away from the Jekyll static site generator over to Statie], PHP-based static site generator.

Jekyll is great to start for micro websites like gomonorepo.org and <a href="https://gophp71.org/>gophp71.org from Jekyll to Statie. Can new init command make this piece of cake? And what needs to be done next?

He goes through each step of the process (nine of them), providing code and configuration examples along the way:

  • Create Basic Statie Structure
  • Move Source files to /source Directory
  • Move Parameters Files Under parameters > [param name] Sections
  • Upgrade Absolute Links to Moved Files
  • Load Moved YAML Files in statie.yml
  • Remove site.data. and use Variables Directly
  • Setup Github Pages deploy in Travis
  • Clean Metadata from Headers

The final step in the process are the commands to run the project locally and ensure that everything it working as expected before deployment.

tagged: tutorial migration jekyll statie static generator

Link: https://www.tomasvotruba.cz/blog/2019/01/10/9-steps-to-migrate-from-jekyll-to-statie/#4-upgrade-absolute-links-to-moved-files

Laravel News:
Tips to Speed up Your Phpunit Tests
Jan 11, 2019 @ 10:41:23

On the Laravel News site Tim MacDonald has written up a post sharing some tips on how you can speed up your PHPUnit tests, making them easier to run and more useful during the development process.

Having a fast test suite can be just as important as having a fast application. As a developer, getting feedback quickly about the state of your code allows for a much quicker development turnaround. Here we are going to run through some tips you can implement today to make your tests run faster.

The example test suites have been made intentionally slow to simulate a broader set of tests and also to emphasize the improvements possible. Your real-world mileage may vary.

He makes recommendations around the use of ParaTest to run the tests in parallel, re-running only failed tests, grouping slow tests, lowering the password hash "rounds" count and disabling XDebug. Each item in the list includes instructions on what changes need to be made and screenshots of the results of the change.

tagged: unittest phpunit tips speed performance improvement

Link: https://laravel-news.com/tips-to-speed-up-phpunit-tests

Stitcher.io:
New in PHP 7.4
Jan 11, 2019 @ 09:33:57

On the Sticher.io blog Brendt has written up a guide looking forward to PHP's next major release and what's planned to be included in PHP 7.4.

PHP 7.4 will probably be released somewhere December 2019. tagged: language php74 features lookahead rfc planned

Link: https://stitcher.io/blog/new-in-php-74



Community News:
Recent posts from PHP Quickfix (01.09.2019)
Jan 09, 2019 @ 08:05:01

Recent posts from the PHP Quickfix site:

tagged:

Link:

Community News:
Latest PECL Releases (01.08.2019)
Jan 08, 2019 @ 08:05:02

Latest PECL Releases:

  • geospatial 0.2.1
    - Fixed issue #22: Compile failure with PHP 5.6 on Windows using VC11

    • Fixed issue #26: Initial Bearing Calculation Error
    • Fix possible integer overflow in memory allocation with negative precision in geohash_encode (Emir Beganovic)
  • datadog_trace 0.9.0
    ### Added - PHP code compatibility with PHP 5.4 #194 - Move framework tests to tests root folder #198 - Move integrations tests to tests root folder #200 - Allow testing of multiple library versions #203 - Downgrade of phpunit to 4.* in order to prepare for php 5.4 #208 - Configurable autofinishing of unfinished spans on tracer flush #217

    Fixed

    • Predis integration supporting constructor options as an object #187 - thanks @raffaellopaletta
    • Properly set http status code tag in Laravel 4 integration #195
    • Agent calls traced when using Symfony 3 integration #197
    • Fix for trace and span ID's that were improperly serialized on the wire in distributed tracing contexts #204
    • Fix noop tracer issues with Laravel integration #220
  • swoole 4.2.12
    + Implement RFC-1014, add `task_enable_coroutine`, remove `task_async` (13ab0f8) + Support `gethostbyname` timeout, add async task thread pool (#2256) + `CoPostgreSQL` supports process-oriented prepare (#2223) (#2258) + `CoRedis` client adds getOptions method (#2279) * Fixed non-coroutine after server reload (#2262) (3ac2337) * Fixed wrong data in `Table` (#2263) (872e99d) * Fixed `CoHttpClient:addFile` error when optional parameter is null (#2270) * Fixed optional parameter problem for `Co::getaddrinfo` (#2273) * Fixed timers in user processes (#2274) * Fixed the availability of gdb debugging tools in C++ (90d148b) (b12f62f)
  • datadog_trace 0.8.1
    -
  • amqp 1.9.4
    * Improved build environment (Olivier Dolbeau) * Various bug fixes and improvements (Bogdan Padalko, yjqg6666) * Support for PHP 7.3 (Remi Collet)

    For a complete list of changes see: https://github.com/pdezwart/php-amqp/compare/v1.9.3...v1.9.4

  • uopz 5.1.0
    - Fix #89 uopz_flags bugs on 64bit windows - Fix #87 segfault when hook throws fatal error - Fix #86 interface support for uopz_set_return - Fix #85 cuf/cufa bugs - Fix #76 uopz_extend changing linkage - Fix #73 cuf/cufa bugs - Fix #68 hang when using anon class as mock - Fix #64 segfault after uopz_set_static - Fix #63 class constant redefinition depends on opcache - Fix #61 mocking not working with xdebug - Fix #51 hooks and returns bug - Fix #42 uopz_set_mock not working in some cases - Fix PHP 7.3 compatibility
tagged:

Link: