PHP Coalface

Here's the main RSS feed from phpdeveloper.org:

PHPDeveloper.org
Laravel News: Creating Your Own Configuration in Laravel on 19 September 2017

On the Laravel News site there's a new tutorial posted showing you how to for those that are newer to the framework.

If you are new to Laravel, you might not yet know how you can create your configuration files in your projects and a few other helpful things that will help you master configuration. As always, the provides great information, and there are a few things we’ll cover here that I think will help people new to the Laravel framework.

They walk you through a complete guide to the Laravel configuration handling including:

  • what pieces are involved and where they belong
  • accessing the configuration service
  • working with configuration values
  • creating a custom configuration
  • caching the configuration for better performance

Each item on the list has a brief description helping to illustrate the point and commands/code examples where appropriate.

Mark Baker: Closures, Anonymous Classes and an alternative approach to Test Mocking (Part 3) on 19 September 2017

Mark Baker has posted the third part of his series looking at an alternative way to handle mocking in the tests for your PHP application. In of the series he shows how to modify one of PHPUnit's own mocking examples to use an anonymous class.

I have heard people say that you shouldn’t test abstract classes or traits, only the concrete classes that implement or use them. I don’t follow that approach: unit testing is all about testing in isolation from anything that might affect those tests. Testing a concrete class that implements an abstract one, or uses a trait, means that the abstract class or trait is no longer fully isolated, but is being tested within the scope of the whole of that concrete class. We should still always test concrete classes as well; but we should also test the abstract classes and traits as individual units.

So just how do we test something that cannot be instantiated on its own?

He shares one tactic that some developers use - a class designed only for testing - but suggests that this "pollutes" the codebase. Instead he shows how to replace with an anonymous class that's more "disposable". He also shows how to modify this approach to handle calling protected methods in the class the anonymous class extends.

Delicious Brains Blog: XAMPP vs MAMP vs Local vs DesktopServer: A Comparison Guide to Local Dev Envi on 19 September 2017

On the Delicious Brains blog there'a a post that compares four different products for creating local PHP development environments: . Both package provide similar functionality but with slight differences.

An easy-to-use local testing server is one of the most important tools in a WordPress developer’s utility belt. Developing in a local environment lets you make changes to dev sites quickly and easily without having to transfer files anywhere and greatly reduces the risk of making breaking changes on a live server.

While many computers are capable of hosting a WordPress site without needing to install any extra packages, there are a few advantages that a dedicated local development environment can offer.

[...] There are quite a few different applications and tools that fit this bill, but for now we’ll be comparing the 4 GUI-based tools that seem to me to be the largest players in this space: , , , and .

The post then walks through each piece of software, covering the installation and getting it up and running with a WordPress application. There's also a mini-review for each with good/bad comments and an overall rating.The post ends with some comments about the author's own preferences, which they use now and which they'd choose in the future.

HHVM Blog: The Future of HHVM on 19 September 2017

The HHVM project (an alternative PHP runtime from Facebook) has made a major announcement on their blog - beginning with version 3.24 they'll now that it has moved into PHP 7.

The HHVM team is happy about the direction PHP has taken with PHP7, and we’re proud of the role we’ve played in pushing the language and runtime to where they are today. Since the PHP community is finally saying goodbye to PHP5, we’ve decided to do so as well.

Our next LTS release, 3.24, will be cut and will receive support for one year thereafter. It will also be the last HHVM release that commits to PHP5 support. This aligns with PHP’s own timeline of sunsetting PHP5 at the end of 2018.

[...] PHP7 is charting a new course away from PHP5, and we want to do the same, via a renewed focus on Hack. Consequently, HHVM will not aim to target PHP7. The HHVM team believes that we have a clear path toward making Hack a fantastic language for web development, untethered from its PHP origins. We’d do ourselves and our users a disservice by positioning HHVM as an uncommon, less well-documented, less compatible PHP7 runtime.

The post then lists out some of their goals for the HHVM/Hack projects moving forward including reinvesting in open source and staying focused on their needs for the platform and language. It then talks about some of the upcoming changes you can expect around support of current versions of popular PHP tools and work on tools created specifically for Hack.

