The first part being an introduction to git rebase mechanics, this follow-up drives that introduction into real-world examples.
Developing Software is Fun!
The first part being an introduction to git rebase mechanics, this follow-up drives that introduction into real-world examples.
There are many users out there being scared to use git rebase. To wrap things up, git rebase is not a lion that will hunt you down.
It is a cat, it likes you, until you do something fancy and will hurt you once. You will know how to deal with the situation properly the next time - but give it a try.
This post is about quelling some fears off those users - maybe you are one of them?
In the previous post we set up a project using git-subtree. Unfortunately there may be situations when the merge of the subtree will not make its way into the correct directory.
Let’s say you got your closed source project built on Symfony2. Let’s further say you are a proud customer of cloudControl. Third assumption: You have not only one project, but two and those are sharing a closed source bundle.
See how to use git-subtree to add the shared bundle to both projects and having the bundle in a separate repository.
This blogpost explains on the example of adding a “help” message to widgets how to use form type extensions.
Finally, my blog is now on github:pages!
Long time no post, but now it’s time for a new one. I wrote a guide on behavior driven development in Symfony2. It’s meant for beginners and designed “from scratch”. This guide caught some attention and made it into the official Behat documentation as a cookbook entry.
If you have any feedback on it, please let me know! If you would like to have something related covered, drop me a message!
Git is a distributed version control system (VCS). What does “distributed” mean in this case? It means, that there is no “server” as in other VCS like subversion. The repository will be transferred as it to any other user who has access to it – including the complete history.
Github is a web based service to manage git repositories in a social way. You can create new repositories, fork others, modify the codebase and send your changes back. There are many more very cool features, but we keep it here for now.
Yes, that’s it: a great PHP platform as a service (PaaS) on top of Amazon Web Services. You will have your php application deployed on multiple machines with a single command. There are plenty of add-ons available such as worker processes, MySQL database, MongoDB and memcached to name a few.
I moved my servers into “The Cloud”™ - more specifically the Rackspace Cloud. Well why did I do this? The answer is about two years old. I asked my previous hosting service whether they are able to migrate my virtual servers to instances of their “root servers”. They said, this is not possible. As time flies by the vServers reached their limits. They were not scalable, so either I get another one .. and another one .. and yet another one. Well at some point I don’t want to sign another and another contract. I want to say “Now!” and the server is up - That’s why cloud. You have plenty of servers, make up your images for your certain server types and go for it. If you need more hardware, reboot - done!
I encountered some errors while configuring my phpUnderControl. One of the errors were the <git> <modificationset> not returning results, but the gitbootstrapper actually updated the git repository. In my case, this was because the user running CruiseControl has set up colorful output in its git config. This option changes the output of the git-log command. The problem with that? The patterns the modificationset looks for do not match! I opened a change request on Thoughtworks for that - hopefully this will be fixed in the next release of CruiseControl.
The other error was about this warning Git - warning: Log for '' only goes back to [date]. This warning is thrown when you don’t have a local reflog back to that given date. This happened to me, because I removed the git repository within my build and cloned it on each build. This warning is no problem for the modificationset. However, I didn’t want this warning, so I updated my config.xml to use a cleanroom for the bootstrapper and the modificationset. Once built this warning should not occur another time, because you are not loosing the reflog of git anymore. I still clone the repository on each build, but this cleanroom won’t be touched anytime.
Well, PHPUnit CodeCoverage is pretty nice and exports some nice HTML files to take a look into. However, a project most often contains more than just PHP files and for a symfony project this could be the phpunit.xml.dist. It removes all folders from your coverage report, that most likely are not your stuff. This one is based on the shipped file of sfPHPUnit2Plugin. The relevant part is the <filter> section.
Well yesterday I moved to PHPUnit and I just felt the way I want to use phpUnderControl as continuous integration server. The installation part was the easiest one, gathering all the information spread among several websites was not that easy. Especially for me not having used CruiseControl either.
I don’t want to take you into the installation of either PHPUnit, phpUnderControl or CruiseControl. These steps are pretty easy and straight forward.
Let me explain, what my setup looks like. I’m hosting the project on github.com as a private repository. Side note: add the public key of your CI to your account to be able to clone these. This project uses symfony with Propel and PHPUnit.
At Adcloud we are using the jQuery qTip plugin, which provides pretty nice and easy to apply tooltips. We ran into one small problem, which solution I want to share. The tooltips work fine, except when you are adding new objects to the DOM. As of jQuery 1.4 there is no availability of live binding on the load-Event.
I were asked to take a look into ORM Designer by Inventic s.r.o. two weeks ago. I tested the software and here is my little piece of review as a developer.
I upgraded to Snow Leopard on my Mac and as described on Apple’s website Parallels 3.0 won’t start on Snow Leopard. At least not by default. However it is possible to start Parallels 3.0 under Snow Leopard without updating anything. As there are some good reasons given, that lead to this result, use the following steps at your own risk. I haven’t experienced any problems with these steps, but who knows?
There are many cases in which you might want to extend capabilities of a plugin. As this is not that complicated at all and you can go edit every file within your plugin directory, this is not the best way doing this. Adding new methods to a library can easily be done by creating a new class extending the plugins one. I don’t like to edit any file within the plugin directory, as I am using svn:externals to install and update plugins.
Is it possible to share one user class among all apps within one symfony project? - Yes, it is! It is very easy, too. All you need is - surprisingly - a class, some changes in the factories.yml of the apps sharing the user class and that’s it!
Rails is doing it, Java is doing it very similar, you can do it in symfony, too: make use of the Single Table Inheritance pattern.
Let’s imagine you have a form set up and want to add some dynamic values to the object being saved by this form after the form has been submitted by the visitor.
As there are many situations in which you might want to use the HTTP status code “304 - Not Modified” symfony gives you an easy way in doing so. Especially while you are delivering dynamic content, it might not be that easy to determ whether the request has been modified or not. Sending the HTTP response header is one thing, later on you have to check against the If-Modified-Since HTTP request header sent to your application.
You might have thought about it - me too :) It’s one simple way to use subdomains to manage the chosen application of your symfony project.
Today I have written my first unit test in symfony in which one of the models has attached a propel behavior. In my case it was the sfPropelActAsSluggableBehavior. While writing the unit test I didn’t thought it would be a problem, until I finnaly ran the test.
Ich habe neben meinem Macbook natürlich auch einen Desktoprechner. Dieser läuft natürlich nicht den ganzen Tag durch, wer sollte auch die Stromkosten dafür aufbringen :). Dennoch wär es hilfreich, wenn ich den Rechner einfach hochfahren könnte - von überall. Die Technik dazu ist nichts Neues und trägt den passenden Namen ”Wake On LAN” (dt. Aufwecken über LAN). Ich hab mir also einfach eine Funktion geschrieben, die genau diese Aufgabe in PHP widerspiegelt und erfüllt. Den kompletten Quellcode kann man hier einfach downloaden und direkt benutzen.
Wer kennt es nicht? In heutigen Anwendungen wird es dem Benutzer immer einfacher gemacht, Ordnung zu halten. Einen kleinen aber feinen Beitrag leisten sogenannte Hilfslinien. Anwendungen, die mit mehreren Objekten arbeiten, nutzen diese Hilfslinien unter Anderem auch, um die Objekte zueinander auszurichten. Ich hab heute für das AzSMRC webUI genau dies in Javascript implementiert.
Ich habe nun einige Webseiten durchsucht und habe auch eine Lösung gefunden. Natürlich kann man seine eigenen mp3s in Klingeltöne umwandeln.