News Feed
Sections




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

Matthew Weier O'Phinney:
PSR-7 By Example
January 29, 2015 @ 09:13:20

As a part of his involvement in the PHP-FIG standards group, Matthew Weier O'Phinney has been contributing to the PSR-7 proposal. This proposal defines a standardized structure for HTTP message handling. In his latest post he gets into a bit more detail on what this means for the PHP developer and how it might be implemented.

PSR-7 is shaping up nicely. I pushed some updates earlier this week, and we tagged 0.6.0 of the http-message package last week for implementors and potential users to start coding against. I'm still hearing some grumbles both of "simplify!" and "not far enough!" so I'm writing this posts to demonstrate usage of the currently published interfaces, and to illustrate both the ease of use and the completeness and robustness they offer.

He starts with a base definition of what the proposal, well, proposes around HTTP messaging, both the incoming and outgoing. He describes the basic structure of an HTTP message and what each part represents. He talks about message headers, bodies and how the current library could return that content. He then looks at requests vs responses, server-side requests and some various uses cases and more practical examples:

  • HTTP Clients
  • Middleware
  • Frameworks

With the PSR-7 standard in place, all of these different tools could have interchangeable interfaces for HTTP request/responses, easily swappable with any other implementation.

0 comments voice your opinion now!
psr7 http message request response summary tool framework middleware client

Link: https://mwop.net/blog/2015-01-26-psr-7-by-example.html

Community News:
Packagist Latest Releases for 01.29.2015
January 29, 2015 @ 08:00:57

Recent releases from the Packagist:
0 comments voice your opinion now!




SitePoint PHP Blog:
Basic TDD in Your New PHP Package
January 28, 2015 @ 12:27:17

The SitePoint PHP blog continues their "How to Build Your Own PHP Package" series with their latest post (part two of the series) covering the use of test-driven development while working on the package code.

In part 1, we set up our development environment, baked in some rules as inherited from The League, and created two sample but useless classes - Diffbot and DiffbotException. In this part, we'll get started with Test Driven Development.

He starts by briefly introducing PHPUnit, a PHP-based unit testing tool, and how to use it to generate the HTML version of the code coverage report. He helps you define a good phpunit.xml configuration file and how to execute a first sample test (code provided) from inside PHPStorm. From there he adds one some more complex testing of exception handling and checking the class types. With this foundation, he moves into the test-driven development (TDD) practices. TDD means writing the tests before writing the code to make those tests pass. He gives an example of this and shows how test abstract classes too. He then comes back around and writes the code to satisfy the test.

0 comments voice your opinion now!
tdd package bestpractice unittest testdriven development tutorial

Link: http://www.sitepoint.com/basic-tdd-new-php-package/

Matt Stauffer:
Laravel 5.0 - Generating Missing Events
January 28, 2015 @ 11:53:39

In the next part of his series introducing the upcoming version of the Laravel framework Matt Stauffer has posted part 16, about generating missing events.

Sometimes it can seem like a lot of work to create an event, create its handler, and bind the two. Create a command, create its handler, bind the two. I've often wished for a workflow that handled the whole process together in one. The artisan commands for generating commands and events are a good start--they both create their own entity and (optionally) its handler. But you still can spend an hour writing the command and handler, and then waste another 15 minutes trying to figure out why it's not working, only to realize you never actually bound the two together.

The solution to this in Laravel 5 is the "event:generate" handling with the artisan command line tool. He includes a look at the event handlers directories and files before executing the command and what changes post-execution, including the sample code generated for the event.

0 comments voice your opinion now!
generate missing event tutorial part16 series laravel5

Link: http://mattstauffer.co/blog/laravel-5.0-generating-missing-events

thePHP.cc:
PHP breaks backwards compatibility
January 28, 2015 @ 10:41:22

In this new post on thePHP.cc blog Stefan Priebsch talks about some of the backwards compatibility breaks that will be coming with PHP's next major version, PHP7.

