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

php[architect]:
May 2016 Issue Released - Full Speed Ahead
May 03, 2016 @ 12:18:25

On the php[architect] site today they've announced the release of their May 2016 issue: "Full Speed Ahead".

We’ve just released the May 2016 issue of php[architect] magazine. To help you make good use of your development time, this month the magazine looks at libraries including DoctrineORM and FastRoute, and product development lessons from building Laravel Shift.

In addition, this month includes articles on defining “Senior Developer”, the value of gratitude, keeping credentials safe, securing web services, and the value of hindsight.

This month's issue also includes articles covering OAuth 2 and all of the usual columns (Education Station, Leveling Up, Community Corner, Security Corner). As always they provide one article free so you can get a taste of the latest issue. This time it's the article from Edward Barnard covering web services security. You can pick up a copy of your own directly from the php[architect] website or just get a year long digital or print subscription while you're there.

tagged: phparchitect magazine may2016 fullspeedahead issue release

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

Leonid Mamchenkov:
Adventure in composer private repositories
Apr 22, 2016 @ 09:19:44

In this new post to his site Leonid Mamchenkov talks about some of his "adventure with Composer private repositories" in some of his deployment work with CakePHP 3 applications.

As good as the Packagist is, there is often a need for a repository or a package elsewhere. Whether it’s a commercial library, or sensitive corporate code, having an ability to store it outside of public eye and handle with the same ease and the same tool as the rest of the dependencies is a very welcome feature.

[...] We are setting up similar development and deployment process, but now for CakePHP-based projects. Things are much easier, since CakePHP 3 natively supports composer for the application itself and for its plugins. But we still have the need for private repositories here and there, so we follow the same setup as we did for WordPress.

Unfortunately he was getting a RuntimeException when he was trying to pull in a plugin through the same private repository workflow. Not only had he not seen the error before but the autoloader was configured as defined and other plugins were working with the same structure. As it turns out, it was the composer.json of the main application repository that was the problem. He includes the fix he made to the configuration on a sample CakePHP 3 project, showing how to switch it to a "vcs" type for more correct handling.

tagged: composer private repository issue runtime exception composerjson configuration

Link: http://mamchenkov.net/wordpress/2016/04/21/adventure-in-composer-private-repositories/

Niklas Keller:
Let's Encrypt with PHP
Mar 16, 2016 @ 13:05:32

The introduction of the LetsEncrypt free SSL certificate service has made making your site SSL only a much easier process than ever before. They've made it even easier by allowing automation around certificate setup and renewal. In this post to his site Niklas Keller shows you how to use a PHP implementation of a tool to setup/refresh your certificates automatically.

Let’s Encrypt, the free and automated CA, started late last year into their public beta. They offer a pretty comprehensive client to automate the process of getting SSL clients and installing them. It will soon be moved to a new home at EFF.

If you’re already using PHP and don’t need / want the automatic installation of your free certificates or don’t want to install Python, here’s a client for you. kelunik/acme-client is able to issue and renew certificates using your already running webserver (e.g. Nginx or Apache). It’s using the http-01 challenge to prove your domain ownership / control to Let’s Encrypt.

He shows how to use the client to set up a new LetsEncrypt account (if you don't already have one) and issue a certificate through a few command line calls. He then shows how to automate the process to check your certificate expiration and load the updated certificates. He also includes an example of the command to revoke a certificate, just in case.

tagged: letsencrypt ssl certificate client acme example refresh issue revoke

Link: http://blog.kelunik.com/2016/03/13/letsencrypt-php-client.html

PHP.net:
PHP 5.5.33, 5.6.19 & 7.0.4 Released
Mar 04, 2016 @ 12:38:49

The latest releases of all major (and minor versions) of the PHP language have been released with several bugfixes including correcting a few security issues: 5.5.33, 5.6.19 and 7.0.4.

The PHP development team announces the immediate availability of PHP [5.5.33, 5.6.19 and 7.0.4]. This is a security release in which two security bugs were fixed. All PHP users are encouraged to upgrade to this version.

You can find out more information about what changes were made in these releases in the PHP 5 Changlog and PHP 7 Changelog along with references to the related bug information. As always, you can download these latest releases from the main PHP.net site or your favorite mirror linked from the main downloads page. Windows users can get the latest binaries from windows.php.net.

tagged: language release php5 php7 bugfix security issue

Link: http://php.net/downloads

php[architect]:
March 2016 Issue Released - Mutant Testing
Mar 02, 2016 @ 11:09:08

php[architect] has officially released the latest edition of their magazine for March 2016 - Hunting Mutants. This new issue includes articles about compilers/interpreters, Laravel's Eloquent ORM and Zend Expressive.

Unless you’ve been cryogenically frozen for the past few years, you’ve no doubt heard about how important automated testing is as well as TDD, BDD, Continuous Deployment, and other acronyms. Either you’ve read an article in a past issue of this magazine or you’ve heard it from numerous advocates at conferences, on blogs, and on twitter. This month’s issue features two articles on Mutation Testing with Humbug.

This month's article also includes a free sample, the article covering Eloquent, the ORM for the Laravel framework. All of the usual columns are back in this edition as well including the Education Station, Leveling Up and the Security Corner. You can pick up an issue of your own directly from the php[architect] site for just $6 USD or a full year's subscription for $49 USD.

tagged: phparchitect magazine march2016 mutant testing issue release

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

php[architect]:
February 2016 Issue Released - "Workflow Powerups"
Feb 02, 2016 @ 12:17:53

php[architect] magazine has officially released their February 2016 issue - "Workflow Powerups" - featuring articles about tools, tips and techniques you can use to enhance your own development workflow.

This issue includes articles like:

  • "Docker for PHP" (Ben Hosmer)
  • "Software Branching Strategies: A Git Overview" (Georgiana Gligor)
  • "Extensible Applications with Symfony Event Dispatcher" (Juan Manuel Torres)

The usual columns are also back: the Education Station, Security Corner and Leveling Up. This month's free article is an interesting one for any one that's submitted to or runs a technical conference: an inside look at how the php[architect] crew makes the talk selections for their conferences. You can get more information about this latest issue and pick up a copy of your own directly from the php[architect] site for just $6.00 USD or a year's subscription for $49.00 USD.

tagged: phparchitect magazine februaru2016 workflow powerup issue release

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

Speedemy.com:
Troubleshooting (Web) Application Performance Issues with Strace
Feb 01, 2016 @ 11:51:21

On the Speedemy.com site there's a post showing you how to get down to a seriously low level of processing and identify performance issues with strace, the debugging tool that helps monitor interactions between processes, the kernel, system calls, etc.

What do you do when your Linux web app starts acting out? You troubleshoot it, of course! Me too. And today I would like to talk to you about one tool that works really well with all sorts of applications and application servers – ranging from apache http server running modules (mod_php, mod_perl, etc.), to applications running in fast cgi setting or even simple single-threaded programs.

The tool I’m talking about is strace, and if you’re not familiar with it, it will be my pleasure to introduce you two.

They start off by answering the question of when you shouldn't use strace for testing (like when an application can actually be profiled properly) before shows where it can actually help. The post then briefly introduces strace and what it can do, pointing out what kind of information it can provide. From there they start in on using it to do the debugging and show examples of the output it can provide. They help you use some other command line options to refine this output into something a bit more useful and even include an awk command to narrow it down even more .

tagged: strace performance issue application tutorial

Link: http://www.speedemy.com/troubleshooting-web-application-performance-issues/

php[architect]:
January 2016 Issue Released - Front-End Polish
Jan 05, 2016 @ 12:50:47

The January edition of php[architect] magazine has officially been released: "APIs: Doorways to Your Apps".

The first issue for 2016 of php[architect] magazine is ready for download. To start off the new year, we look at solutions to help you easily add an API to an existing appliction.

This month includes articles on using Zend’s Apigility, the API Platform, adding a PHP web server to a Raspberry Pi, and Symfony’s component for command line scripts. Our columns discuss how to use Carbon for Datetime, the role of passwords in Security, finding the actual solution to problems, an interview with Jeff Carouth, and how the other ‘P’ languages have fared recently.

This issue also includes the usual columns covering handy libraries, "leveling up" as a developer and application security. You can pick up an issue of your own (or a year subscription) over on the php[architect] site.

tagged: phparchitect magazine january2016 api issue release

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

php[architect]:
December 2015 Issue Released - Winter Tooling
Dec 01, 2015 @ 10:49:25

php[architect] magazine has just released their December 2015 issue, Winter Tooling, focusing on some of the great tools and libraries out there to help make your job as a developer easier.

In this issue, you’ll learn how to Profile your applications to identify bottlenecks, see how the FigDice engine offers a novel approach to templates, why you should be using the MySQL native driver, and how to use R and PHP to create data visualizations. Also inside, are a look at the power of interfaces, why validation is important in security, how to use the Plates templating engine from the League of Extraordinary Packages, and an interview with Rafael Dohms.

If you're interested to check out the magazine, be sure to read the free article first and see what you think. You can get just this issue (a digital copy) for just $6 USD or a full year subscription for just $49 USD (or a print/digital for a bit more).

tagged: phparchitect magazine december2015 tools issue release

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

Joshua Thjissen:
Symfony, Xdebug, and maximum nesting level issues
Nov 18, 2015 @ 10:53:45

In this new post to his site Joshua Thjissen has shared some of his discoveries with Xdebug, Symfony 2 and problems with maximum nesting levels of objects in his testing.

Here you are, developing your code based on the Symfony2 framework. Creating a form here, add a Twig template there, until suddenly, boom! Your site doesn’t work anymore, and all the info you can find in your PHP logs is [an error about the maximum function nesting level being reached.

[...] What just happened? Did I create some kind of recursive function I wasn’t aware of, did somebody commit code that I accidentally pulled? Fortunately for us developers, there is a quick way to deal with this: google it...

According to the information he found via his search it's a common issue and can be "fixed" by bumping up the max_nesting_level to a higher value. He could have stopped there but he wanted to explain why this problem happened, what the nesting is all about, how it relates to the limitations of XDebug and why Twig could cause problems with it.

tagged: symfony2 xdebug maximum nesting level issue stack trace twig

Link: https://www.adayinthelifeof.nl/2015/11/17/symfony-xdebug-and-maximum-nesting-level-issues/