Skip to main content
Filter by
Sorted by
Tagged with
1 vote
1 answer
121 views

I'm using Symfony 7.2 and EasyAdmin 4. I'm trying to execute code in a trait that recovers the currently logged User and the current Session, and uses them to initialize an attribute of the class it ...
Stephen Cantini's user avatar
0 votes
1 answer
340 views

In Symfony 7 app, I'm mapping request with MapQueryString/MapRequestPayload attributes. Controller's endpoint returns validation errors if request's parameter is of the wrong type. Here it is of type ...
Oleg Vartanov's user avatar
0 votes
2 answers
147 views

I've got a JSON login query which works in curl (ie I'm sending the data and it finds the user). I want to create a behat test to check it, but I cannot reproduce it in my behat test, and the test ...
Orange Lux's user avatar
  • 2,129
1 vote
0 answers
160 views

A user is able to upload a file. During the upload the file is scanned. If there is an issue with the file Symfony returns a Response(400) and the rest of the file is not uploaded, saving the user and ...
lookbadgers's user avatar
0 votes
1 answer
94 views

I'm using the Concrete CMS which leverages the Symfony-HTTP-foundation component for Session management. I have everything working, but I'm curious about some strange behavior I'm seeing. Take this ...
ScoobaSteve's user avatar
0 votes
1 answer
347 views

I use the stand alone HttpFoundation component of Symfony in my MVC app, and native PHP files for the view templates (not Twig). The functions in the controller can successfully execute a URL ...
blsn's user avatar
  • 1,075
1 vote
1 answer
2k views

I have two pages, one to show the list of agencies, and one to add a new one. I can easily access to http://localhost:8000/create from http://localhost:8000, but if I try to reload the page I get the ...
JeanneMeoy's user avatar
0 votes
0 answers
639 views

Argument 1 passed to Symfony\Component\HttpFoundation\InputBag::get() must be of the type string, null given, called in D:\Syed Ghazanfar\Futafut\Backend\v2\vendor\laravel\framework\src\Illuminate\...
Ghazanfar Syed's user avatar
0 votes
0 answers
202 views

Our Symfny application allows to print labels on a sheet with 6 labels. The user can specify an additional text for each label and whether to print it or not. At the moment HTTP GET parameters contain ...
fishbone's user avatar
  • 3,279
0 votes
1 answer
135 views

I am using Lumen for a set of APIs. using streamedresponse built in library of symphony. use Symfony\Component\HttpFoundation\StreamedResponse; protected function getFileResponseHeaders($filename)...
Shahid Rafiq's user avatar
0 votes
0 answers
171 views

The original post: https://github.com/symfony/symfony/discussions/43960 I want to use a QueryParam attribute to read a query string into a Controller method argument. An example controller class. #[...
Hantsy's user avatar
  • 9,611
4 votes
2 answers
4k views

How to intercept a request and send it with HttpClient to another server and return the response from that server after some modification? The original request will contain data and files. I am ...
Jacek Krysztofik's user avatar
0 votes
0 answers
302 views

For unpublished pages, the current behavior is a 404 error, I wish to have an 410 error only for the pages which were previously published and subsequently unpublished. Is it feasible ? Thank you.
L.wadii's user avatar
  • 59
1 vote
0 answers
713 views

I am using symfony to create an API to update some dataset. One of the possible update is coming from a third party through an HTTP request which does not include user agent specifications. As a ...
Bagnouf's user avatar
  • 11
2 votes
2 answers
1k views

Since my project has deployed multiple domain names, the API interface that needs to be tested is using the api.example.test domain name as the entrance. Using $this->get('/v1/ping') in Feature ...
Liam Wang's user avatar
1 vote
2 answers
3k views

I need to re-generate the URL of my page, removing the additional parameters. For example: when I receive: /bao1/bao2/?removeMe1=anything&keepMe1=anything&removeMe2=&keepMe2=anything I ...
Dr. Gianluigi Zane Zanettini's user avatar
1 vote
1 answer
2k views

I have a Controller that must forward the received request (changing some query parameters) to another server, and returns it's response (with same headers, status and body). I decided to use ...
Ricardo Martins's user avatar
3 votes
1 answer
893 views

Running Laravel behind Traefik as reverse proxy, with a Path Prefix (eg /api/ => Laravel). Laravel is served by Nginx and Php-fpm. Laravel use Symfony HTTP foundation to generate route URL. Symfony ...
Thomas Decaux's user avatar
1 vote
1 answer
239 views

I have a route configuration: <route id="some_route" path="/special/path/{some_strings}"> <default key="_controller">SpecialControllerBundle:Default:index</default> ...
EdvinasPocius's user avatar
4 votes
2 answers
1k views

I'm using Symfony and API Platform and I'd like to filter on nested properties. While this looks very simple, when I go to: http://localhost:8000/api/offers?product.color=red The request is ...
Stephan Vierkant's user avatar
1 vote
0 answers
266 views

The docs only state that it's user-provided input and therefore not to be trusted. That much makes sense since we never trust user input, but in what ways could a malicious user cause damage with this ...
Michael Cordingley's user avatar
1 vote
1 answer
60 views

I am trying to get both fields in an api enpoint so that it queries based on that. example. api/evenSession/123123123/eventSession?token=1234656&filter= chris moreno my controller searches by ...
user avatar
1 vote
1 answer
1k views

I've been assigned to a project which needs include the Symfony components in order to re-organize its business logic. However, I got confused by looking at the Symfony HTTP-foundation document. Hope ...
Hazel Wang's user avatar
4 votes
0 answers
2k views

I usually don't post any question on Stack Overflow because I always find an answer to whatever problem I'm in trouble with. But here, I haven't found a clear answer so if you can help me, thanks a ...
Benjamin Martinez's user avatar
2 votes
1 answer
4k views

I use symfony HttpFoundation for upload files, the FileBag works if I call all(), but if I use get('document_name') it return null. use Symfony\Component\HttpFoundation\Request; public function ...
samius polis's user avatar
0 votes
2 answers
241 views

I'm trying to resurrect an old Symfony 2.11 project for a client who hasn't the budget for a re-write to upgrade it to something more modern. One of the routes provides raw image data in it's response ...
James Amner's user avatar
0 votes
1 answer
1k views

I'm using Symfony to build REST APIs. I'm in a situation where I want to do some actions in the kernel.terminate event, but I want to make sure that the request was successfully processed before doing ...
Boulzy's user avatar
  • 456
0 votes
0 answers
122 views

I'm trying to trigger an event when a download completes. Currently, my Controller just returns the Response, but as far as I can tell there's not way for me to know when the download has actually ...
robert.bo.roth's user avatar
0 votes
0 answers
515 views

How can I get PUT body parameters using HttpFoundation component (without Symfony)? According the docs Request::createFromGlobals only about POST, GET ... but not PUT. So here I cannot use like $...
Elena Forester's user avatar
3 votes
0 answers
473 views

