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

php[architect]:
April 2017 Issue Released - Spring Renewal
Apr 07, 2017 @ 10:55:54

php[architect] magazine has posted an announcement about the release of their latest issue for April 2017: Spring Renewal:

Hot off the virtual presses, the April issue of the magazine is available to download. This month, we look at new things to make your application code better and more secure.

[...] In our regular columns for April, Matthew Setter evaluates using Rocketeer, a PHP-based deployment tool. David Stockton will explain Value Objects and how they can make your code less ambiguous. Cal Evans writes on why training is important in Community Corner. Joe Ferguson will get you started on using Homestead for easily setting up a local development environment. In his finally{}, this month Eli White analyzes the results of a recent Stack Overflow developer survey.

Other articles included in this month's' issue cover topics like multifactor authentication, making remote API requests and PSR-7. You can get a copy of this issue (or subscribe for a year's worth of PHP goodness) on the php[architect] site.

tagged: phparchitect magazine april2017 springrenewal issue release

Link: https://www.phparch.com/2017/04/back-to-the-drawing-board-march-2017-copy/

php[architect]:
March 2017 Issue Released - Back to the Drawing Board
Mar 06, 2017 @ 12:51:53

The php[architect] site has announced the release of their March 2017 issue - Back to the Drawing Board:

The March issue of the magazine is ready for you to download. In this issue, we look at some server related technologies to keep your PHP application humming.

Articles featured in this issue include:

  • Chris Pitt looks at using WebSockets and asynchronous PHP to build a multiplayer code school by manipulating a Minecraft server.
  • Chris Tankersley looks at the evolution of deployment solutions for Docker containers in Deploying to Docker Swarm.
  • Jack Polifka shares his advice on Pursuing a Graduate Degree as Professional Development. He’ll explain the skills you’ll learn and how they’re applicable throughout your career.

You can find out more about this issue and pick up a copy of your own directly from the php[architect] website. You can either get just the single issue or subscribe for a year, either print, digital or a combination of the two.

tagged: phparchitect magazine march2017 drawingboard issue release

Link: https://www.phparch.com/2017/03/back-to-the-drawing-board-march-2017/

Mattias Geniar:
Mitigating PHP’s long standing issue with OPCache leaking sensitive data
Feb 28, 2017 @ 11:39:33

In a new post to his site Mattias Geniar looks at an old security issue in PHP, opcache information leakage and how to mitigating the issue.

A very old security vulnerability has been fixed in PHP regarding the way it handles its OPCaches in environments where a single master process shares multiple PHP-FPM pools. This is the most common way to run PHP nowadays and might affect you, too.

He starts by talking about the vulnerability itself, that the PHP process doesn't validate the userid when fetching cached bytecode. This could result in information from other operations/scripts being exposed to other processes in a PHP-FPM pool. His solution? Upgrade PHP (the bug is fixed back in PHP 5.6.5) and set a few additional opcache ini settings to enforce the validation. Besides 5.6.29, it was also corrected in the PHP 7 releases (7.0.14 and 7.1.0). The post then talks about the potential exploit - an indirect local privilege escalation to root where the shared memory is read and access to outside information is possible.

tagged: opcache bytecode security issue leak sensitive information mitigation

Link: https://ma.ttias.be/mitigating-phps-long-standing-issue-opcache-leaking-sensitive-data/

php[architect]:
January 2017 Issue Released - Blueprints for Success
Jan 04, 2017 @ 11:29:12

php[architect] magazine has released their first issue of 2017 with their January edition - Blueprints for Success.

Happy New Year, dear reader! Let’s get ready to take on the challenges of the next 12 months. As always, a new year brings a sense of a “fresh slate” for our personal and professional goals. This month, we’ve collected articles that will help you in planning before you dive into your code editor.

Articles in this month's edition include:

  • "Mirror, Mirror on the Wall: Building a New PHP Reflection Library" (by james Titcumb)
  • "Writing Better Code with Four Patterns" (by Joseph Maxwell)
  • "Capturing an API’s Behavior With Behat" (by Michael Heap)

...and, of course, the columns you know like "Education Station" and "Community Corner". You can find out more about these articles and columns on this page for the issue and pick up a copy of your own.

tagged: issue blueprint january2017 magazine phparchitect release

Link: https://www.phparch.com/magazine/2017-2/january/

Symfony Blog:
How to solve PHPUnit issues in Symfony 3.2 applications
Dec 14, 2016 @ 11:53:49

On the Symfony blog there's a quick post sharing helpful advice about fixing PHPUnit tests in Symfony 3.2 applications, mostly around an issue involving the use of the "phar" distribution and a class constant error.

If your application uses Symfony 3.2 and you execute PHPUnit via its PHAR file, you'll end up with the following error message [about the "PARSE_CONSTANT" constant]. In Symfony 3.2 applications you can't use the PHAR file of PHPUnit and you must use instead the PHPUnit Bridge.

They provide the commands to get this bridge installed (via Composer) and how to execute the PHPUnit tests post-install (using the "simple-phpunit" command instead). They explain why this process needs to be followed to run the tests correctly and how the PHPUnit-bridge package helps to resolve the situation.

tagged: phpunit issue symfony v32 bridge constant error

Link: http://symfony.com/blog/how-to-solve-phpunit-issues-in-symfony-3-2-applications

php[architect]:
December 2016 Issue Released - Scrutinizing Your Tests
Dec 02, 2016 @ 13:12:45

php[architect] magazine has officially announced the release of their last issue for 2016: the December 2016 edition - "Scrutinizing Your Tests":

The twelfth issue of 2016 is now available! This month we look at how to write good tests with Behat and using Test Driven Development. This issue also includes articles on using HTTPlug to decouple your HTTP Client, Decoupled Blocks with Drupal and JavaScript. Our columnists have articles on writing a Chat bot, advice on securing your application’s secrets, making better bug reports, respecting diversity, and a look back at 2016.

This issue includes articles like:

  • "Strangler Pattern, Part Three: the Rhythm of Test-Driven Development" (Edward Barnard)
  • "Decoupled Blocks with Drupal 8 and JavaScript Frameworks" (Matt Davis)
  • "Leveling Up: Building Better Bug Reports" (David Stockton)
  • "Community Corner: Focus on What We Have in Common" (Cal Evans)

And, as always, they provide a free article so you can get a feel for the content of the magazine. This month's talks about Behat by Konstantin Kudryashov. You can pick up a copy of your own directly from the php[architect] site.

tagged: phparchitect magazine december2016 scrutinize tests issue release

Link: https://www.phparch.com/magazine/2016-2/december/

TutsPlus.com:
Building Your Startup: Issue Tracking and Feature Planning
Dec 02, 2016 @ 12:56:23

TutsPlus.com has continued their "Building Your Startup with PHP" series today with this latest tutorial covering the creation of an issue tracking and feature planning process with the help of the Anana service.

Even for a one-person startup, it helps to have more than a spreadsheet (or paper) to track issues, ideas, and bugs. A few years ago, I'd used Lighthouse for my grant-funded NewsCloud Community Starter Project. Last year, I'd been introduced to Asana during a consulting gig.

[...] Eventually, I found my way and discovered the tool works well whether you're working with a variety of people or just solo. In today's episode, I'll walk you through how I began using Asana for Meeting Planner. I use Asana not only to track issues but to organize them and plan for the future. I also use it to track and process bugs.

He walks you through getting started with the service (they have a free tier) and how to set up your first project. He includes examples of task creation, tagging tasks and tracking bugs right inside the service. He then uses it to create a "release plan" for the next version of the Meeting Planner application. He wraps up the post talking about what's next on his side for the Planner application and its funding goals.

tagged: build startup series meetingplanner issue tracking feature planning tutorial

Link: https://code.tutsplus.com/tutorials/building-your-startup-issue-tracking-and-feature-planning--cms-26722

php[architect]:
November 2016 Issue Released - Moving Forward
Nov 02, 2016 @ 09:42:35

php[architect] magazine has officially released the latest issue, their November 2016 edition: "Moving Forward".

The eleventh issue of 2016 is now available! It’s time to download your copy of this issue of php[architect] magazine. This issue contains articles on the history of women in computing, using Abstract Classes/Interfaces/Traits, scaling with RabbitMQ, and custom extensions using Zephir. Our columnists have articles on Security scanners, advice for your first conference, improving your processes, understanding your editing tools, and more.

You can get more detail on the articles in this month's edition on the php[architect] website including:

  • "Dev Divas: History’s Heroines of Computing, Part Two" (Vesna Vuynovich Kovach)
  • "What Are Interfaces, Abstracts, and Traits?" (Chilion Snoek)
  • "Strangler Pattern, Part Two: Beginning to Design for Scale With RabbitMQ" (Edward Barnard)

And, as always, your favorite columns are back such as "Eduction Station" and "Security Corner". If you're interested in the content of the magazine, you can check out this free article for a sample. If you enjoy it, you can pick up a copy of your own (or subscribe) through the php[architect] site.

tagged: phparchitect magazine november2016 movingforward issue release

Link: https://www.phparch.com/magazine/2016-2/november/

Mark Baker:
PHP Generators – Sending “Gotchas”
Oct 11, 2016 @ 11:54:52

In this post to his site Mark Baker has shared some "sending gotchas" when generators are used in you PHP code. The focus of the article is on the "sending" part, pushing data into the generator for evaluation and use.

If you’re reading this, you’re probably already aware of just how useful PHP’s Generators are for improving performance and/or reducing memory overheads while keeping your code clean and easy to read.

Unlike their equivalent in some programming languages, PHP’s Generators allow you to send data into the Generator itself; not simply at initialisation (the arguments that we pass to the Generator when instantiating it); but also between iterations. This has its own uses, and again, allows us to move code from our main blocks and methods into the Generator itself. [...] However, there are a few “gotchas” when we combine Generators that both return and accept data in this way, and it really helps to be aware of them when we’re developing, otherwise it can create problems.

He starts simple, showing a generator that uses integers passed in as the starting number and addition interval for each loop. He gets a bit more complex in his next example, having a method called inside the loop. While the first instance of this behaves as expected, the second (after minor modification) yields unexpected results. He walks you through what's happening to produce those results and one possibility on how to get it corrected.

tagged: generator gotcha issue unexpected results debugging workaround

Link: https://markbakeruk.net/2016/10/08/php-generators-sending-gotchas/

php[architect]:
October 2016 Issue Released - Pillars of Development
Oct 04, 2016 @ 09:55:07

php[architect] magazine has just announced the release of the latest edition of their magazine, the October 2016 issue: Pillars of Development.

Articles in this issue include:

  • Juggle Arrays Using Functional Callbacks (Andrew Koebbe)
  • Dev Divas: History’s Heroines of Computing, Part One (Vesna Vuynovich Kovach)
  • The Strangler Pattern, Part One (Edward Barnard)
  • API Tips From the Front Line (Anna Filina)

The usual columns are also back including the "Education Station", "Security Corner" and "Leveling Up". If you'd like a sample of the contents of the issue, they're also offering a free article, "COTS, Open Source, Build it Yourself, or Something in Between?" by Eli White. If you pick up your own copy of this latest edition directly from the php[architect] website either as an individual issue or as a subscription (either digital only, print only or combined).

tagged: phparchitect magazine october2016 pillars development issue release

Link: https://www.phparch.com/magazine/2016-2/october/