Skip to main content

31 posts tagged with "Symfony"

View All Tags

Silex and the TranslationServiceProvider and some Composer magic

This blog post might be outdated!
This blog post was published more than one year ago and might be outdated!
· 2 min read
Stephan Hochdörfer
Head of IT Business Operations

First time I am toying with Silex and the Symfony components. To demo an application for one of our customers we quickly set-up Silex and put a small application on top. Since the application was in need for a I18N solution I threw in the TranslationServiceProvider. The documentation of Silex states that "you can simply clone the whole Symfony2 into vendor" which did not make any sense to me. Why using a micro-framework when I have to have Symfony2 installed just for the translation part? I was looking for a alternative and remembered Composer. Composer is a tool written in PHP that helps you manage your project or libraries' dependencies. Luckily the Symfony2 components are using Composer, so we can easily install the required dependencies like this: