Questions tagged [silex]

Silex is a PHP microframework for PHP >=5.3. It is built on the shoulders of Symfony2 and Pimple and also inspired by Sinatra.

Silex is a PHP microframework for PHP. It is built on the shoulders of and and also inspired by .

As of March 2018, the latest stable release of Silex is 2.2.3. For actual improvements check out the changelog.

Silex became end-of-life in June 2018 and is not maintained anymore. Its advised to now use symfony 4 and flex to replace Silex. More information here: https://symfony.com/blog/the-end-of-silex

Information

A microframework provides the guts for building simple single-file apps. Silex aims to be:

  • Concise: Silex exposes an intuitive and concise API that is fun to use.
  • Extensible: Silex has an extension system based around the Pimple micro service-container that makes it even easier to tie in third party libraries.
  • Testable: Silex uses Symfony's HttpKernel which abstracts request and response. This makes it very easy to test apps and the framework itself. It also respects the HTTP specification and encourages its proper use.

Useful links

1363 questions
0
votes
0 answers

Silex - Images (and Stylesheets and JavaScripts) and Hotlink Watermarking

I'm transitioning my website to Silex (first time working with a framework), but the images aren't showing up. This is my .htaccess: Options -MultiViews RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f …
Squis
  • 921
  • 2
  • 8
  • 14
0
votes
0 answers

Silex form validation along with translation provider

I use the latest version of Silex (not the Phar-Version). I have a problem to implement the form-service provider along with the translation provider, i get the following error: "Fatal error: Class 'Symfony\Component\Config\Resource\FileResource'…
high54life
  • 55
  • 1
  • 6
0
votes
1 answer

silex.phar redirecting me

I am using a local domain, mysite.dev, and when I access a url that would be served by silex it redirects me to www.mysite.dev I was able to single out the line causing the problem in my code: require_once __DIR__.'/vendor/silex.phar'; anyone know…
tipu
  • 9,464
  • 15
  • 65
  • 98
0
votes
1 answer

Symfony2 with Silex validation still in English

I'm building an application in Symfony2. I want to get the translations of validation messages. I read about Silex, but not have idea how to integrate with Symfony2, if i need to install something, or where i need to configure my project. I already…
Gabriel Muñumel
  • 1,876
  • 6
  • 34
  • 57
0
votes
1 answer

Get access to silex $app in custom Exception constructor?

I would like to use set of custom Exception classes in my project based on silex (silex.sensiolabs.org) framework. I prefer to write an error message into log file in function "__construct". Is there a way to access to $app['monolog'] inside…
Algis
  • 312
  • 4
  • 14
-1
votes
1 answer

how to deal with silex end of life for single page REST app

We have a large Silex/Angular app that is essentially a single page REST app. We use Silex security throughout the PHP side. With the end of life of Silex here, we're trying to figure out the best route to maintaining the app. We're…
Erich
  • 499
  • 1
  • 13
  • 34
-1
votes
1 answer

How to put part of my Controller logic outside my Controller? (one "big" service or multiple services)

Maybe it's a trivial question but I'm beginner with Silex and I don't know how to do it...so here is my situation : I have a Silex app, everything works but I'm not a big fan of my Controller because there is a lot of code and I reapeat this code…
Mickaël Leger
  • 3,426
  • 2
  • 17
  • 36
-1
votes
1 answer

Remove script filename from url in silex

I'm trying to remove from the URL bar the index.php script name with htaccess. This is my htaccess file: Options -MultiViews RewriteEngine On RewriteRule ^ index.php [QSA,L] RewriteCond %{REQUEST_FILENAME}…
Louis B
  • 306
  • 5
  • 18
-1
votes
1 answer

Attempted to call function from namespace - Silex PHP

I have two doubts about my development in Silex PHP. usersController.php namespace myworkplaces\controllers; use Silex\Application; use Silex\Api\ControllerProviderInterface; use Symfony\Component\HttpFoundation\Request; use…
Epifanio
  • 13
  • 2
-1
votes
1 answer

Login from Android application to a Silex REST API

I developed an API in PHP using Silex, and i would like to be able to access it from an Android application and a website. I already developed the website, who is able to access the API perfectly. I tried to do the same with my Android application…
Robin TL
  • 1
  • 2
-1
votes
2 answers

silex custom/persistant remember me

I want use the class PersistentTokenBasedRememberMeServices or my custom class for delivery the remember me token but I dont know how to configure it into Silex 2. How can I do ? Thanks in advance. EDIT : I know the default remember me configuration…
-1
votes
1 answer

Sentinel session error when used with Silex/Symfony

My Silex app uses Sentinel for authentication. How can I fix this error? PHP Warning: ini_set(): A session is active. You cannot change the session module's ini settings at this time in…
Karim Mtl
  • 1,223
  • 3
  • 11
  • 39
-1
votes
2 answers

Migrating from Silex to Symfony

I'm in the middle of migrating some Silex code to a Symfony project..I was wondering what the Symfony equivalent is for registering Pimple services like these: $app['service.test1'] = $app->protect(...) $app['service.test2'] = $app->share(...) Any…
Oli
  • 2,370
  • 2
  • 26
  • 42
-1
votes
1 answer

Token/stateless auth in Silex application with a Microservice architecture?

I would like to use Silex as a base framework for couple of services. It would be used by different clients and apis (mobile, web etc.) so I'm generally trying to avoid cookies/session and 'do it' using headers. Setup/flow of what I'm trying to…
Tom St
  • 908
  • 8
  • 15
-1
votes
1 answer

Silex and htaccess to /web

I m actually creating a simple application using Silex and I m having some problems. Actually, I run on an Apache 2 server and I have the fallback /index.php set in my ht access at the root of my application. In fact, I actually have to get these…
Thomas thomas
  • 795
  • 2
  • 9
  • 19
1 2 3
90
91