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 Web Blog:
On Our Radar PHP 7 Controversy and Dependency Injection
February 17, 2015 @ 09:08:39

The SitePoint Web blog has a recent post with two things that are on the radar when it comes to PHP - the upcoming PHP version and the practice of dependency injection.

To change things up a bit, we're going to start bringing to you items and information from those discussions that have caught our attention. Sometimes these discussions will be useful and interesting, and sometimes they may be challenging or insightful. Either way, they're likely to bring new information to light that you haven't come across before, and will help to provide insight and perspective on topics you're interested in.

He starts with an overview of the controversy surrounding PHP 7 including its name, feature removal and links to some responses to the proposed changes. The second topic, dependency injection, how it might be evil and some of the opinions that have been expressed around it.

0 comments voice your opinion now!
php7 controversy dependency injection di version

Link: http://www.sitepoint.com/radar-php-7-controversy-dependency-injection-troubles/

NetTuts.com:
What's New in Laravel 5
February 13, 2015 @ 10:24:47

The NetTuts.com site has a new post today sharing some of what's new in Laravel 5, the latest release of the popular PHP framework. Version 5 was announced back on February 5th.

The PHP community has recently been blessed with a new release of one of its most loved frameworks, Laravel. Version 5.0.1 is a major release, so not only are there some great new features available, but the architectural foundations of the framework have also been altered to some extent. So, without any further ado, I am going to dive right into the framework and show you all the good things the latest release has to offer.

He touches on a few of the main differences between version 5 and the previous versions including:

  • Differences in directory structure
  • How method injection is handled
  • The use of contracts (interfaces)
  • Route caching and middleware
  • Authentication changes
  • Events and commands

There's more on his list, each with a description and sometimes a bit of code to help explain the changes. Check out the full post for the remainder of the list and details on those listed above.

0 comments voice your opinion now!
laravel5 framework version whatsnew update upgrade list

Link: http://code.tutsplus.com/tutorials/whats-new-in-laravel-5--cms-21842

thePHP.cc:
PHPUnit 4.5 and Prophecy
February 06, 2015 @ 13:56:21

On thePHP.cc blog today Sebastian Bergmann has posted about the new release of PHPUnit (4.5) and how it now comes with support for the Prophecy mocking tool.

PHPUnit has had built-in support for creating test doubles for many years. This implementation was originally inspired by the first generation of mocking frameworks for Java. Since then mocking frameworks have evolved. Modern mocking frameworks are more intuitive to use, lead to more readable code, and may even allow for a clear separation of a test double's configuration and the actual test double object itself.

Like many users of PHPUnit I am not satisfied with the API of PHPUnit's own mocking framework. This dissatisfaction has lead to the development of alternative mocking frameworks for PHP such as Mockery, Phake, or Prophecy. If I were to create a new mocking framework today it would probably look a lot like Prophecy. Which is why PHPUnit 4.5 introduced out-of-the-box support for it.

He gets into some of the basics of the Prophecy tool and how it handles mocking differently than the current internal mocking PHPUnit provides. Some code examples are included showing dummies, stubs and mocks with an example of the output when some of the "predictions" have failed.

0 comments voice your opinion now!
phpunit version upgrade prophecy mock dummy stub framework

Link: http://thephp.cc/news/2015/02/phpunit-4-5-and-prophecy

Community News:
Laravel 5 Released
February 04, 2015 @ 11:16:24

According to this new post on the Laravel News site the latest major version of the Laravel framework has been released - Laravel 5.

Several new features come in this release including:

  • A new, more granular directory structure
  • Changes to the Blade templating library
  • The introduction of Contracts for core services
  • Commands & Events
  • Routing updates
  • Controller method injection

...and plenty more. You can find out about all of these new features (along with some code examples) in this release announcement on the Laravel News site.

0 comments voice your opinion now!
laravel framework laravel5 release version announcement

Link: https://laravel-news.com/2015/01/laravel-5/

