[Symfony 2] composer.json for a assumed-stable symfony 2 distribution

This small composer.json file is used in a project i am working on atm, feel free to use it at own risk. I will provide non-periodical updates and hopefully soon a full upgrade to symfony 2.1.x including doctrine orm 2.2.x.

I still did not get the point regarding dependency resolution, so i simply “composed” the composer file by writing down my own requirements (“i want only the hottest, newest stuff!!”, then tracked down the error messages, removing them by explicetly writing down the missing dependencies by using the latest “dev-*” versions. After that i tried to run the project, which actually did not work, but selective downgrade of some of the bundles (framework, security-extra blahblah) finally did the job. Continue reading “[Symfony 2] composer.json for a assumed-stable symfony 2 distribution”

Silverstripe Setup Script

We thought we had to improve our SilverStripe setup script for our development environment.
So Max and me rewrote it to add submodules and some other improvements.

Just run:

./install_silverstripe.sh mynewproject tags/2.4.7

and you have

  • silverstripe project folder structure
  • the tutorial theme
  • a already filled git repository
  • sapphire as submodule
  • cms as submodule
  • Uploadify as submodule
  • DataObjectManager as submodule
  • UserForms as submodule

Continue reading “Silverstripe Setup Script”

install silverstripe with some modules from GIT

This is a small shell script to set up silverstripe CMS
along with some modules i often use (as seen in ivo’s post)

The script has two parameters:
– the folder to clone the whole thing into
– the branch/tag to checkout afterwards

# install silverstripe + common modules from github
# usage sh install_silverstripe.sh <folder_name> <tag/branch>
# examples:
# sh install_silverstripe.sh some_folder tags/2.4.5
# sh install_silverstripe.sh some_folder master

Continue reading “install silverstripe with some modules from GIT”

[Symfony 2] Security Bundle: Set User Locale on Form Login

[UPDATE]
A recent update to this article may be found here: https://nerdpress.org/symfony-2-set-default-locale-on-form-login-2/

Das Security Bundle ist ein wenig magisch. Da muss man eine HTML-Form definieren, der Rest wird irgendwie konfiguriert (Namen der Post-Parameter wie “_username”, “_password” etc., den Redirect zum Referrer, Remember-Me Funktion und so weiter, das alles wird von der Firewall intern geregelt. Man muss nur eine Login-Route definieren, einen Stub-Controller + Action-Callable (der aber nie ausgeführt wird, weil die Firefall sich davorhängt), fertig.

Das ist angenehm einfach, solange man keine Fragen stellt. Aber wie führe ich zusätzliche Aktionen direkt nach erfolgtem Login aus, ohne Einfuss auf den Code des Security Bundles zu haben?

Continue reading “[Symfony 2] Security Bundle: Set User Locale on Form Login”

symfony 1.4 installer

Ich hab mal einen symfony 1.4 installer shell script auf github gepackt.
Damit kann man “ruckizucki” auf Ubuntu ein lokales symfony 1.4 Projekt aufsetzen.

Es ist ein fork von einem virtualhost create script und macht folgendes:

    – holt den letzten symfony 1.4 stable release via svn
    – setzt alle notwendigen rechte zB auf den cache folder
    – bereitet die datenbank vor
    – legt eine app an
    – macht eine .gitignore
    – und ruft das virtualhost creator script auf, was den vhost anlegt auf “web”

Continue reading “symfony 1.4 installer”