News Feed
Sections




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

SitePoint PHP Blog:
How to Install Custom PHP Extensions on Heroku
September 29, 2014 @ 14:24:56

The SitePoint PHP blog has a tutorial posted for the Heroku users out there showing you how to install custom PHP extensions on the service as a part of your deployment. Heroku is a platform-as-a-service hosting provider that allows for flexibility in the architecture of your systems and spin up/tear down to happen easily and on demand.

In this tutorial, we'll learn how to install custom extensions on Heroku. Specifically, we'll be installing Phalcon.

He walks you through creating an account on Heroku first and getting the Heroku toolbelt system installed for your operating system. He then starts in on the Phalcon (a C-based PHP framework) installation including all needed supporting packages/extensions. He uses the PHP buildpack and creates a shell script that is executed when the deployment happens. He includes the commands and configuration to handle the deployment and test the resulting installation.

0 comments voice your opinion now!
heroku tutorial custom extension phalcon deploy paas

Link: http://www.sitepoint.com/install-custom-php-extensions-heroku/

That Podcast:
Episode 7.5 The Short One in London
September 29, 2014 @ 13:52:09

That Podcast has posted their latest episode today, a shorter add-on to their previous episode (#7): Episode 7.5, "The Short One in London".

Beau and Dave recap SymfonyLive London 2014 in their first live in person recording.

Topics mentioned in this episode include Mybuilder.com, Behat, Drupal and Game of Thrones (along with several members of the community). You can listen to this latest episode either through the in-page player or by downloading the mp3 of the show. If you enjoy the show, check out others in their list and be sure to subscribe to their feed for the latest as they're released.

0 comments voice your opinion now!
thatpodcast ep7.5 short one london symfonylive live recording

Link: http://thatpodcast.io/episodes/episode-7-5-the-short-one-in-london/

Mattias Noback:
Backwards compatible bundle releases
September 29, 2014 @ 12:31:09

In his latest post Matthias Noback talks about a problem common to Symfony bundles (and, well, software in general) - dealing with backwards compatibility and breaks that could be introduced with new changes.

With a new bundle release you may want to rename services or parameters, make a service private, change some constructor arguments, change the structure of the bundle configuration, etc. Some of these changes may acually be backwards incompatible changes for the users of that bundle. Luckily, the Symfony DependenyInjection component and Config component both provide you with some options to prevent such backwards compatibility (BC) breaks.

He breaks the post up into a few different kinds of backwards compatibility breaks that could happen and code examples of each:

  • Renaming things
  • Changing visibility
  • Changing values

Each topic also includes methods for preventing issues with older users who maybe aren't using the new features. This includes things like sane default values for new settings, renaming services and creating new extensions for working with new properties.

0 comments voice your opinion now!
symfony bundle backwards compatibility changes prevent rename visibility values

Link: http://php-and-symfony.matthiasnoback.nl/2014/09/backwards-compatible-bundle-releases/

Mathias Verraes:
Objects as Contracts for Behaviour
September 29, 2014 @ 11:10:33

Mathias Verraes has a new post to his site today with an interesting idea when it comes to handling the architecture of an application: using objects as the contracts for behavior. He suggests that the objects themselves define how other pieces of code should interact with them, not necessarily external services. He illustrates with an invoice and appointment example.

Of course invoices do not pay themselves, but that's not what an object model is trying to do. An invoice exposes the behaviour of being able to be paid. That ability is in fact essential to what it means to be an invoice. The behaviour is an inherent property of an invoice. If an invoice doesn't have the ability of being paid, there's no point in issuing invoices at all. In other words, the contract of an invoice object declares that its interface includes payment as a feature. Its promise to the outside world is that it allows an outsider to pay for it. Encapsulation of state and behaviour is the core idea behind objects.

He wonders why, if this is more true to the "object-oriented programming" ideals, the idea of encapsulating procedural code as objects is so widespread. He suggests a lack of education on the subject or maybe even confusion from spoken languages themselves.

0 comments voice your opinion now!
objectoriented programming oop contract expose behavior property

Link: http://verraes.net/2014/09/objects-as-contracts-for-behaviour/

Gonzalo Ayuso:
Building a Pimple/Container from a YAML file
September 29, 2014 @ 10:54:10

In a recent post to his site Gonzalo Ayuso shows how to create a Pimple container (a dependency injection container) from a YAML configuration definition using a simple handler already included in Pimple.

[In a conversation with Máximo Cuadros about Dependency Injection Containers] I said that I prefer Symfony´s DIC instead of Pimple, mainly because its configuration with YAML (or even xml) files. But In fact we can customise Pimple/Containers with YAML files in a similar way than we do it with Symfony's DIC. In this example we're going to see one way to do it.

While Pimple does come with the "Container" functionality to make this happen, Gonzalo points out that using it this way violates several of the SOLID design principles. Instead, he offers an alternate solution - using the Config component from Symfony to handle the creation of the container using an already established YAML format. He includes an example YAML configuration structure, the matching Pimple code for it and a code sample showing how the YAML is parsed into the same result. You can find the code on his GitHub account if you're interested in the full structure.

0 comments voice your opinion now!
pimple symfony container solid config yaml dependencyinjection

Link: http://gonzalo123.com/2014/09/29/building-a-pimplecontainer-from-a-yaml-file/

Sameer Borate:
Creating Twitter Apps in PHP
September 29, 2014 @ 09:28:42

Sameer Borate has a post today showing how you can create a simple Twitter application in PHP making use of their REST API and the twitter-api-php library.

In this post we will look into accessing Twitter REST API in PHP. This can be useful if you need to post Tweets from your PHP application or anaylze, search Tweets. In the following examples we will use the twitter-api-php PHP wrapper for Twitter v1.1 API. Although there are a few wrappers around, this one I like for its simplicity.

He helps you get the library installed (via Composer) and create an application on the Twitter side at apps.twitter.com. Sample code is included showing how to connect to the API with your credentials, including handling the OAuth authorization piece. From there he shows two examples of action to make on the API: posting a new tweet and searching for new tweets based on a query string.

0 comments voice your opinion now!
twitter application tutorial introduction library oauth search post tweet

Link: http://www.codediesel.com/social/creating-twitter-apps-in-php/

Community News:
Packagist Latest Releases for 09.29.2014
September 29, 2014 @ 08:04:11

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




Community News:
Packagist Latest Releases for 09.28.2014
September 28, 2014 @ 08:09:35

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



Community News:
Packagist Latest Releases for 09.27.2014
September 27, 2014 @ 08:06:01

Recent releases from the Packagist:


Community Events





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


laravel deployment podcast introduction release library list conference zendserver voicesoftheelephpant framework bugfix series tips api community symfony language developer interview

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