Community News: Latest PECL Releases (09.19.2017) on 19 September 2017

Latest PECL Releases:


  • - Fixed analyzerDetail bug, use grep -ai key_words.

    • Fixed issue #152. Segfault in cli.

  • - Update license from Apache License 2.0 to PHP License 3.01. - Support send to Rsyslog(TCP/UDP) with RFC5424. - Support RequestId differentiated requests to fixed issue #134. - Support for log template customizations to fixed issue #12 #143. - Update SeasLog Analyzer scripts version to 1.1.0, to fixed issue #139. - Optimization of analyzerCount and analyzerDetail to fixed issue #133. - Fixed issue #138. Error by file exists. - Fixed issue #140. Error by setDatetimeFormat. - Fixed issue #142. Error by too many open files. - Fixed issue #144. Error by read log detail order desc. - Fixed issue #145. Error by analyzerDetail. - Fixed issue #146. Segfault at php-fpm.

  • - License changed to Apache 2.0 - Added support for php_namespace option in codegen plugin #11886 - Updated gRPC C Core library version 1.6

  • - Removed FLAG_REGEX_* prefix from the lexer flag constants - Removed non worky rexeg from range signature for pushMacro method

  • - Fix consistency of return type in 7.0/7.1/7.2 (Remi Collet) - Fix memory leak in ParleStack - Max parser id is set to UINT16_MAX to save memory. This might be changed in the future - Push signatures accepting string range for regex was removed as ZPP would deliver copies anyway - Turned Lexer methods bol, flags and state into properties - Turned Parser methods action and reduceId into properties - Turned Stack methods empty and size into properties

  • ** Bug * [PHPC-994] - Fix HAVE_SOCKLEN_T macro redefinition for Windows builds * [PHPC-1005] - Ensure array symtable converts to object proptable in PHP 7.2 * [PHPC-1006] - Do not modify memory of Persistable::bsonSerialize() return value

    ** Task * [PHPC-996] - Remove support for PHP 5.4 * [PHPC-997] - Update date/time handling code due to changes in timelib * [PHPC-1004] - Rename ObjectID to ObjectId * [PHPC-1007] - Upgrade libbson and libmongoc to 1.8.0 * [PHPC-1008] - Use SETUP_OPENSSL() in config.w32 if available

    ** Improvement * [PHPC-1001] - Report field name for invalid UTF-8 and unsupported zval types during BSON encoding


  • ** Bug * [PHPC-994] - Fix HAVE_SOCKLEN_T macro redefinition for Windows builds * [PHPC-1005] - Ensure array symtable converts to object proptable in PHP 7.2 * [PHPC-1006] - Do not modify memory of Persistable::bsonSerialize() return value

    ** Task * [PHPC-996] - Remove support for PHP 5.4 * [PHPC-997] - Update date/time handling code due to changes in timelib * [PHPC-1004] - Rename ObjectID to ObjectId * [PHPC-1007] - Upgrade libbson and libmongoc to 1.8.0 * [PHPC-1008] - Use SETUP_OPENSSL() in config.w32 if available

    ** Improvement * [PHPC-1001] - Report field name for invalid UTF-8 and unsupported zval types during BSON encoding


  • phpredis 3.1.4RC3

    The primary new feature phpredis 3.1.4 is the ability to send MULTI .. EXEC blocks in pipeline mode. There are also many bugfixes and minor improvements to the api, listed below:

    • Allow mixing MULTI and PIPELINE modes (experimental)! [5874b0] (Pavlo Yatsukhnenko)

    • Added integration for coverty static analysis and fixed several warnings [faac8b0, eff7398, 4766c25, 0438ab4, 1e0b065, 733732a, 26eeda5, 735025, 42f1c9, af71d4] (Pavlo Yatsukhnenko)

    • Fixed link to redis cluster documentation [3b0b06] (Pavlo Yatsukhnenko)

    • Remove unused PHP_RINIT and PHP_RSHUTDOWN functions [c760bf] (Pavlo Yatsukhnenko)

    • Removed duplicate HGET in redis array hash table, formatting [d0b9c5] (Pavlo Yatsukhnenko)

    • Treat NULL bulk as success for session read [659450] (Pavlo Yatsukhnenko)

    • Refactor redis_send_discard [ea15ce] (Pavlo Yatsukhnenko)

    • Updated runtime exception handling [8dcaa4, 7c1407] (Pavlo Yatsukhnenko)

    • Added a github issue template [61aba9] (Pavlo Yatsukhnenko)

    • Initialize gc member of zend_string [37f569) (Pavlo Yatsukhnenko)

    • Fix valgrind warnings [471ce07, 1ab89e1, b624a8b] (Pavlo Yatsukhnenko)

    • Fix php5/php7 compatibility layer [1ab89e, 4e3225] (Pavlo Yatsukhnenko)

    • Fix typo in README.markdown [e47e44] (Mark Shehata)

    • Improve redis array rehash [577a91] (Pavlo Yatsukhnenko)

    • Change redis array pure_cmds from zval to hashtable [a56ed7] (Pavlo Yatsukhnenko)

    • Don't try to set TCP_NODELAY on a unix socket and don't warn on multiple calls to pipeline [d11798, 77aeba] (Michael Grunder)

    • Use zend_string rather than char* for various context fields (err, prefix, etc) [2bf7b2] (Pavlo Yatsukhnenko)

    • Various other library fixes [142b51, 4452f6, e672f4, 658ee3, c9df77, 4a0a46] (Pavlo Yatsukhnenko)


  • phpredis 3.1.4RC2

    The primary new feature phpredis 3.1.4 is the ability to send MULTI .. EXEC blocks in pipeline mode. There are also many bugfixes and minor improvements to the api, listed below:

    • Allow mixing MULTI and PIPELINE modes (experimental)! [5874b0] (Pavlo Yatsukhnenko)

    • Added integration for coverty static analysis and fixed several warnings [faac8b0, eff7398, 4766c25, 0438ab4, 1e0b065, 733732a, 26eeda5, 735025, 42f1c9, af71d4] (Pavlo Yatsukhnenko)

    • Fixed link to redis cluster documentation [3b0b06] (Pavlo Yatsukhnenko)

    • Remove unused PHP_RINIT and PHP_RSHUTDOWN functions [c760bf] (Pavlo Yatsukhnenko)

    • Removed duplicate HGET in redis array hash table, formatting [d0b9c5] (Pavlo Yatsukhnenko)

    • Treat NULL bulk as success for session read [659450] (Pavlo Yatsukhnenko)

    • Refactor redis_send_discard [ea15ce] (Pavlo Yatsukhnenko)

    • Updated runtime exception handling [8dcaa4, 7c1407] (Pavlo Yatsukhnenko)

    • Added a github issue template [61aba9] (Pavlo Yatsukhnenko)

    • Initialize gc member of zend_string [37f569) (Pavlo Yatsukhnenko)

    • Fix valgrind warnings [471ce07, 1ab89e1, b624a8b] (Pavlo Yatsukhnenko)

    • Fix php5/php7 compatibility layer [1ab89e, 4e3225] (Pavlo Yatsukhnenko)

    • Fix typo in README.markdown [e47e44] (Mark Shehata)

    • Improve redis array rehash [577a91] (Pavlo Yatsukhnenko)

    • Change redis array pure_cmds from zval to hashtable [a56ed7] (Pavlo Yatsukhnenko)

    • Don't try to set TCP_NODELAY on a unix socket and don't warn on multiple calls to pipeline [d11798, 77aeba] (Michael Grunder)

    • Use zend_string rather than char* for various context fields (err, prefix, etc) [2bf7b2] (Pavlo Yatsukhnenko)

    • Various other library fixes [142b51, 4452f6, e672f4, 658ee3, c9df77, 4a0a46] (Pavlo Yatsukhnenko)

Also from phpdeveloper.org, here are some Security links:

No channel data


Comments

It's quiet in here...Add your comment