Liip Blog:
New Relic extension for HHVM updated to latest version
January 20, 2015 @ 10:04:14

In his latest post to the Liip blog Christian Stocker points out that the New Relic extension for HHVM has been updated for the latest versions of HHVM to work a bit more seamlessly.

Since HHVM 3.4 it's theoretically possible to have your own external profiler for function level profiling (like xhprof or xdebug) without having to recompile HHVM itself. Unfortunately it wasn't perfect (or I couldn't make it running), but there's a patch in the master branch now (the upcoming 3.6), which seems to solve that problem. So I worked a little bit on my extension in the last few days and I adjusted a lot of things and improved some other stuff.

He talks about the improvements New Relic has made on their functionality and some slowness that still exists in the "hotprofiler". He points out, however, that if you just want overall statistics and not specific, method level ones, you don't really even need to use it. He offers a word of caution when using his extension and when it may fall back to "userland level profiling" instead.

0 comments voice your opinion now!
liip hhvm newrelic extension update version release

Link: http://blog.liip.ch/archive/2015/01/19/new-relic-extension-for-hhvm-updated-to-latest-version.html

Anthony Ferrara:
Being A Responsible Developer
December 30, 2014 @ 09:04:17

In his latest post Anthony Ferrara is back with more discussion around the "only supporting the latest versions" debate (here is the previous article). In this new post he talks about being a "responsible developer" and how that relates to keeping your software up to date.

The general consensus [shared during a DevHell and PHPTownHall Mashup ] was that as an ideology, only supporting latest versions is correct. From a practical standpoint though they said that it's unrealistic. That there are tons of legacy systems out there that are running just fine and can't justify the cost of upgrading. So they shouldn't have to upgrade "for ideological reasons". From one point of view, this certainly makes sense. [...] This point of view disturbs me deeply. And it further disturbs me that it came from the same person who preaches for testing.

He makes the connection between being responsible and the software upkeep through testing. He points out that the real effectiveness of automated testing is in preventing regressions - that is, when software is updated, that bugs don't reappear. He then goes on to share his opinion on some of the other arguments presented in the recording like the "if it ain't broke, don't fit it" and security issues topics. He also shares some number of the reality of what can happen if software is not up to date (or even patched) and how this circles back around to his previous points about software versions driving the OS and PHP versions forward.

0 comments voice your opinion now!
responsible developer opinion software version upgrade support

Link: http://blog.ircmaxell.com/2014/12/being-responsible-developer.html

Anthony Ferrara:
On PHP Version Requirements
December 22, 2014 @ 10:13:59

In his latest post Anthony Ferrara talks about PHP version requirements and how it's a bit of "chicken and egg" problem. If hosting providers are slow adopting even PHP 5.4, can we realistically bump up the minimum to PHP 5.4+ and potentially shun users not at that level yet?

Most people agreed with me [saying new software with a PHP requirement <= 5.2 is beyond irresponsible, it's negligent], saying that not targeting 5.4 or higher is bad. But some disagreed. Some disagreed strongly. So, I want to talk about that.

[...] Now, these are pretty interesting arguments. It boils down to making the logical argument that if hosts don't support 5.4+, then moving to require 5.4+ would leave the users who use those hosts abandoned. And some projects don't want to abandon users. It's a warm and logical idea; Open your arms to everyone, and include them all. Don't leave anyone behind. Really, it's a good argument. The problem is, is it based on a flawed premise...?

He suggests that it sounds somewhat like an appeal to emotion and that by enforcing a bump up like this would be "abandoning the users". He gets into some of the statistics he worked up regarding PHP versions, WordPress usage and how, because of these large numbers, hosting companies would make the move if only for business reasons. He talks about the "Go PHP5" initiative and the impact it made on versions supported across the board. He also looks at some of the reasons why keeping up with these versions is good for the hosting companies too: security, education of users and the new features that come with later versions.

So I put this to you, WordPress, CodeIgniter and every other CMS and Framework still supporting PHP 5.2 and 5.3 (and earlier versions): Step up and lead. Step up and be the change you want to see. Don't follow and react, lead and be proactive. After all, if we can move forward together, we can all benefit. But if we walk separate paths, we build walls and we all lose...
0 comments voice your opinion now!
version requirements opinion hosting project support

Link: http://blog.ircmaxell.com/2014/12/on-php-version-requirements.html

Matthieu Napoli:
Test against the lowest Composer dependencies on Travis
December 18, 2014 @ 10:53:58

Recently the "prefer-lowest" option of Composer was mentioned in relation to testing for Symfony-based applications. In this new post to his site Matthieu Napoli shows how you can do it on any project that uses the Travis-CI continuous integration service.

Composer just got a new awesome addition thanks to Nicolas Grekas: prefer the lowest versions of your dependencies. [...] This amazing option will install the lowest versions possible for all your dependencies. What for? Tests of course!

He includes all the instructions you'll need to get your Travis build using this command line option, starting with testing it on your own system first. He shows a basic ".travis.yml" file with the configuration you'll need to provide it use the "prefer-lowest" (check out line 17). He does point out that you'll need to run a "composer self-update" first though, as Travis hasn't quite caught up with the latest Composer that includes this option.

0 comments voice your opinion now!
test lowest dependency version composer travisci tutorial

Link: http://mnapoli.fr/test-lowest-dependencies/

Symfony Blog:
Testing minimal versions of Symfony requirements
December 17, 2014 @ 12:02:47

On the Symfony blog today there's a quick tip from Nicolas Grekas about using Composer to install a Symfony2 project and the definition of minimum version requirements.

Setting up Composer package versions for complex projects is not an easy task. For starters, there are a lot of different ways to define package versions. Then, you must check that declared package versions really work when installing or updating the project, specially for the minimal versions configured. In order to improve testing the minimal versions of Symfony Components requirements, Composer now includes two new options: prefer-lowest and prefer-stable. [...] Thanks to these two new options, it's really easy to check whether your project really works for the minimal package versions declared by it.

He includes definitions of what impact each of the options has on the packages Composer installs and the work that's been done recently to define the correct package versions for the 2.3, 2.5 and 2.6 branches of Symfony. He also offers some steps to follow in your own projects to ensure that the "prefer-lowest" packages installed work correctly.

0 comments voice your opinion now!
symfony framework package version preferlowest preferstable

Link: http://symfony.com/blog/testing-minimal-versions-of-symfony-requirements

Lee Blue:
PHP vs Ruby - Application Shelf Life
December 10, 2014 @ 13:19:15

Lee Blue has started up a series of posts talking about his reasoning for moving back to PHP from Rails in his applications. In his first post of the series, he looks at application "shelf life" and the overall lifespan of the project and how that relates to things like maintainability and upgrade handling.

I plan to write a series of posts about how we develop, deploy, and support our affiliate software and digital downloads applications. And why, after 5 years of Ruby on Rails development we switched back to PHP. One of the reasons is what I refer to as the shelf life of a web application. Let's talk about what happens to a web application if you just let it sit.

He talks about the "rotting on the vine" that one of his clients' Rails 1.0 application faced when the later versions of the Ruby on Rails framework. He talks about how these kinds of upgrades cost money (and time) and how, with the right selections for the deployment stack, some of the costs could be alleviated. He gives the example of a PHP-based deployment setup and how much of the related technology has been stable and (mostly) unchanging over the years, just with new features being added. He offers a few suggestions to avoid this "app rot" and things startups/freelancers can do to help prevent it in their clients' applications.

0 comments voice your opinion now!
ruby shelflife application rot version deployment stack opinion rubyonrails

Link: http://leehblue.com/php-vs-ruby-application-shelf-life/


Community Events

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


extension introduction language podcast development api framework laravel wordpress release voicesoftheelephpant opinion community psr7 video series interview laravel5 library unittest

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