News Feed
Sections




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

Cees-Jan Kiewiet:
AWS PHP SDK Asynchronously
June 30, 2015 @ 11:31:15

Cees-Jan Kiewiet has a new post today talking about some interesting trickery he was able to do with the AWS (Amazon Web Services) PHP SDK to allow requests to be made asynchronously.

Just got off the AWS SDK for PHP Office Hour hangout and it was great talking with both team members Jeremy and Michael. And one of the things we talked about was async access to the AWS services using the PHP SDK. The goal of this post is to get the AWS PHP SDK client working asynchronously.

He starts with brief instructions on getting the SDK installed (via Composer) along with a library of his own that brings in a few other dependencies. The ReactPHP event loop is what makes the asynchronous connections possible. He includes the code to create the new handler stack and how to use it to make the asynchronous calls. A demo screencast is also included in the post to illustrate the output from a simple set of requests.

0 comments voice your opinion now!
aws amazon sdk asynchronous connection reactphp event loop tutorial

Link: http://blog.wyrihaximus.net/2015/06/aws-php-sdk-asynchronously/

SitePoint WordPress Blog:
The WordPress Plugin Boilerplate Part 2 Developing a Plugin
June 30, 2015 @ 10:07:50

The SitePoint WordPress blog has posted the second part of their series covering the creation of a WordPress plugin with the help of the WordPress Plugin Boilerplate. In this latest article they build on the first part of the series and start in on the actual plugin development.

In the first part of my series, an introduction to the WordPress Plugin Boilerplate, we looked at how the code is organised within the Boilerplate. To continue with this series, we'll apply what we've learnt previously to build a real working plugin. We are going to take a look at how quickly we can get our plugin up and running using the Boilerplate code, with as little work as possible. This article will focus on creating and activating the plugin, as well as developing the admin facing functionality of the plugin.

They show you how to create a simple "time since posted" plugin with a few customizations available. They show how to use the Boilerplate generator to set up the basic plugin file structure and installing it on your WordPress application. From there they show you how to create a simple "Settings" page for the plugin and making it work via the functionality Boilerplate offers. The post then shows how to register the plugin, populate the options page and saving the changes the user makes.

0 comments voice your opinion now!
wordpress boilerplate plugin generator tutorial development lastposted

Link: http://www.sitepoint.com/wordpress-plugin-boilerplate-part-2-developing-a-plugin/

PHPClasses.org:
Book Review - Modernizing Legacy Applications In PHP
June 30, 2015 @ 09:39:59

The PHPClasses.org site has posted a book review of Paul Jones' "Modernizing Legacy Applications" ebook today covering some of the content in the book and the reviewers own personal opinions on what was good and what could use improvement.

The current technologies we have today and the numerous improvements to the PHP programming language, makes our legacy applications operate "below today's standards". They need to be improved or rewritten, but who would want to rewrite an application of many thousands or millions of lines of code?

That's why you should read this book, 'Modernizing Legacy Applications in PHP' by Paul M. Jones. It explains the nitty-gritty of how PHP applications were built over a decade ago and why they are now called legacy applications. He explains why your legacy applications are not meant to be rewritten, but optimized and improved to support today's standards.

The reviewer goes through each chapter of the book, giving an overview of each including topics discussed and a few of the handy tips. Overall he recommends the book not only to those experienced in the industry but also those new to developing in PHP, helping to prevent bad behaviors before they start.

0 comments voice your opinion now!
bookreview phpclasses modernizing application pauljones

Link: http://www.phpclasses.org/reviews/id/mlaphp.html

Voices of the ElePHPant:
Interview with Sammy K. Powers
June 30, 2015 @ 08:50:28

The Voices of the ElePHPant podcast, hosted by Cal Evans has posted their latest episode featuring yet another interview with a member of the PHP community. In this latest episode Cal talks with Sammy Powers.

Cal and Sammy talk about his PHP Roundtable podcast and why he (Sammy) started it up. Cal also asks Sammy his opinion of the PHP community as he's a relatively new addition to conferences and the wider community as a whole.

You can listen to this latest episode either through the in-page player or by downloading the mp3. You can also subscribe to their feed to get the latest episodes as they're released. Also be sure to check out the PHP Roundtable podcast!

0 comments voice your opinion now!
voicesoftheelephpant community interview sammykpowers podcast

Link: https://voicesoftheelephpant.com/2015/06/30/interview-with-sammy-k-powers/

Community News:
Latest PECL Releases for 06.30.2015
June 30, 2015 @ 07:05:43

Latest PECL Releases:
  • SeasLog 1.2.0 - Fixed SeasLog::analyzerDetail() function compatible with MAC - Fixed memory leak - Support windows

  • hprose 1.5.5 Use zend_ce_throwable introduce in 7.0.0alpha2.

  • rrd 2.0.0beta3 - better default time parameter handling for RRDUpdater:update - zend_string in zend_parse_parameter if possible - 'p' for paths in zend_parse_parameter (remi) - zend_object must be the last member of the own object struct - uggh - (remi) - PHP_FE_END instead of 3 times NULL in zend_function_entry - uggh - (remi) - zend_object_properties_size() usage (remi) - size_t for string parameters length (remi) - huge thanks to remi :)

0 comments voice your opinion now!



Laravelista.com:
JSON Web Token Authentication for Lumen
June 29, 2015 @ 12:07:36

The Laravelista.com site has a new tutorial posted showing you how to integrate JSON Web Tokens (JWT) into a Lumen application. JWTs provide a simple, portable way to share authentication and session information in a more robust way than just a single randomly generated token.

This is my third post on how to build an API with Fractal, but in this post I will be focusing on authentication using JWT (JSON Web Tokens). [...] In Build an API with Lumen and Fractal I have shown you a way of creating an API using Lumen and Fractal. In this post we will continue with the same project called Treeline and implement authentication and protected routes. Also at the very end of the post is a small chapter on when to use Lumen over Laravel.

They make use of the tymon/jwt-auth library to handle the actual JWT functionality including a service provider making it simple to integrate. They talk about "improving Lumen" by adding a configuration directory for the JWT package to put its configuration file. From there they add in the necessary facades and configuring the library itself. Next comes the actual authentication handling that, post login, generates the token and resending it along with each response. Finally, they show you how to set up the protection on routes and verifying the token contents on each request.

0 comments voice your opinion now!
lumen tutorial jsonwebtoken jwt tutorial integration provider authentication

Link: http://laravelista.com/json-web-token-authentication-for-lumen/

Aaron Piotrowski:
Throwable Exceptions and Errors in PHP 7
June 29, 2015 @ 11:45:32

Aaron Piotrowski has a new post to his site talking about a feature of the next major release of the PHP language (PHP 7) around error and exception handling: working with throwable exceptions and errors.

Handling fatal errors in the past has been next to impossible in PHP. A fatal error would not invoke the error handler set by set_error_handler() and would simply halt script execution.

In PHP 7, an exception will be thrown when a fatal and recoverable error (E_ERROR and E_RECOVERABLE_ERROR) occurs, rather than halting script execution. Fatal errors still exist for certain conditions, such as running out of memory, and still behave as before by immediately halting script execution. An uncaught exception will also continue to be a fatal error in PHP 7. This means if an exception thrown from an error that was fatal in PHP 5.x goes uncaught, it will still be a fatal error in PHP 7.

He goes on to talk about the new interface that both Fatals and Errors implement to make catching them possible in PHP7: Throwable. He provides an example of what the interface would look like in PHP code and how to catch them (a simple try/catch). He then gets into each of the types and looks at the error and exception types they cover including TypeError, ParseError and AssertionError. He also includes an interesting part at the end of the post showing you how to write your error/exception handling to work correctly with both PHP 5 and PHP 7 at the same time.

0 comments voice your opinion now!
throwable exception error php7 catch try interface introduction

Link: https://trowski.com/2015/06/24/throwable-exceptions-and-errors-in-php7/

SitePoint PHP Blog:
Mobile App Development with Zend Studio
June 29, 2015 @ 10:14:41

On the SitePoint PHP blog they've posted a new tutorial from Daniel Berman about using Zend Studio to create mobile applications in the same interface you're using (if you're a Zend Studio user) to create your PHP applications.

The world has turned mobile. This is not new, and it should therefore be no surprise to anyone that the results of the 2015 DevPulse survey by Zend show that a vast majority of PHP developers are working on, or intend to work on, mobile apps.

Mobile app development poses many challenges for developers, one of which is tying in the front end of the mobile application with the back-end web service APIs. This tutorial describes how to simultaneously create, test and modify both the front and back end of a modern mobile app using Zend Studio's mobile development features.

He breaks the rest of the post up into several steps to help you get a simple mobile project up and running, complete with a basic Apigility API backend:

  • Creating a Cloud Connected Mobile Project
  • Previewing your App
  • Developing the Back-End APIs
  • Developing the Front-End
  • Testing as an Android Native App
  • Exporting a Native Application Package

The end result is a simple "cloud connected" application that can be installed directly on an Android device as a ".apk" package.

0 comments voice your opinion now!
tutorial mobile application zendstudio android api apigility

Link: http://www.sitepoint.com/mobile-app-development-zend-studio/

Matt Stauffer:
Sublime Text (3) for PHP Developers
June 29, 2015 @ 09:25:55

Matt Stauffer has posted a set of helpful hints for developers using Sublime Text (3) to help make them more efficient and writing code much easier.

A lot of folks in the PHP community have been checking out PHPStorm lately, including myself and most of the developers I work with. We love the code intelligence we get from PHPStorm, but still miss the speed, quick boot-up, and convenience of Sublime Text. Before I blindly assume PHPStorm is the only way to go, I wanted to see: Can I bring the things a PHP-focused IDE provides PHP developers back to Sublime Text and get the best of both worlds?

He starts with a list of "must haves" for him to be able to move from PHPStorm, features it provides that Sublime, an editor not IDE, might not come with out of the box. Most of his suggestions use the Package Control functionality in Sublime so you'll need that installed to try out his examples. He then shows several tools you can install including:

  • Sublime PHP Companion (package)
  • AllAutocomplete (package)
  • Cmd-click for function definition
  • Integrating Code sniffing and PHP_CodeSniffer
  • DocBlockr (package)
  • Git helpers

...and many more. If you're a Sublime Text user, definitely take a look at his list and see if you can find something to help make your development easier.

0 comments voice your opinion now!
sublimetext phpstorm editor ide features package tips integration

Link: https://mattstauffer.co/blog/sublime-text-3-for-php-developers

That Podcast:
Episode 20 The one where we don't really prefer this over that
June 29, 2015 @ 08:16:04

That Podcast, hosted by PHP community members Beau Simensen and Dave Marshall has posted their latest episode: Episode #20, The one where we don't really prefer this over that.

Beau and Dave get in to PSR-7 and how we might be doing middlewares, framework or no framework, container PSR or not and a whole bunch of other stuff as usual.

Other topics mentioned in this episode include: Gun.io, Yuml.me, the MySQL workbench and Homebrew. There's also several mentions of other community members including Jeremy Lindblom, Brian Fenton, Erica Heidi and Dustin Wheeler. You can listen to this latest episode either using the in-page player or by downloading the mp3 directly. If you enjoy the show, be sure to subscribe to their feed too!

0 comments voice your opinion now!
thatpodcast ep20 podcast beausimensen davemarshall prefer

Link: https://thatpodcast.io/episodes/episode-20-the-one-where-we-don-t-really-prefer-this-over-that


Community Events

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


composer interview api laravel series symfony project yii2 example framework introduction list part2 programming community podcast application language php7 opinion

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