Posts
Win 3 Copies of Extending Symfony 2
I have 3 e-copies of Extending Symfony 2 Web Application Framework for you to win.
The rules are simple. You need to either reply here in the comments or tweet telling me why you deserve to get a free copy. I’ll pick up the best answers and randomly select 3 of you to receive a copy of the book.
If you tweet about it, be sure to tweet something on the format of “Hey, @khepin, I deserve http://goo.
Posts
Symfony Book Extending Symfony Available
Just because this blog was not updated with much Symfony content for quite a while doesn’t mean I stopped writing about it!
In fact I’m happy to anounce the immediate availability of Extending Symfony 2 Web Application Framework (also available on Amazon).
It is a hands on approach to discovering all the ways you can extend the framework in order to benefit from advanced capabilities, have cleaner better separated code and or share your extensions in a re-usable fashion.
Posts
Version Tagging Strategies for Composer
Composer, the dependency manager for php is awesome. Incredibly awesome, and gaining more awesomeness by the day. There used to be many glitches, edge cases that made me grinch from time to time to time about it, but almost anything I’ve had to complain about is now working wonderful.
However not everything regarding dependency management is in control of composer, and much is left to the creators of those dependencies.
Posts
Partial Templates With Underscore Js
We’re doing some pretty advanced stuff at my company using underscore.js and to simplify some of it I wanted to use partial templates in my templates.
For example, we have different kind of tooltips all over our application. The structure is similar but the text and a few classes might change.
Underscore allows you to add your own functions using _.mixin(). And within an underscore template, all the underscore functions are still available.
Posts
Symfony Bloggers on Twitter
A while ago, I had cleaned up all the database of symfony related blog feeds from the old symfony website, as well as added a few of my own. The whole thing is published as a single RSS feed.
Now the same is available as a Twitter account to keep you informed of all goodness in the symfony world. Just follow @sf_bloggers on Twitter.
And just like before, if you want to add your own blog feed in the mix, send a PR on khepin/symfonybloggers adding your Atom or RSS feed to the feed_list.
Posts
User Dependent Forms in Symfony2
In a lot of cases it can happen that you want to make your forms different based on the user currently browsing your app.
The cookbook currently shows how to change a form with event subscribers depending on the data in that form. Say creating a record rather than updating something could require a different form for example.
Here we’re gonna take a look at what happens when your form should be customized based on something that is not readily available in the form’s data.
Posts
Validate Your User Before Any Method Call
In the app we’re developing, I want the registration process to be as painless as possible, so the registration form only asks you for a few very basic things:
username email password However we want to have a user’s full information before he can participate in more “advanced” parts of the app. For example if you were an online air ticketing company, before allowing to proceed with a ticket checkout, you need the user’s full name, passport number and other things.
Posts
Custom Database Type With Doctrine 2 for Posgres Gis
Very quick post today, but I’m recently migrating a MySQL database to a Postgres one because the guys using it want to now take advantage of the geographical possibilities of Postgres. Some tables were very easy to migrate with very basic scripts however for some of them with lots of relations to each other, I wanted to take advantage of using an ORM to make things more simple for myself.
Posts
Doctrine Objects Schizophrenia & the Acl
There’s a problem many people seem to encounter in Symfony2 and that appears when you start using the ACL component for security along with Doctrine. The ACL defines an object’s identity based on its class name and an id retrieved from a ‘getId’ method if one exists or from a getIdentifier method if the object implements the DomainObject interface.
The problem: object schizophrenia The problem is that some objects are subject to schizophrenia.
Posts
Symfony2 Testing With Php Unit Quick Tip
I ran into a few issues running tests for a symfony2 project that seems to be common to many people once your test suite starts to be more important. One of the common issues that people encounter is that the number of PDO connections allowed was maxed out. Doctrine keeps the connections alive in case a re-use is needed, but for now doesn’t close the connections once the Kernel shuts down (see: https://github.