Open Source
Community News: Packagist Latest Releases for 05.05.2013
- jpiasetz/postmark (1.0.0)
Postmark PHP wrapper for PHP 5.4+
- soup/paginator (1.1)
Paginator is a simple class that allows you to create pagination. It doesn't require any database connection. It is compatible with Twitter's Bootstrap Framework, by using the CSS class pagination that is also attached.
- voodoophp/paginator (1.1)
Paginator is a simple class that allows you to create pagination. It doesn't require any database connection. It is compatible with Twitter's Bootstrap Framework, by using the CSS class pagination that is also attached.
- ner0tic/php-geopoint-api (1.0.3, 1.0.2)
GeoPoint API v1 client
- ner0tic/php-api-core (2.0.3, 2.0.2)
core elements of a REST styled api walker
- mparaiso/crudserviceprovider (0.0.7)
CRUD helper Silex framework
- manhim/cervo (2.0.0)
A lightweight and highly modular structure framework for PHP.
- textpattern/installer (1.0.0-alpha.5)
Textpattern plugin and theme installer
- arron/testit (1.1.0)
Addon for PHPUnit to easily mocking dependencies and testing calling them.
- typo3-ci/typo3cms (0.0.6)
This package contains a selection of sniffs which implements the Coding Guidelines for TYPO3CMS which was former known as TYPO3.
- typo3-ci/typo3flow (0.0.3)
This package contains a selection of sniffs which implements the Coding Guidelines for TYPO3Flow which was former known as FLOW3.
- typo3-ci/typo3sniffpool (0.0.6)
This repository contains custom sniffs which are compatible with the PHP_CodeSniffer. Understand this package as a sniff pool. It contains all custom sniffs for the TYPO3 project.
- sunra/php-simple-html-dom-parser (v1.5.0)
Composer adaptation of: A HTML DOM parser written in PHP5+ let you manipulate HTML in a very easy way! Require PHP 5+. Supports invalid HTML. Find tags on an HTML page with selectors just like jQuery. Extract contents from HTML in a single line.
- intahwebz/flickrguzzle (0.5.1, 0.2.1)
A Flickr wrapper to allow you to call the Flickr api with Guzzle as the backend.
Goal is to have 100% Flickr api coverage rather than just upload/display photos (currently at 23%).
- zweifisch/zf (v0.1.0)
a micro php web/cli framework/router
- baum/baum (1.0.0)
Baum is an implementation of the Nested Set pattern for Eloquent models.
- widop/github-hook-provider (1.0.0)
Github WebHook job with Silex
- lyrixx/silex-kitchen-edition (v1.1.0)
A Silex Edition. This project is a base for your silex applications.
- mesa/lisi (0.0.4)
Markdown based Blog
- composer/composer (1.0.0-alpha7)
Dependency Manager
- satooshi/php-coveralls (v0.6.1)
PHP client library for Coveralls API
Jackalope-jackrabbit 1.0.0 Beta 1 released
Yesterday i tagged version Beta 1 of jackalope-jackrabbit, our PHP Content Repository (PHPCR) implementation. PHPCR is an API to manage tree-structured data, modelled after the Java Content Repository JCR specification. Time to summarize what jackalope can do today. For people already familiar with Jackalope, I summarize the recent changes at the bottom.
State of Jackalope-JackrabbitThe basic node API is implemented and working fully. You can do direct access to paths and walk the tree hierarchy and read and write data. All data types including binary streams are supported.
We do support the workspace and session write operations including cross-workspace synchronization of nodes.
Queries can be expressed in the JCR-SQL2 language as well as the query object model. Additionally, jackalope provides a fluent query builder on top of the query object model. Most features of query are supported, the exceptions being query parameters and storing a query as stored query.
Exporting the repository to the standard "system" format and also the "document" format works, as does re-importing any repository dump (including those generated by Java JCR implementations).
Node type definitions can be inspected and are used to restrict allowed data when used. Both the CND file format and the object model to define custom node types are supported.
The observation journal is a log of everything that happened in the repository since a specified timestamp. It can be filtered to just see events an application is interested in. Filtering is for example done by repository path and by type of event like adding, changing, moving or removing.
Versioning is implemented and working. You can make nodes versionable, create new versions, inspect the version history to see old versions and restore old versions. Activities and version labels however are not yet implemented.
Session scoped locks are implemented. They allow to block a node, and optionally its subtree, to synchronize operations.
We did not yet implement open scoped locks, but that should not be too hard to do.
Besides building PHP content management, Jackalope-Jackrabbit can also be used to connect PHP applications to the Java jackrabbit based systems Magnolia CMS and Adobe CQ (currently called Adobe Experience Manager)
A couple of optional PHPCR features are not (yet) implemented:
- Permissions and capabilities: Checks whether the current user is allowed to do an operation
- Same Name Siblings: multiple children of the same node each having the same name
- Shareable nodes: would allow a node to have more than one parent
- Access Control Lists (ACL), because Jackrabbit does not expose this feature over the remoting protocol jackalope uses
- Lifecycle mmanagement
- Retention and Hold
- Transactions, because Jackrabbit does not expose this feature.
It is not a design decision not to support those features. We would be happy about contributions to those features, though right now we focus on stabilizing and improving the features already supported.
Changes BootstrappingThe RepositoryFactoryInterface was defining static methods. This is not legal PHP but the interpreter accepted it. We changed them to class methods and require the factory to have a no-argument constructor. Instead of
Jackalope\RepositoryFactoryJackrabbit::getRepository()
you now need to do
$factory = new Jackalope\RepositoryFactoryJackrabbit; $factory->getRepository();
Jackalope now supports the SessionInterface::cloneFrom method and NodeInterface::update methods. This allows to copy a node into a different namespace, modify it there and then synchronize the changes back. With this, you can build workflow concepts.
ObservationThe observation journal now is now usable. We figured out how to only get the events you actually care about when using the skipTo method. You can now use jackalope-jackrabbit as a message queue.
CLI commandsYou have now commands to move a node, to touch (= create) a node and properties and to list the node types present in your repository.
The CLI commands are reorganized to a logical naming schema. We grouped them by what they affect: phpcr:node:*, phpcr:workspace:* and phpcr:node-type:*. We now differentiate between workspace:purge that deletes the whole repository and node:remove that can only delete a subtree but never "/".
Truncated by Planet PHP, read more at the original (another 1251 bytes)
Community News: Packagist Latest Releases for 05.04.2013
- zweifisch/zf (v0.0.5)
a micro php web/cli framework/router
- ner0tic/php-geopoint-api (1.0.1)
GeoPoint API v1 client
- mf2/mf2 (v0.1.13)
A pure (generic) microformats-2 parser
- sankynet/lib-php (1.0.0)
SankyNet PHP Libraries
- axsy/transactional-bundle (1.0.0)
Provides transactional wrapper for the controllers and services
- mandrill/mandrill (1.0.26)
API client library for the Mandrill email as a service platform
- mach/piwik-proxy-service-provider (v1.0)
PiwikProxy ServiceProvider for Silex
- toin0u/geotools-laravel (0.1.4)
Geo-related tools PHP 5.3 library for Laravel 4
- neutron/silex-imagine-provider (0.1.2)
A Silex service provider for Imagine Image Processing Library
- jackalope/jackalope-jackrabbit (1.0.0-beta1)
Jackalope Transport library
- jackalope/jackalope (1.0.0-beta1)
Jackalope PHPCR library
- rpnzl/arrch (v1.1.0)
Array queries for PHP 5.3
- phpcr/phpcr-utils (1.0.0-beta9)
PHP Content Repository implementation independant utilities
- silex/silex (v1.0.0)
The PHP micro-framework based on the Symfony2 Components
- n98/magerun (1.65.0)
Tools for managing Magento projects and installations
- phpcr/phpcr (2.1.0-beta10)
PHP Content Repository interfaces
- mike_php_net/pq-gateway (v1.0.0)
Table/row gateway for ext-pq
- satooshi/php-coveralls (v0.6.0)
PHP client library for Coveralls API
- tabernicola/mv-blog-bundle (v1.2.2.1-beta, v1.2.2-beta)
Symfony2 Blog Bundle
- richardsjoqvist/silverstripe-news (1.0.0)
A simple news module for SilverStripe
- richardsjoqvist/silverstripe-optionaltreedropdownfield (1.0.0)
This module extends TreeDropdownField to allow clearing a selection
- richardsjoqvist/silverstripe-embedder (1.0.0)
Embedder enables embedding media in content fields area similar to how embeds work in WordPress
- richardsjoqvist/silverstripe-localdate (1.0.0)
Translates formatted date strings to the locale set with i18n::set_locale() if there is a matching language file.
- richardsjoqvist/silverstripe-siteaddress (1.0.0)
Adds a set of extra fields to the main settings page in order to configure a site-wide company address that can be displayed on all pages of the site
- pagon/eventemitter (0.4.1)
Event Emitter for PHP
- nelmio/solarium-bundle (v2.0.2)
Integration with solarium solr client.
- codeblanche/entitymarshal (1.0.0)
A marshal for your entity
- richardsjoqvist/silverstripe-blocks (1.0.0)
Blocks is a generic class which can be used to build small content blocks which can be associated globally or with a specific page.
- toin0u/geotools (0.2.4)
Geo-related tools PHP 5.3 library
- willdurand/geocoder (1.5.0)
The almost missing Geocoder PHP 5.3 library.
- evernote/evernote (1.24.0)
Evernote PHP SDK
- pinoco/pinoco (0.8.0)
Web site development framework using PHP and (mainly) PHPTAL
Development Security isn’t an Add-on
Thanks to O’Reilly’s “DRM Day” promotion yesterday, I picked up a copy of a book I’ve been meaning to but could justify because a) full price of the ebook is around $25 USD and b) it was written back in 2003 – almost ten years old! The book, “Secure Coding: Principles and Practice” is more of an overview of things to think about when it comes to secure development and less about specific language-related tips. What’s interesting to me is that, despite the book being 10 years old, it seems like the same challenges they were facing then, we’re still facing now.
Even the introduction reinforces something I’ve been trying to advocate in the PHP community for a while now – security is not an “add on” that you can drop in at the end of the development process. Security must be a part of the planning and architecture of your applications from the beginning. If you “go back and secure things” you’re doing it wrong. Now, this doesn’t mean you have to have some kind of security review process retrofitted into your SDLC. I know of lots of teams that have their workflow down and are cranking out the code and features like there’s no tomorrow. How does a team like this start “thinking secure” without having to add a lot of extra overhead? It’s pretty easy really – all it really takes is a shift in mindset.
When most developers I know start out on problems, they ask themselves questions to figure out how to start in on their solution. They wonder about things like the “best way to do it” or “the most efficient way” to get the job done. Their minds start filling up with object structure and SOLID principles, trying to find the best solution (and maybe even technologies) for the job. To start thinking secure, all it takes is one more question:
How can I break this?
Easy, right? Well, like anything else in development, one question always leads to at least 10 more. This one simple question sets you down the right path, though. It’s too easy to get focused on making things work and writing up unit tests that pass when everything’s good. I want to challenge you as a developer to do one thing in your next project. I want you to take a step back from the code – maybe grab a fellow developer to help – and look at the application from the outside and determine what could be exploited and where (the “attack surface“). A lot of times this is easier when you’re not neck deep in the code, so if you have doubts, find an outsider.
Here’s some related websec.io articles I hope can help get you in the right state of mind as you work to integrate secure principles into your development. There’s lots of other topics in there that devs would find useful, but this will get you started:
Let’s all help make the integration of security and development a thing of the past. Then, ten years down the line, people wil be reading books from 2013 and wonder what it was like “before”.
PHP Unconference Europe
Reddit.com: Zend2 vs Symfony2
On Reddit.com there's a discussion happening comparing two popular and prominent PHP frameworks - Zend Framework 2 and Symfony 2.
For those that have used both frameworks, what one do you feel is a better overall framework? I tried ZF2 in beta and it seemed overly complicated to symfony but I don't know if its gotten better since then.Opinions shared in the comments of the post include things like:
- "So if you are learning for job prospects, go Zend. I love Symfony 2 though, its a joy to work with."
- "It doesn't matter. Each has a strength and a weakness, and neither will go away. Pick one and use it, you'll be fine."
- "I don't think there is such thing as a best framework as you should use the best tool for the job. I don't think MVC is the solution to all problems."
- "Both are quite bloated but they have to be considering their target markets."
On the whole, the views are of the "best tool for the job" mentality - a good sign for the community and these two frameworks.
Link: http://www.reddit.com/r/PHP/comments/1dcqst/zend2_vs_symfony2Phil Sturgeon: Testing and Contributing with Composer Packages
Phil Sturgeon has posted a guide to his site about running tests and contributing back to packages that live in Composer.
While Composer has been around for a while now, many packages are still in their infancy (< 1.0) or sometimes are just not as feature filled as they could be. To be fair there is always more to be done. It can always do more, or do the same thing more efficiently. Whatever the case, pull requests are going to be a common thing for the PHP community to be doing to these packages and this needs to be done safely, with unit-testing. So, how do you run their test suite and add your own tests?He includes a step-by-step guide to getting the environment set up to run the package's tests and how to add some of your own. He includes the commands to send the pull request back up to Github (on your own fork, of course) and how to use that same fork as your package resource until the main project is updated.
Link: http://philsturgeon.co.uk/blog/2013/05/testing-contributing-composer-packagesSameer Borate: Efficiently Replicating RETS data to MySQL
Sameer Borate has a new post to his site that shares how he converted a RETS database to MySQL with the help of a PHP library, PHPRETS.
A recent project of mine entailed replicating a RETS database on a local MySQL database server. The client had a new real-estate mobile search app in development and wanted to have a local copy of the RETS database for search queries instead of a remote RETS server. [...] Replicating RETS data rather than using the live version is slightly complex, however. In order to replicate the RETS data into your own local database, a series of processes are needed in order to make sure the data you have is both updated and in sync with the server.He breaks it down into three main steps with some sample code for each:
- Grabbing the complete database once
- Keeping the data in sync
- Ensuring the cron job is executed on regular intervals
Francesca Krihely: On the Developer Experience
In a new post to her site Francesca Krihely starts looking at the developer experience - how developers relate to your service and product and what kinds of things you need to be doing to help engage them.
I had a great brainstorm a few weeks back with the members of the Developer Evangelists meetup on the topic of the User Journey, or as I'll call it now, the Developer Experience. The main problem we wanted to solve was how we convert new users into experts or awesoms users. In many ways, a Community Manager and/or Developer Evangelist is responsible for driving user adoption and making users successful, so this is a topic near and dear to all of our hearts. I walked away with three key things that help improve the developer experience: Great Product, Great Support and Empowerment.This post talks about the first point - the "great product" - and notes that, if the product isn't useful and enjoyable to use, even developers won't bother with it. She also talks some about the need for quality documentation and how it can be seen as a sort of "marketing" to developers.
Work on making your product fit for an awesome developer experience. If you build it, they will come. Link: http://francescak.me/blog/2013/05/02/on-the-developer-experienceCommunity News: Packagist Latest Releases for 05.03.2013
- f21/paradox (1.2.0)
Paradox is an elegant Object Document Mananger (ODM) to use with the ArangoDB Document/Graph database server.
- jstayton/google-maps-geocoder (v2.0.2)
A PHP wrapper for the Google Maps Geocoding API v3.
- icecave/duct (0.1.0)
Parse continuous streams of JSON objects.
- discordier/justtextwidgets (0.5.2)
Hidden fields with text values and explanation texts
- covex-nn/joos-stream (4.0.0)
PHP stream wrapper, transactional virtual file system
- benjaminlazarecki/scarepiceditor-bundle (0.1.0)
Provides an EpicEditor integration for your Symfony2 Project.
- clubmaster/extra (1.2)
ClubMaster extra bundle
- silverorange/net_notifier (v0.4.1, v0.4.0)
An asynchronous notification system using WebSockets
- google/api-client (0.6.2)
PHP Client for Google APIs
- pihi/industrial (0.4.0)
Dependency Injection for PHP 5.3
- dreamfactory/app-launchpad (v1.0.1)
DreamFactory Services Platform(tm) LaunchPad Application
- aequasi/memcached-bundle (1.2.4.1, 1.2.4, 1.2.3.10)
Memcached Bundle
- herrera-io/go (1.3.5, 1.3.6)
A simple PHP build tool.
- hautelook/templated-uri-bundle (v0.2.2)
Symfony2 Bundle that provides a RFC-6570 compatible router and URL Generator.
- herrera-io/service-process (1.1.2)
A service provider for Symfony Process.
- sanyatuning/sanyaform (0.3.0)
ZF2 module extending Zend Form
- simplon/helper (0.5.10)
General helpers which come-in helpful.
- packfire/framework (2.1.0)
The rapid-development object-oriented framework for PHP. Be surprised at how fast you can build a web application with a pack of fire.
- zweifisch/zf (v0.0.4)
a micro php web/cli framework/router
- fuelphp/upload (2.0)
Uploaded file processing.
- denits/yii-apiauth (v1.0.0-beta)
HTTP authentication for automated requests
- chh/pipe (v1.0.0beta1)
Put your assets into the Pipe and smoke them.
- chh/meta-template (v1.0.0beta1)
Templating solution with adapters to many engines.
- zf-commons/zfc-base (v0.1.2)
A set of genetic (abstract) classes which are commonly used across multiple modules.
- zf-commons/zfc-user (0.1.2)
A generic user registration and authentication module for ZF2. Supports ZendDb and Doctrine2.
- kbsali/redmine-api (0.4.7)
Redmine API client
- bjyoungblood/BjyAuthorize (1.2.5)
ZendAcl based firewall system for ZF2 dispatch protection
- bjyoungblood/bjy-authorize (1.2.5)
ZendAcl based firewall system for ZF2 dispatch protection
- mauris/yaml (1.0.0)
Mauris Build of the Symfony Yaml Component
- ajt/guzzle-asana (0.9.1)
Asana API client written on top of Guzzle PHP.
- craue/config-bundle (1.1.1)
Database-stored settings made available via a service for your Symfony2 project.
- widop/google-analytics-bundle (1.0.1)
Google certificate-based authentication in server-to-server interactions with google analytics
- xi/test-selenium (0.3.1, 0.3.0)
Selenium 2 bindings
- graze/event (0.1.3)
Simple event pub-sub
- kitpages/data-grid-bundle (v1.6.1)
Symfony DataGridBundle
- puddin/helpers (1.0.0)
Helper classes to make your life easier
- aoyagikouhei/pg (0.0.3)
PHP Class for PostgreSQL
- simonwelsh/gridfieldrelationhandler (1.0.1, 1.0)
This module provides two GridField components that aid in managing relationships within SilverStripe.
Site News: Popular Posts for the Week of 05.03.2013
- Software Gunslinger: PHP is meant to die, continued
- Community News: Latest PEAR Releases for 04.29.2013
- NetTuts.com: HTTP: The Protocol Every Web Developer Must Know - Part 2
- PHPMaster.com: Better Understanding Random
- PHPMaster.com: An Introduction to Ctype Functions
- Reddit.com: How to progress my PHP skills?
- Chris Hartjes: Testing Smells - Try/catch
- Lorna Mitchell: What Goes in Source Control?
- Community News: Packagist Latest Releases for 04.27.2013
- Rob Allen: Injecting configuration into a ZF2 controller
Inviqa techPortal: Functionally Testing You Application Using Mink
On the Inviqa TechPortal today there'a a new post from Konstantin Kudryashov showing you how to use Mink for functional testing (an extension of Behat) of you web application.
Automated testing is big news these days. There's hardly a PHP conference happening without a talk on testing automation or derivative methodologies. TDD (Test-Driven Development) and BDD (Behaviour Driven Development) are all around us. So why should you care about all this? [...] The more complex an application becomes, the harder it is to be sure that each new feature or bug fix won't break the system, and that decreases your overall confidence in your work as developer. That's exactly the reason why you need automated testing - to be confident that you're not breaking important parts of an application.For his examples he uses a simple Silex-based application (found here on github) that just shows a main page and an "add article" page that returns a preview when submitted. He shows how to get Behat/Mink installed and how to bootstrap PHPUnit to allow you to execute your tests. Also included is a sample test that clicks the "Add Article" link, runs a few checks and fills in some data. The form is submitted and the "preview" page is checked for valid results.
Link: http://techportal.inviqa.com/2013/05/02/functionally-testing-your-application-using-minkPHPMaster.com: Crop and Resize Images with ImageMagick
PHPMaster.com has a new tutorial posted showing you how to crop and resize images with the help of the ImageMagick functionality that can be added to PHP (via this extension).
If your website allows users to upload photos, image cropping/resizing functionality certainly comes in handy. But users might not have access to image manipulation tools like Photoshop, so by providing a cropping/resizing feature you can allow users to upload photos from any device (e.g. tablets or phones) without them having to worry about the the final size. Furthermore, you can create different versions of the same image and also allow users to crop specific portions of uploaded picture. In this article I'll show you how to create an image cropping tool with the help of the ImageMagick PHP extension.The post shows the use of the "cropimage" function to trim down an image from its original size and "thumbnailImage" to shrink down the image to make a thumbnail. Also included is the code (both the PHP and the HTML form) to handle file uploads and automatically create a thumbnail image. It outputs the image to the browser and asks the user to select the portion they want thumbnailed (with this jQuery plugin helping).
Link: http://phpmaster.com/crop-and-resize-images-with-imagemagickMaltBlue.com: Use RouteMatch in Zend Framework 2 For Easy Routing
In the latest to his site Matthew Setter takes a look at easy routing with RouteMatch in Zend Framework 2 applications. The RouteMatch component gives you better control over your routing and lets you define "match paths" for URL to Controller mappings.
Today using Zend Framework 2 RouteMatch, Router and Request objects, I show you an easy way to dynamically update the current route. It's almost painlessly simple. [...] Well, like most things in web application development, what starts out simply in the beginner often grows more complex over time. So too is my once simple route.His "simple" route started getting a bit out of control when he added in some pagination to the page (and query for the path match). He wanted to figure out how to re-render data with the same filters but show the next page of data. He shows how to use the RouteMatch component to achieve just this. He creates a custom module with a "listViewToolbar" helper that lets you read the router, request and handle the parameters sent via the URL. The "invoke" method is called to render the toolbar in the page, complete with the new settings.
Link: http://www.maltblue.com/tutorial/use-zend-framework-2-routematch-for-dynamic-routingSabreDAV acquired by fruux

