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

Symfony Blog:
New in Symfony 2.7: Twig as a First-Class Citizen
Jan 15, 2015 @ 19:16:18

The Symfony blog has a new post about a change coming in the next version of the popular PHP framework - treating Twig as a first-class citizen. This update removes the abstraction layer that was introduced for it to be used in templating.

When I started to work on Symfony2, Twig didn't exist. Anyway, to ease using PHP as a templating engine, I created the Symfony Templating Component. Later on, not very satisfied with using PHP as a templating language, I decided to create a new templating language, Twig, based on the Python Jinja2 language. And Symfony2 became the first popular framework to adopt a non-PHP templating engine in core. [...] But what would Twig as a First-Class Citizen mean in Symfony2 then? To be able to support PHP and Twig in Symfony, we added an abstraction layer. [...] For Symfony 3.0, I'd like to extract the Templating Component into an independent library (for the few people using PHP with Symfony) but I'd also like for Twig to be front and center in the framework. The good news is that most of the work has already been done in Symfony 2.7.

He compares the two methods for using Twig, one in 2.6 and the other in 2.7, showing both the reduction in code needed and the overall speed improvement gained by removing the excess layer. He includes a link to the Blackfire.io reports showing the difference in the metrics with a total of 48 classes less to load just by removing this layer.

tagged: symfony twig firstclass citizen templating abstraction performance

Link: http://symfony.com/blog/new-in-symfony-2-7-twig-as-a-first-class-citizen

Lorna Mitchell's Blog:
How to Be a Good Conference Citizen
Oct 01, 2010 @ 14:41:08

Planning on attending one of the many upcoming conferences - PHP related or not? You might check out some of the suggestions Lorna Mitchell has about being a good "conference citizen" while you're there.

I get to a lot of events and the crowds at each one are different and there's a different atmosphere - but at every event there are people who are making the whole thing less enjoyable for everyone else. Probably a lot of those people don't much care what effect their behaviour has on other people, but if you want to avoid being one of those people, these are my tips.

Most of them are pretty obvious when you think about them, but that's usually the problem - people don't remember the simple things like being quiet during presentations and taking every opportunity you can to use the times and spaces available outside of the normal talk schedule.

tagged: conference citizen recommendation

Link:

Scott MacVicar's Blog:
Why Apple is a bad open source citizen
Feb 25, 2009 @ 16:21:20

A little while back Scott MacVicar wrote some thank yous to some of the larger and corporate groups involved with PHP and enhancing it as much as they can, both on their own hardware and for the community in general. Unfortunately, there seems to be one company that doesn't want to pay nice - Apple.

So if you've ever tried to compile PHP on OS X, you'll most likely have problems using the default system libraries and in the end you'll use macports to install libxml and iconv. If you're not trying to compile your own versions of PHP and want to use a PECL extension then you'll find that the binary has had all the symbols stripped. Mid last year I tried to get some of these resolved, and filed a bug report with Apple but was informed these weren't bugs.

He goes on to talk about the reception he got from the Apple Developer Connection and the brush-off he seemed to get when he tried with the same questions a few months later.

What was essentially asked for was help to improve PHP on OS X, but this has fallen on deaf ears. Apple are happy to take PHP but don't seem as keen to contribute anything back to the project. Yes they are perfectly entitled to do this, PHP is open source after all. But is waiving a $499 charge too much to ask?
tagged: apple bad opensource citizen take appledeveloperconnection brushoff

Link:


Trending Topics: