Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
72 views

BigCommerce PHP hello world app installation error with silex

I am new to the bigcommerce development. I am trying to create a bigcommerce app in localhost XAMPP server. I am getting this error. I have done making the localhost has https. created app in ...
Parthiv's user avatar
3 votes
0 answers
657 views

How to replace silex in a project and adapt it to php8

I have this in my project php. $app = new Silex\Application(); $app->register(new DerAlex\Silex\YamlConfigServiceProvider(realpath(__DIR__ . '/config/settings.yml'))); $app->register(new \Knp\...
rcn's user avatar
  • 53
0 votes
1 answer
157 views

Silex 2.3 and Symfony 4.4 - Uncaught Error: Call to a member function has() on null

We have an old but very large Silex application using a fork of Silex 2.2.5 and Symfony 3.4. We intend to migrate away from Silex, but the application is still under heavy development from multiple ...
Aaryn's user avatar
  • 1,633
0 votes
1 answer
567 views

Twig 2.8 removing spaces around statements [duplicate]

I am working on budget upgrade of legacy Silex 1.x and PHP5 based application to Silex 2.3 with PHP7.4 I am well aware that Silex is dead and, ideally, app should be migrated to Symfony but this is ...
Don's user avatar
  • 59
1 vote
0 answers
55 views

Silex Doctrine ORM Create Entity

I am trying to connect the doctrine, but I do not quite understand how I can create entities from the console, so for example, to make it easier to create Many to Many I have already connected the ...
Таня's user avatar
  • 242
0 votes
0 answers
850 views

How to disable CSRF checks for html-based forms in Symfony app?

I have this open source Symfony app and I need to disable CSRF checks either globally or at least for some <forms>. Besides 2 methods described below, I also tried removing various lines of code ...
yukitmp's user avatar
  • 15
0 votes
0 answers
119 views

Silex with ORM access layer and Entity, how to?

I want to add entities together with Silex. So that I can move the queries out of the controller. I have created an entity class, but when I call like: $sql = "SELECT * FROM todos WHERE id = '$id'"; ...
Gunnar Polte's user avatar
1 vote
0 answers
52 views

Silex redirection in controller

I'm new in Silex and trying to figure out my way here. I added a route in the controller but it seems to be not working. The path of my pages is like this (same with laravel I create a layout which ...
TheOneNewbie's user avatar
0 votes
1 answer
51 views

Why silex don't resolve App in consructor?

When I'm trying to use auto resolving dependencies in constructor I get an error, although in method it works ok. <?php namespace App\Controller; use Silex\Application; use Symfony\Component\...
ogbofjnr's user avatar
  • 1,946
0 votes
1 answer
166 views

Can't Http Delete Method on Simple PHP API using Silex - exceeded subrequest limit

I'm trying to get the hang of PHP and REST by writing a simple shopping list application. At the moment, I'm able to GET and POST to the API, however, everytime I try to run the DELETE method, I'm ...
Matthew Jones's user avatar
0 votes
1 answer
1k views

How to migrate a tiny Silex application to Symfony 4 with as low effort as possible?

I have a couple backends written as single-file Silex applications - basically the example from https://silex.symfony.com/ just with a couple more routes. No classes, no frills. Is there any way to ...
Marco Schuster's user avatar
0 votes
1 answer
2k views

How to access PHP defined constant in javascript of twig?

I have constants.php file autoloaded using composer in Silex. constants.php <?php define('SENT_SUCCESS_','Chat Transcript has been successfully sent'); define('INVALID_CASE_NUMBER','Invalid Case ...
kishor10d's user avatar
  • 553
0 votes
1 answer
35 views

The "portal_homepage" route must have code to run when it matches error

I am working on a project locally and get a LogicException thrown when trying to access the homepage. The back-end login and front-end login pages work fine, I can login to the back-end without a ...
Mantas's user avatar
  • 73
0 votes
0 answers
52 views

Lazy service injector PHPDoc

I am looking for a solution to declare properly a lazy service injector for the PhpStorm IDE. Here is an example: $app = new Silex\Application(); /** * ??? */ $app['file'] = function() { return ...
Samuel C.'s user avatar
5 votes
3 answers
294 views

htaccess/url rewrite with Silex, XAMPP, and multifolder structure

I've tried searching multiple previous threads on setting up url rewrite correctly for a Silex application on XAMPP, but still can't figure this issue out. Here is what I am trying to accomplish. I ...
user521990's user avatar
1 vote
1 answer
54 views

Q: Silex 2.3 and custom form type should use custom template

My goal with Silex 2.3 and Symfony 4.2.0 is to write a custom form type. This form type should show an image and a text field (or choice, I do not know yet). Let's call it TextImageType. So, I ...
Sixtus's user avatar
  • 165
0 votes
1 answer
64 views

Silex: Defining string as type hint for route parameter it shows string not exist

We are using Silex, version 2.0.2 and PHP 7.0.1. In one of the routes a parameter is passed, as follows: test: path: /auth/{token} defaults: { _controller: 'Dummy\Controller::getToken' } ...
foxtrot's user avatar
  • 1,096
0 votes
1 answer
108 views

Silex internal redirect with URL change?

I'm using Silex and I'm trying to redirect from one to another route, but with changing URL. I've tried a few things so far. 1) Using Sub-Request, works but URL does not change. 2) Using Normal ...
AnC's user avatar
  • 651
1 vote
1 answer
145 views

Site accessible with multiple URLs

I'm using the micro framework Silex on my website hosted on a VPS. So, the site files are in the /site_name/public_html/ folder but, with Silex, the site must point to the /site_name/public_html/web/ ...
cyclone200's user avatar
-1 votes
1 answer
147 views

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 ...
Erich's user avatar
  • 535
5 votes
2 answers
2k views

Unable to parse a valid JSON

My api sends back a JSON response like this using PHP Silex: {"response":true,"message":"Bla","userId":"AAA"} But i can't parse it in my Typescript frontend this.authService.login(body).then((...
Yassine's user avatar
  • 173
0 votes
0 answers
113 views

I can't register my database! DoctrineServiceProvider is said to never be used more

I am new at programming and came across some problems recently. I don't know what am I doing wrong because the code itself seems to be just fine (it should work). Ok, so, I'm using Silex framework and ...
Bociek's user avatar
  • 1
0 votes
1 answer
574 views

How to convert curl to fopen stream

I am working with a custom Silex (Symphony) CMS. One of the custom modules uses google/apiclient (https://packagist.org/packages/google/apiclient) module for fetching YouTube video channels and video ...
Andrew Brown's user avatar
1 vote
0 answers
147 views

Ionic upload multiple files to php api

I have an Ionic app that lets users upload 5 videos to the server in order to get one video compilation of their videos. So far I can upload only one video and grab it in my PHP Silex API. This is ...
Yassine's user avatar
  • 173
0 votes
1 answer
314 views

Upload multiple videos from Ionic to PHP API

i have an Ionic app that lets a user take 5 videos and upload them to my PHP API, the PHP API expects 5 videos in the POST request so it will generate a compiled one and send the link to it back to ...
Yassine's user avatar
  • 173
4 votes
0 answers
640 views

[swagger-codegen][php-symfony] No entrypoint in generated code?

I am attempting to generate a php-symfony server stub using swagger-codgen but I am not getting an index.php (or app.php or anything like that). When I generate a server stub using the php-silex ...
Mike Furlender's user avatar
0 votes
1 answer
68 views

Mount/Use controller in console

In a Silex console command I want to perform a sub-request on a controller route. Unfortunately routes don't seem to be imported when executing a command by default. I always get the following error: ...
Felix's user avatar
  • 126
0 votes
1 answer
455 views

silex root folder files unable to access from url

I have a website using Silex. I have uploaded few files in root folder like robots.txt and few push notifications sdk. Problem is getting error when I am trying to access that file using url : ...
ansh's user avatar
  • 1
0 votes
0 answers
136 views

Silex match GET but no POST

Something extremely unusual is happening to me. I have a simple REST API application that handle everything with ControllerProviders. So, in controllers.php I defined $app->mount('/login', new ...
fedejinkis's user avatar
1 vote
1 answer
3k views

Grouped routes in multiple controllers in Symfony 4

I'm rewriting my Silex-based application to Symfony 4, as the Silex will be deprecated in a while from now. Everything works great so far, but I have a problem with nested routes. I had lots of ...
Dawid Zbiński's user avatar
0 votes
2 answers
341 views

How can I find unused libraries in a Symfony project with PhpStorm?

I try to find and also to delete all the unused libraries in a project. For example I have a folder lib/ with lot of other folder which are the famous libraries. I want to know how I can identify ...
Mathieu Dumez's user avatar
1 vote
1 answer
130 views

How to log requests when using Silex JWT authentication call and return custom message for invalid token

I'm using Silex framework + JWT token Sample code is as follows, Example from this link $app->get('/api/protected_resource', function() use ($app){ // Loggger }); Everything is working fine. ...
Divesh Oswal's user avatar
0 votes
0 answers
62 views

I have a Site in Silex i want to run other CMS

I have a Root Site running properly in Silex i want to run other CMS in domainname.com/news now the problem is bcos of route it giving me error No route found for "GET /news/" how to make this work ...
ansh's user avatar
  • 1
-1 votes
1 answer
88 views

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 ...
Mickaël Leger's user avatar
1 vote
1 answer
848 views

Cannot override frozen service "twig.app_variable" - Dynamic path to asset function

I understand the error I get but can't figure why... So here is my problem and why I got this error : 1/ I have a php variable $wdep that give my the path where I need to find my /web file (css, js, ...
Mickaël Leger's user avatar
3 votes
1 answer
249 views

Silex 2 : Security firewall error with locale (Silex SecurityServiceProvider + Pmaxs\LocaleServiceProvider)

I saw this solution but I can't make it works... So here is my code, what I tried and what I get : My code 1/ My Security Provider : $app->register(new Silex\Provider\SessionServiceProvider()); ...
Mickaël Leger's user avatar
0 votes
2 answers
2k views

Add translation in Twig template from Javascript/Jquery

I am working on my form validation and I want to display different error message according to the error I get. I am using Silex and Twig with the translator component and balloon.css for the tooltip ...
Mickaël Leger's user avatar
5 votes
4 answers
608 views

Silex : allow user to change langage by clicking on html element and keeping clean URL

I am using Silex and Twig for a website and I want to allow the user to change the langage of the site. My problem Right now, it works if I change the locale in the URL : /my-account: my page ...
Mickaël Leger's user avatar
1 vote
0 answers
103 views

Doctrine Select with Join -- Silex

I am trying to make a SELECT within a Doctrine join, and am getting Error: Invalid PathExpression. Must be a StateFieldPathExpression. I have the following Doctrine query, which correctly returns ...
Sam's user avatar
  • 755
0 votes
0 answers
50 views

Silex - weird cache behaviour

I have been developing the website with Silex and I experienced that the frontend just doesn't update immediately when I upload an image from the backend. Even I set the cache mode to be false it ...
warmjaijai's user avatar
  • 1,011
1 vote
2 answers
180 views

Keep a trace of the username with Monolog in a Silex app

I have a Silex application within I have set up a Monolog logger service. In debug mode, the logs are like (INFO level): [2018-02-21 09:08:26] appName.INFO: > GET /customers [] [] [2018-02-21 09:...
Canuto-C's user avatar
  • 421
3 votes
0 answers
64 views

Silex infinite-redirect routing issue with mounted ControllerProviders

I am trying to mount a book-register under domain.tld/list which should print the default list when nothing is appended other than /list, but also provide actions including parameters like for example:...
radonthetyrant's user avatar
0 votes
0 answers
86 views

Silex : Simple Authentification Users

I develop at present an application under the framwork Silex. I shall like using a system of authentification but I am novice on this framwork and I does not still understand everything even if I am ...
Victor's user avatar
  • 1
0 votes
1 answer
322 views

Silex basic Authentication -custom failure handler

I'm building an api using Silex and I require the end-user to send credentials via basic authentication http header tag. I want to create a custom authentication failure handler I tried this but it ...
nullException's user avatar
0 votes
0 answers
220 views

MLM Bonus Cronjob

I have this MLM script that I am working on. Although the project was not originally by me, I'm modifying for a client. I set up a cron job to execute the daily bonus but cron job returns sorry back ...
Ikemefula's user avatar
2 votes
1 answer
230 views

Silex web test fails

I'm trying to write a simple web test to test my silex api using phpunit but I keep getting this error when i try to run it.. 1) App\Tests\BlogControllerTest::testInitialPage TypeError: Argument 1 ...
nullException's user avatar
0 votes
1 answer
153 views

Assert in silex with defined options

Want to assert a function in Silex with some pre-defined slugs. My idea is to have this code, but to have the choice to add in the slug assert some different assertions as 'about-us', 'contact' and '...
Louis B's user avatar
  • 306
0 votes
1 answer
165 views

Silex security.firewalls and multiple firewalls

I'm attempting to use Silex to secure routes on an internal system I'm developing. It's perhaps a little special situation, where I have an interface (accessible at /admin) which, when logged in, ...
Andrew Plank's user avatar
  • 1,009
2 votes
0 answers
64 views

Show a HTML dialoge with Twig and Silex using template inheritence

I'm using Silex with Twig and want to show a (HTML-only, no JS) dialog/alert-div/form to the user after an action was selected. This dialog should be shown on the same page the action was initiated on ...
MaPePeR's user avatar
  • 983
1 vote
1 answer
367 views

Stripe : handling charge/customer errors then insert data into DB in PHP

I am working with Stripe in Silex. Here, in my route I am getting data from the form, then I want to create a $customer and a $charge objects, then I want to save customer and order info into my ...
DevMoutarde's user avatar

1
2 3 4 5
28