If I use $response->send() then this code is executed: public static function closeOutputBuffers($targetLevel, $flush) { $status = ob_get_status(true); $level = count($status); ...
hapeb's user avatar
  • 33
0 votes
0 answers
279 views

This is happening in a legacy PHP application that was not built using the Symfony framework, only parts of Http-Foundation are used. So nothing is creating the Request for us, instead we create it ...
Sophia's user avatar
  • 1
0 votes
1 answer
246 views

Recently I updated a symfony project from 3.2 to 3.3. I have an issue with a simple POST with a file. The file is not in the filebag of the http foundation object Request. public function sendAction(...
d3cima's user avatar
  • 729
2 votes
2 answers
3k views

I use the Symfony http foundation stand alone (aka i installed the http-foundation package with composer inside my non-symfony project). Ik would like to change the name of the session cookie. What ...
Jasper Rooduijn's user avatar
2 votes
1 answer
2k views

I'm getting the following error when I try to run php artisan on a clean install of Laravel 5.1.43 on a Vagrant box. I've listed the versions below. PHP Fatal error: Class 'Symfony\Component\...
Michael's user avatar
  • 4,420
1 vote
1 answer
1k views

I have a login processing file in which I am attempting to set a cookie: $expTime = time() + 3600; $key = getenv("SECRET_KEY"); $token = array( "iss" => request()->getBaseUrl(), "sub" =&...
jpradcliffe's user avatar
0 votes
1 answer
4k views

I have the class that returns values from HttpFoundation request object. I want to write tests for that class and I have problem. That is my class: class RequestCollected { private $request; ...
jager91's user avatar
  • 282
0 votes
2 answers
459 views

Scenario: I have no AJAX. I have a search form with GET method and csrf_protection disabled that filters the entities showed and paginated in myEntityListAction, reachable at the uri /myapp/myentity/...
ste's user avatar
  • 1,579
5 votes
1 answer
5k views

I want to retrieve the basic authentication credentials from Symfony's HttpFoundation component. A cursory look at the docs reveals nothing; is there a way I can do it? (I'm using the HttpFoundation ...
user avatar
2 votes
0 answers
306 views

I'm currently developing a base application for my projects and something doesn't seem right. First of all, I'm using PHP 7, Apache. Composer is first called, it does its magic and all the goods. ...
CoreModule's user avatar
1 vote
1 answer
511 views

I'm facing some weird issues when Firefox tries to load PHP generated image files. Occurs on Mac and Windows (7, 8, 10). The Firefox console says: Image corrupt or truncated. Everything works fine ...
user avatar
0 votes
1 answer
853 views

I am trying to read an XML file in a Symfony project, to send the data to the front end. As the XML file is huge, I am using a combination of XMLReader and SimpleXML (as suggested in this thread: How ...
Mahcih's user avatar
  • 23
2 votes
2 answers
3k views

I have a ZIP File to be served via Symfony. The controller looks like this: $headers = [ 'Content-Type' => 'application/zip', 'Content-Disposition' => 'attachment; filename="archive.zip"...
Jarek Jakubowski's user avatar
3 votes
1 answer
1k views

I'm writing an app on Silex in accordance with the documentation but with some additions. I declare the route, after middleware for route and finish middleware for app. $app->put('/request/', ...
IvanMalenko's user avatar
2 votes
0 answers
57 views

Ran into a strange problem - after submitting a form via POST with enctype="multipart/form-data", Doctrine crashes with Fatal Error: Fatal error: require(): Failed opening required '[PATH/TO/DOCTRINE]...
Anastasia Sitnina's user avatar
4 votes
1 answer
1k views

I am using the HttpFoundation component in my project without using the full Symfony2 framework. I try to make a RedirectResponse if some credentials are true and redirect the user (like stated in the ...
Ivan's user avatar
  • 5,258
0 votes
0 answers
38 views

Why the variables $request, $files and $query are defined as public ? Why they were not defined private or protected? Check here the Request class
tirenweb's user avatar
  • 31.9k
3 votes
2 answers
2k views

I am using the HttpFoundation in my small project: use \Symfony\Component\HttpFoundation\JsonResponse as JsonResponse; Unfortunately all my responses (tried JsonResponse, Response and ...
PrimuS's user avatar
  • 2,713
2 votes
2 answers
2k views

I'm using this to output a pdf document : $response = new \Symfony\Component\HttpFoundation\Response(file_get_contents($thefile), 200, [ 'Content-Description' => 'File transfer', 'Content-...
trogne's user avatar
  • 3,582
2 votes
1 answer
515 views

About Symfony Request Stack I've read below page multiple time . and also I haven't found another blog post or some thing on web world introduce this Symfony class. "http://symfony.com/blog/new-in-...
Majid Abdolhosseini's user avatar
2 votes
1 answer
201 views

I'm making a website with categories and products. The categories and the products are both contenttypes. Categories can't be a taxonomy type because the editor of the website has to change data for ...
user avatar