According to the PHP project's current time line, PHP 7 is scheduled to be released later this year. The version number 6 will be skipped for good reasons. As is expected of a new major release, there will be some breaks in backwards compatibility. Such breaks are always a double-edged sword: some have been eagerly awaiting the removal of legacy features, others expect that existing software keeps working without modifications. The PHP project is notorious for keeping some sins of the past dating back to PHP 3 in an effort to ensure backwards compatibility. Now, with the release of PHP 7, the decision has been made to remove some features that have been marked as "deprecated" in PHP 5.

He talks about how PHP will be "re-engineered" for this major release including a uniform variable syntax and some of the things this could break (like Magento 1). He also mentions the removal of the mysql (not mysqli) extension and a major issue - that PEAR has stopped working in recent versions of PHP7 (built from the current codebase) because of how it calls non-static methods statically.

0 comments voice your opinion now!
php7 break backwards compatibility deprecated

Link: http://thephp.cc/news/2015/01/php-breaks-backwards-compatibility

Loosely Coupled Podcast:
Episode 18 Best Practices
January 28, 2015 @ 09:15:16

The Loosely Coupled podcast, hosted by PHP community members Jeff Carouth and Matt Frost, has posted their latest episode - Episode 18: Best Practices. In it they talk about "best practices" as it relates to teams and working with other developers.

In this episode Jeff and Matt will talk about their experiences of getting teams moving on good practices. They will cover times when it has been challenging to convince higher-ups the value of doing certain things, all the way to how to go about changing teams by example. This episode is sponsored by our friend, Coderabbi, who is currently on the Wisdom as a Service World Tour 2015.

You can listen to this latest episode either through the in-page audio player or by downloading the mp3. If you enjoy the show, be sure to check out previous episodes and subscribe to their feed.

0 comments voice your opinion now!
looselycoupled podcast ep18 bestpractices teams teamwork

Link: http://looselycoupled.info/blog/2015/01/26/episode-18-best-practices/

Community News:
Packagist Latest Releases for 01.28.2015
January 28, 2015 @ 08:05:54

Recent releases from the Packagist:
0 comments voice your opinion now!



Community News:
Recent posts from PHP Quickfix
January 28, 2015 @ 07:01:31

Recent posts from the PHP Quickfix site:
0 comments voice your opinion now!



php[architect]:
January 2015 Issue Released - Be the Boss
January 27, 2015 @ 13:18:45

php[architect] magazine has just released their January 2015 issue - "Be The Boss". This issue includes articles talking about freelancing, the importance of communication in open source and the usual columns.

This month is a personal favorite of mine, as the theme is "Be the Boss". It speaks to those who wish stop working as an employee and strike out on there own, something I've done twice in my life. In Get Off the Freelance Roller Coaster!, Yitzchok Willroth (@coderabbi) talks on the importance of not placing all of your eggs in one basket (or projects with one vendor). In Choose Your Own Adventure-Freelancer or Founder?, Joshua Warren talks about the two avenues that are open to those going it on their own, freelancer or business founder.

Articles in this month's edition include:

  • Get Off the Freelance Roller Coaster! (Yitzchok Willroth)
  • Choose Your Own Adventure - Freelancer or Founder? (Joshua Warren)
  • PHP and OS Communication (Julien Pauli)
  • An Introduction to NodeJS

The usual columns (Laravel Tips and Education Station) return once again as well as a a new one from David Stockton called "Leveling Up" to help you become a better developer. You can pick up your own copy from the php[architect] website.

0 comments voice your opinion now!
phparchitect magazine jan2015 issue release boss freelance

Link: http://www.phparch.com/magazine/2015-2/january/


Community Events





Don't see your event here?
Let us know!


release list language unittest introduction framework version interview opinion api laravel threedevsandamaybe conference voicesoftheelephpant series podcast composer configure symfony community

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework