News Feed
Sections




News Archive
feed this:

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

SitePoint PHP Blog:
PHP7 Resource Recap
April 30, 2015 @ 09:46:10

With all the talk about PHP7 and the features that are coming with it, it's easy to get lost in the mound of information. Thankfully, the SitePoint PHP blog is here to help. They've posted a roundup of several PHP7-related resources you can use to sort things out (or start learning about) what's to come.

PHP 7 is well on its way. RFCs are being implemented and polished, projects are being tested, libraries upgraded. Extensions are being modified, and the word is spreading. All that remains is getting the shared hosts on the upgrade bandwagon - the arguably most difficult part of improving the global state of PHP. In this article, we'll take a look at some of the most important PHP 7 related resources and tips you should go through in preparation for the new version.

Mentions in their list include both tutorials and tools including the PHP7 Vagrant box provided by Rasmus Lerdorf and the Go PHP7 Extensions effort to update extensions to be PHP7 ready. Following this there's serveral links to other important reading about what to expect and results of testing done with this upcoming version.

0 comments voice your opinion now!
php7 resource recap summary tool article tutorial

Link: http://www.sitepoint.com/php7-resource-recap/

ServerGrove Blog:
Useful Linux command-line tools to work with PHP projects
April 24, 2015 @ 11:16:20

The ServerGrove blog has posted a new tutorial with a selection of useful command line tools to help you in working with your PHP applications. None of them are PHP specific but are Unix-based commands that can help in every day development.

Linux provides a lot of interesting command-line tools that we can use when working with PHP projects. In this post we give you some useful commands.

They include examples of commands that can help with:

  • Find all PHP files in the current directory
  • Check the syntax of all PHP files in the current directory
  • Get the size of each Composer dependency
  • Find suspicious PHP files
  • Find files with abstract classes
  • List PHP settings for the xdebug extension
  • Find empty files and/or directories
  • List files currently open by a PHP process

As mentioned, most of the tools themselves are not PHP specific but these example commands do relate to things that are more in a PHP context.

0 comments voice your opinion now!
useful linux commandline tool context example list

Link: http://blog.servergrove.com/2015/04/23/useful-linux-command-line-tools-work-php-projects/

Community News:
Run Geek Radio Launched & Episode 1 (Podcast)
April 21, 2015 @ 10:48:36

Adam Culp, well-known PHP community member and organizer of both the Sunshine PHP conference and ZendCon, has started up a new podcast that's targeted at blending the two things he enjoys most - geeky "stuff" and running.

My plans behind the podcast is to bring together two things I love to do…programming, and running. It only makes sense that I would want to share in both areas, and a podcast is a great way to do that. With the resurgence of podcasts lately I felt a little bit of peer pressure to attempt my own, and so far I have received wonderful reviews from PHP developers who also run, or runners who are also programmers.

You can find out more about the show over on rungeekradio.com or just tune in to the first episode and see what you think. This first show deals with conferences, user group talks and performance audit tools. If you enjoy the show, be sure to subscribe to the feed to get more episodes as they're released.

0 comments voice your opinion now!
rungeekradio ep1 podcast running technology conference usergroup performance audit tool

Link: https://rungeekradio.com/episode001/

Pádraic Brady:
Introduction to Humbug A Mutation Testing Framework for PHP
April 08, 2015 @ 09:34:13

While he's mentioned it in other posts to his site, Pádraic Brady has officially posted an Introduction to Humbug to his site today. Humbug is a mutation testing framework that lets you determine the actual effectiveness of your unit tests through "mutation testing" methods.

You may already be familiar with the concept. In Mutation Testing, defects which emulate simple programmer errors are introduced into source code (your canonical code is untouched) and the relevant unit tests are run to see if they notice the defect. The more defects that are noticed, the more effective the test suite is presumed to be. The methodology relies on the theory that a quantity of relatively simple defects, either in isolation or combined, provide as much useful information as would a series of more complex defects.

He talks about the differences between mutation testing and the more traditional code coverage metrics. He points out that code coverage, while a decent high-level metric, should never be used as a quality metric. Using Humbug allows you to determine the real effectiveness and "coverage" of what you're testing. He then gets into how to use the tool, outlining:

  • Installation of the library as a phar
  • Generating a configuration file
  • Execute the command to run your tests (to ensure they're passing) and execute the mutation testing

The execution is broken into several stages: executing your tests for passing, breaking up the source into tokens to determine mutability, replacement of content with mutations in a temporary version of the source and a final execution of the test suite to determine the mutation results. He includes some example output from the tool on a moderately large codebase and how to interpret these results. He ends the post talking about the logs that Humbug generates, the overall performance of the tool and an experimental feature that's in the works called "Incremental Analysis".

0 comments voice your opinion now!
humbug mutation testing framework tool library introduction example

Link: http://blog.astrumfutura.com/2015/04/introduction-to-humbug-a-mutation-testing-framework-for-php/

Derick Rethans:
Xdebug 2.3 Munging errors
March 10, 2015 @ 09:15:47

Derick Rethans has posted a new part of his series looking at the improvements that came with the latest Xdebug release (v2.3). In this new article he talks about error handling and intercepting them to make debugging simpler.

One of the first features I added to Xdebug was the interception of error messages, so that it was possible for me to include a stack trace. Xdebug 2.3 has a few additional settings to control the behaviour of interception.

He covers the addition of three new settings: xdebug.halt_level, force_display_errors and force_error_reporting. Each of these is designed to provide you with customizable error reporting. Each setting comes with an example of its configuration and how it modifies the output of the resulting errors.

0 comments voice your opinion now!
xdebug error haltlevel force reporting display debugging tool

Link: http://derickrethans.nl/xdebug-2.3-error-munging.html

Benjamin Eberlei:
Integrate Symfony and Webpack
February 26, 2015 @ 10:21:40

In his latest entry Benjamin Eberlei shows how he integrated Symfony and Webpack, a tool that makes it simpler to package up multiple assets (like Javascript or CSS files) and reduce them down to combined files, reducing the overhead on page loads.

Asset Management in Symfony2 is handled with the PHP based library Assetic by default, however I have never really connected to this library and at least for me it usually wastes more time than it saves. [...] While researching about React.JS I came across a tool called Webpack which you could compare to Symfony's Assetic. It is primarily focussing on bundling Javascript modules, but you can also ship CSS assets with it.

He talks about some of the main benefits to using the Webpack tool including a built-in web server to serve up the assets and a "hot reload" plugin that refreshes when assets change. He then gets into a more practical example, showing how the tool works with a typical asset structure in a Symfony application. He shows how it uses the internal server to prevent the need for a complete rebuild each time. He also shows how to install and configure it through Symfony and loading the Javascript file in your Twig template. Finally he shows how to run a build, the resulting output and the integration he mentioned with React.js.

0 comments voice your opinion now!
symfony asset webpack tool tutorial introduction configuration install

Link: http://www.whitewashing.de/2015/02/26/integrate_symfony_and_webpack.html

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

Kevin Schroeder:
Realtime logging for Magento
January 14, 2015 @ 09:47:54

Kevin Schroeder has a new post to his site talking about real-time Magento logging and a library he's worked up to make it possible.

Ever since the Zend Developer Cloud started up it stirred in me some really interesting possibilities of what could be done. Sadly they never happened, but the ideas remained. If that doesn't inspire you it's because I'm not describing what I have in my head. I don't have the time to do that. But this blog post is one part of it. One of the things that is part of what I envision is a realtime logger that shows what is happening, as it is happening. [Zend Server ZRay is] a cool feature but doesn't quite go as far as I have in mind.

With that in mind I spent some time last week working on a very small piece of this vision for Magento. I wrote it really, really quickly and so don't laugh when you look at the code and see obvious errors.

The library makes use of Magento extension and a command line program that uses a combo of Redis and PubSub for messaging back to the waiting logger. It hooks into all Magento events and allows for writing to the log from just about anywhere. It also includes a SQL profiler that will evaluate requests either in real-time or at the end of the request. He provides some additional details about the "watcher" command line tool and explanations for each of its options.

0 comments voice your opinion now!
magento realtime logging library commandline tool

Link: http://www.eschrade.com/page/realtime-logging-for-magento/

Developer Drive:
Simplify your documentation process with Couscous
December 19, 2014 @ 12:14:49

On the Developer Drive site today there's a quick post introducing you to Couscous, a PHP-based documentation generation tool. Couscous translates your Markdown files into HTML output that's professional and clean looking.

If there's one thing I hate more than tracking down bugs, it's documenting code. It takes forever, it's almost a project in itself, and I never seem to factor it into my project lifecycle. Setting out to solve that problem for me, and anyone else whose life is too short, is Couscous. Couscous takes markdown files and converts them into professional standard HTML docs that colleagues, or fellow developers, can easily follow. You can preview the resulting site on your local machine, correct any issues, and then deploy straight to GitHub where it will be hosted for you.

They walk you through the (brief) process of getting the tool installed via Composer and using it to show you a preview of your documentation. The "deploy" command then allows you to easily deploy the results out to a GitHub Pages location on the gh-pages branch. You can find out more about Couscous on the project website.

0 comments voice your opinion now!
documentation couscous tool markdown generate html output

Link: http://www.developerdrive.com/2014/12/simplify-your-documentation-process-with-couscous/

SitePoint PHP Blog:
Getting Started with Medoo - Examples of Use
December 18, 2014 @ 09:45:26

On the SitePoint PHP blog, there's a new tutorial that introduces you to the Meedoo library, a tool to make working with databases even easier. In this tutorial Wern Ancheta walks you through some of the basics of the tool and shows you how to use it with a Pokemon-based example.

In this article I'm going to walk you through Medoo, a lightweight database abstraction library for PHP. Its main features include: support for multiple databases, being secure and easy to use. [...] While Medoo is nothing revolutionary, and the fact that it sports a very small filesize matters little to few, it's still an interesting project that went from being outright dismissed to vaguely accepted, as evident in these threads. It's on its way up, and that's our reason for taking a look at it.

Once installed (he recommends using Composer) you can follow along with his examples showing how to connect to the database, make a simple select and define something a bit more complex (like multiple other requirements in the SQL statement's "where"). He shows how to execute manual queries and handling more complex operations like joins. He then gets into the other parts of the usual CRUD handling - inserting new data, updating data and deleting data.He finishes the post by mentioning aggregate functions and some of the debugging options the tool includes.

0 comments voice your opinion now!
medoo database tutorial library tool crud complex

Link: http://www.sitepoint.com/getting-started-medoo-examples-use/


Community Events

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


api laravel symfony2 podcast interview performance community voicesoftheelephpant application release conference configure composer introduction framework example series php7 opinion library

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