Last week we have finished the talks to transfer ownership of the SabreDAV project to fruux.
I've been working at fruux as a lead-dev for some time now, and SabreDAV is really at the core of everything we do, so this was a logical and inevitable choice.
To me it's an important step. SabreDAV has been one of the very little things that have remained consistent in my life. This validates my work from the last 6 years a bit. In another way it feels a bit like I'm letting go something that's very important and personal.
However, I'll still be running the project so in reality the change for me personally is not that big :).
What's SabreDAV?SabreDAV is an open-source project that I've started all the way 2007. It allows you to write WebDAV, CalDAV and CardDAV servers in PHP. These three technologies allow you to do file, calendar and addressbook syncing.
A few years ago steam really picked up, and it changed from the hobby project that it was back then, to something I could actually make a living off by doing consulting.
In 2012 I've took it one step further, and teamed up with fruux to build a commercial product around SabreDAV.
What will change?Small stuff really. The GitHub urls have changed. The new project pages are:
- https://github.com/fruux/sabre-dav
- https://github.com/fruux/sabre-vobject
- https://github.com/fruux/sabre-xml
A bigger change is that fruux will now be the official go-to place for commercial support. I feel this will strengthen the SabreDAV project, especially for the potential users that are into that sort of thing.
It also means that getting a new website is in the cards :). The current one has passed it's expiry date.
Does this mean SabreDAV will go closed-source?No. I would never let this happen. SabreDAV will remain as open source as it has always been, and we also don't intend on making it crippleware.
The BSD license in place today is very liberal, and I feel that it's exactly this that has allowed many projects and businesses to adopt it. Taking that away would not only damage the project, it would also feel ethically wrong.
However, SabreDAV is primarily a library, suitable for integration into other systems. We're definitely looking into the possibility of offering a more complete package, such as a standalone server with solid management interfaces.
Thanks!Thanks everyone for your continued support, pull requests and relying on SabreDAV for your projects :). It's the best reward, really.
If you're interested, also check out the announcement on the fruux blog
Dougal Campbell: WordPress 10th Anniversary Blogging Project
Dougal Campbell has a new post to his site with his own contribution to the "WordPress 10th Anniversary Blogging Project" - a remembrance of his history with the tool and where/when he first started using it.
The official 10th anniversary of the release of WordPress is May 27, 2013. It has been an amazing 10 years, during which WordPress evolved from a simple blogware to a very full-featured CMS (Content Management System), used to power some of the biggest and most popular web sites on the internet. All over the world, people are planning celebrations. As much as I like a good party, I thought this would also be a good time to celebrate WordPress by actually using WordPress - for blogging.He talks some about when he got started with WordPress (2003) and what's happened since. He suggests that others follow suit and use the "#wp10" hashtag on Twitter to share their own posts.
Link: http://dougal.gunters.org/blog/2013/05/01/wordpress-10th-anniversary-blogging-projectJosh Adell: Serializing Data Like a PHP Session
In this new post Josh Adell looks at working with PHP sessions and how you can manually encode data to look as if it came from the normal session handling.
If you have ever popped open a PHP session file, or stored session data in a database, you may have noticed that this serialization looks very similar to the serialize function's output, but it is not the same. Recently, I needed to serialize data so that it looked like PHP session data (don't ask why; I highly suggest not doing this if it can be avoided.) It turns out, PHP has a function that encodes data in this format: session_encode.Unfortunately, this method doesn't take arguments - it just outputs the encoded version of the current session data. So, he came up with his own encode/decode methods that use the PHP session, extract the serialized string and return it.
Link: http://blog.everymansoftware.com/2013/05/serializing-data-like-php-session.htmlCommunity News: Packagist Latest Releases for 05.02.2013
- elefant/app-wiki (0.9.1-beta)
Wiki app for the Elefant CMS
- aequasi/memcached-bundle (1.2.3.9, 1.2.3, 1.2.1)
Memcached Bundle
- mandrill/mandrill (1.0.25)
API client library for the Mandrill email as a service platform
- ladela/personal-translations-widget-bundle (v0.2.6.1, v0.2.6)
Adds translations widget based on Personal translations
- thetwelvelabs/foursquare (v0.2.0)
Foursquare API Client
- skillberto/jqueryform (1.0)
This JavaScript file create HTML DOM with jQuery.
- dwolla/dwolla-php (1.5.3)
Official PHP Wrapper for Dwolla's API
- anroots/kohana-yaml (2.1.0, 2.0.2)
YAML config/i18n reader/writer for the Kohana Framework, fork of gevans/kohana-yaml
- jenwachter/data-encoder (0.3)
A PHP library to make it easier to create XML using the DOM Document object.
- closestdate/closestdate (1.1.0, 1.0.0)
Utility class for find the closest date in PHP 5.3+
- onemightyroar/php-activerecord-components (1.0.7)
Useful common components for a php-activerecord based project
- bear/package (0.7.0)
BEAR.Sunday application package
- segmentio/analytics-php (0.4.4)
Segmentio Analytics PHP Library
- triagens/arangodb (v1.2.1)
ArangodDb PHP client
- rah/textpattern-plugin-installer (1.0.0-alpha.4)
Textpattern plugin installer
- mediawiki/core (1.20.5)
Free software wiki application developed by the Wikimedia Foundation and others
- ocramius/proxy-manager (0.3.4)
A library providing utilities to generate, instantiate and generally operate with Object Proxies
- graze/event (0.1.2, 0.1.1, 0.1.0)
Simple event pub sub
- brtriver/dbup (v0.2, v0.1)
simple migration tool with PDO
- symfony/symfony (v2.3.0-BETA1)
The Symfony PHP framework
- hautelook/templated-uri-bundle (v0.2.1)
Symfony2 Bundle that provides a RFC-6570 compatible router and URL Generator.
- sammaye/mongoyii (1.2.1)
A Yii MongoDB ORM
- bear/sunday (0.7.3)
BEAR.Sunday, a resource oriented framework
- bear/ext-web-response (0.7.3)
BEAR.Sunday template engine extension
- bear/ext-template-engine (0.7.3)
BEAR.Sunday template engine extension
- bear/ext-router (0.7.3)
BEAR.Sunday router extension
- bear/ext-resource-view (0.7.3)
BEAR.Sunday resource view extension
- bear/ext-console-output (0.7.3)
BEAR.Sunday console output extension
- bear/ext-application-logger (0.7.3)
BEAR.Sunday application logger extension
- bear/ext-application (0.7.3)
BEAR.Sunday application extension
- geekality/transposer (v1.4.2)
Plain text song parser and chord transposer
- kvdh/symfony-twitter-bootstrap (v2.3.1)
Twitter Bootstrap vendor package for Symfony 2.x
- gpmd/ss-bootstrap (v1.0.1)
Twitter Bootstrap / HTML5 Boilerplate theme for Silverstripe 3
- phpspec/phpspec (2.0.0-BETA3)
Specification-oriented BDD framework for PHP 5.3+
- castanet/userid (0.0.5)
Emulate Nginx's HTTP Userid module
- bartosz-maciaszek/php-rtm (1.0.3)
Remember The Milk API client for PHP
- bear/ace (0.1.1)
Ace online editor utility
- lwc/smartling-php (0.0.2)
PHP client for Smartling's file API
Site News: Blast from the Past - One Year Ago in PHP
- PHPMaster.com: REST - Can You do More than Spell It? Part 1
- PHP-Security.net: New PHP-CGI Exploit (CVE-2012-1823)
- PHPMaster.com: REST - Can You do More than Spell It? Part 2
- PHPMaster.com: PHP Security: Cross-Site Scripting Attacks (XSS)
- Fawad Hassan's Blog: Load More Using KnockoutJS, PHP/CodeIgniter (Part 1)
- Kevin Schroeder's Blog: ZF2 Dependency Injection - Multiple Object Instances
- PHPMaster.com: An Introduction to Redis in PHP using Predis
- Software Development Video & Tutorials: PHP and Couchbase
- Web and PHP Magazine: Issue #2 Released - "PaaS with Flying Colors"
- MaltBlue.com: Zend Form Mastery with Zend Config - Part 1, Custom Filter Paths
- Lorna Mitchell's Blog: Tips on Writing an API for a Smartphone App
- PHP.net: PHP 5.3.12 and PHP 5.4.2 Released!
- ServerGrove Blog: Spooling emails with Symfony2 on VPS and Shared Hosting
- Rob Allen's Blog: Unit testing Zend Framework 1
- PHP-Security.net: Suhosin 0.9.34-DEV Installation HowTo
Functionally Testing Your Application Using Mink
Automated testing is big news these days. There's hardly a PHP conference happening without a talk on testing automation or derivative methodologies. TDD (Test-Driven Development) and BDD (Behaviour Driven Development) are all around us. So why should you care about all this? Well, there are many excellent reasons to do automated testing, including assuring application quality and inspiring developer confidence in a system. If you are a business person, you're most likely to care about the quality; if you're a developer then the confidence aspect is more important. The more complex an application becomes, the harder it is to be sure that each new feature or bug fix won't break the system, and that decreases your overall confidence in your work as developer. That's exactly the reason why you need automated testing - to be confident that you're not breaking important parts of an application.
Now you're convinced that automated testing is important, but isn't unit testing enough? Unit tests are cheap, fast and small. Why might you want to expand into using a technique such as functional testing? Once again the answer is confidence. The more complicated an application becomes, the more complicated the interactions between separate parts of the application become. Just as you can't be confident your car is roadworthy by manually turning each of its wheels independently, you can't be sure that an entire application is working by testing each of its units independently. You need functional testing for complex applications - and today, that's every application.
SilexSilex is a PHP microframework based on Symfony2 components. It has rapidly become a popular tool in the Symfony2 community thanks to its simplicity and shallow learning curve. That said, the simplicity of Silex does not mean that it is only fit for simple applications, in fact the opposite is true. Some types of application, like RIAs (Rich Internet Applications) are better built with PHP and the minimalism of Silex.
As an application becomes more complex, so it becomes more important to properly test it. Silex provides some tools for functional testing using the Symfony2 BrowserKit component. This is useful, but what if some of of the application's functionality requires real HTTP requests to be made? Those could be done using a console browser emulator like Goutte. How about if some functions depend on AJAX to behave properly? Using Selenium or even Zombie.js could be a good option in that case.
There are two problems with all the solutions mentioned here:
- There's simply no single best choice in terms of browser emulation. Some emulators (BrowserKit, Goutte) are extremely fast, but don't support AJAX. Others (Zombie.js, Selenium) support AJAX but are much slower. In an ideal world, you would want to use multiple emulators at the same time, choosing the best one for each specific case. That leads us to problem #2.
- Different browser emulators are written in different languages (PHP, JS, Java), using different libraries and provide extremely inconsistent APIs for developers to work with. That means it is difficult to switch from one emulator to another as it will require all helpers and testing tools be rewritten.
To help solve some of these problems, a library called Mink was written. It was created originally as a complementary tool for Behat, but is not tightly coupled to Behat itself and so it can also be used with any framework or tool out there. Mink is a browser emulator abstraction layer - a tool that removes the differences between the various browser emulators and provides one single API through which you can control them all. This essentially means you can switch from browser emulator to browser emulator quite seamlessly as they all use the same PHP API. This article will show you how to use Mink to functionally test an example Silex application using a couple of different browser emulators.
Setting UpAs our test application we'll use a very simple Silex blog application that is already prepared for you. The code is on github at https://github.com/everzet/silex-mink so use that as your starting point.
Set Up the Test SuiteIn order to install and integrate Mink, Silex and PHPUnit, some extra entries are needed in composer.json. The new sectio
Truncated by Planet PHP, read more at the original (another 37475 bytes)