Skip to main content
Stack Overflow for Teams is now Stack Internal: See how we’re powering the human intelligence layer of enterprise AI. Read more >
Filter by
Sorted by
Tagged with
0 votes
0 answers
53 views

Symfony routing 5.4.48 (Without framework) use Symfony\Component\Routing\Route; use Symfony\Component\Routing\RouteCollection; use Symfony\Component\Routing\RequestContext; use Symfony\Component\...
yr4ik's user avatar
  • 29
2 votes
0 answers
70 views

What is the equivalent of this route requirements configuration in YAML format? #[Route('/foo/{bar}', requirements: ['bar' => new EnumRequirement(SomeEnum::class)])] https://symfony.com/blog/new-...
Thibault - Crovitche's user avatar
1 vote
3 answers
753 views

I have two routes GET /users/{id} and POST /users/{id}/file. When I try to call the second one (POST /users/{id}/file), I get an error 405 Method Not Allowed. I use Symfony 6.4. My routes are defined ...
phpdev's user avatar
  • 11
0 votes
1 answer
175 views

When calling a method in my controller, I encounter an issue with the @ParamConverter annotation in Symfony. The specific error I am facing is: App\Entity\Recipe object not found by the @...
nabil lambattan's user avatar
0 votes
0 answers
337 views

I'm new to Symfony and I'm trying to make a simple web page, afterinstalling docker, php 8.3 and composer, I downloaded a Symfony image (v5.4.20) and added doctrine to it Now, both the database and ...
Saleck's user avatar
  • 13
3 votes
1 answer
195 views

I have a controller action in my project based on Symfony 6.3: #[Route('/test')] class TestController extends AbstractController { #[Route('/events/page/{page<\d+>?1}/itemsPerPage/{...
Boolean_Type's user avatar
  • 1,340
1 vote
0 answers
828 views

I have a Symfony project in which all the routes work well except the only dynamic route service/{path}. I get the error "# unable to fetch the response from the backend: read tcp 127.0.0.1:52258-...
Templator Khan's user avatar
0 votes
0 answers
578 views

For some reason I need to register custom URL matcher in Symfony 6 but I'm getting weird error that my service doesn't exist: Service "App\Routing\QueryStringUrlMatcher" not found: the ...
user2497818's user avatar
0 votes
2 answers
851 views

I need to check if entered value, e.g "specialist", is not in use as an URL in Symfony 6 application. Simple ANY-method paths are simple: /** @var RouterInterface $router */ $router->...
JohnSmith's user avatar
  • 498
0 votes
0 answers
204 views

I am include an App.php (rounting) page but my front.php do not get the type RouteCollection object (Argument #1 ($routes) must be of type Symfony\Component\Routing\RouteCollection) I am doing the ...
Rbthaofic's user avatar
0 votes
0 answers
270 views

When I am defining routes in config/routes.php then those routes are not working in symfony 6.1 use App\Controller\BlogController; use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator;...
Prakash's user avatar
0 votes
0 answers
880 views

In a Symfony 6.1 project, I have created a TopicController with #[Route('/{topic}', name: 'topic.index', methods: ['GET'])] and then I created PhotographerController with #[Route('/', name: '...
Ariful Haque's user avatar
  • 3,750
1 vote
1 answer
538 views

I am trying to change the routes for my Taxons but cannot find a way to do it. Current: {domain}/taxons/{taxon name} Desired: {domain}/categories/{taxon name} After searching Google/Stackoverflow I ...
Stan Vanhoorn's user avatar
0 votes
1 answer
65 views

After migrating our site from version 8 LTS to version 9 LTS, I have some configuration problems with the routing. With RealURL we use the fixedPostVars, 'noMatch' => 'bypass'. For example with ...
SteveLeg's user avatar
5 votes
1 answer
1k views

I moved all my controllers to /src/Web/Controller in my Symfony 6 project like follows ├── src │ ├── ... │ └── Web │ | ├── Controller │ | ├── .... | |── Kernel.php my routes.yaml is ...
Shobi's user avatar
  • 11.7k
1 vote
1 answer
581 views

I am trying to create a new controller function in the overridden controller class but it doesn't work as intended. I have a common bundle where I use it for many clients. When sometimes when a client ...
Dula's user avatar
  • 1,424
1 vote
1 answer
2k views

I'm am trying to organize my controllers a bit more in a Symfony 5.3 application. They are in a couple of subdirectories and use annotations for their routing. Here are some samples: ../src/StuffA/...
ToBe's user avatar
  • 2,679
0 votes
0 answers
212 views

I use annotations to define routes in my project. I have a controller method that has such a route: /** * @Route("/{slug}", name="showcompany") */ public function show(Company $...
John Wick's user avatar
0 votes
1 answer
312 views

Recently while building my CMS in Symfony, I've run into a problem. I have 2 controllers, publicationcontroller and contactcontroller. In both controllers, an instance of the entity Page is loaded ...
Coderz99's user avatar
0 votes
2 answers
3k views

I'm using Symfony 3.4 I managed to get the PHP constant to work for a service (as described in the documentation). But I can't figure out how to get it to work in a routing file. Here's what I have so ...
Arafor's user avatar
  • 13
2 votes
0 answers
317 views

I can't realize, why Symfony generates the route kernel: resource: ../../src/Kernel.php type: annotation I read documentation https://symfony.com/doc/current/routing.html#creating-routes-as-...
zalex's user avatar
  • 797
4 votes
1 answer
2k views

I'm learning from scrach Symfony the version 5.0.1. I created a project with the --full option. The Annotations package is already installed. Here is my error : Class "1\HomeController" ...
Keys_fh's user avatar
  • 53
0 votes
2 answers
234 views

On Symfony 4, when catching a callback route from any external API service (in this case - Shopify API), my logged in user becomes anon. (HTTP): Everything works when testing on localhost (HTTPS): ...
aivarastee's user avatar
-1 votes
1 answer
66 views

I'm trying to use Internationalized routing. So for one route many URLs. But one route still being uniquely identified by its name. This is a great feature but the doc don't says how to deal with the ...
Vincent PHILIPPE's user avatar
1 vote
1 answer
173 views

We want to open a DELETE endpoint that allows calls to all positive integers, but not id 1 (aka element 1 cannot be deleted) Usually to open an endpoint that allows positive integers I configure the ...
Belen's user avatar
  • 1,003
0 votes
1 answer
1k views

Iam using react+symfony with webpack. Everything works with simple url eg. one slash in url ("/aboutus","/moodle") but when i try access route with multiple slashes("/admin/...
Pavel Šrytr's user avatar
0 votes
0 answers
53 views

I've used the Symfony route bundle and DI bundle in my non Symfony project. I inject dependencies to the controllers/actions by the code below: // Find the current route $parameters = $router-&...
Fatemeh Gharri's user avatar
-1 votes
1 answer
3k views

In this Symfony route /** * @Route("/board/{board}/card/{card}", name="card_show", methods={"GET"}, options={}) */ public function show(Board $board, Card $card): ...
Armin's user avatar
  • 16k
-1 votes
1 answer
845 views

I have this apache server configured in mydomain.com/applications and inside that folder I have /project1/ - using silex /project2/ - using symfony 4 The server uses mod_rewrite and mydomain.com is ...
Ricardo Martins's user avatar
1 vote
0 answers
622 views

I am trying to declare a subresource in my symfony app. I followed the api-platform doc about it: https://api-platform.com/docs/core/subresources/ The subresource does appear in the routes, but not ...
Tom's user avatar
  • 1,457
3 votes
1 answer
986 views

I have in my annotations.yaml following setup to use annotation route setup: controllers: resource: '../../src/Controller/' type: annotation prefix: en: '' sr: '/es' ...
samius polis's user avatar
8 votes
1 answer
4k views

I am trying to send a request to my custom StorefrontController on the latest Shopware 6.2.2 but I am getting the following error: PageController can't be requested via XmlHttpRequest. I am doing a ...
Huzaifa Mustafa's user avatar
5 votes
1 answer
4k views

I'm having a hard time trying to configure my routes using a config/routes.php file in Symfony 5.1. As per the Symfony routing documentation, I should be able to configure my routes in a PHP file: ...
Caconde's user avatar
  • 4,523
0 votes
1 answer
353 views

I'm trying to create a URL-structure like /maincategory/subcategory/ and this works, it looks good but with my code it loses the parameter "mwWsCategory2" and replaces it with the value under "...
Markenwirt's user avatar
0 votes
0 answers
230 views

With EventListener I use my lass TransactionListener. This class check permission for current url. Some URL are open. I check it by attribut "option" in routing.yml For getting option on current ...
Filip Štencl's user avatar
2 votes
1 answer
856 views

I'm trying to implement multiple controllers which listens to one route /account. There are two controllers and only one should be executed on that URL where the choice lies within user's role. ...
Nick's user avatar
  • 189
4 votes
2 answers
986 views

After upgrading to TYPO3 v9.5.14 our detail pages for news crash with the exception Symfony\Component\Routing\Exception\InvalidParameterException Parameter "p88bd715a41119d0e8087a5d19cb049" for ...
M Klein's user avatar
  • 563
0 votes
1 answer
1k views

I have functionm onKernelRequest when i want to add some custom header(in my case api=true||$request->headers->set('api', "true")) and in all Request $request i can get that header but when i ...
Vlad's user avatar
  • 100
0 votes
0 answers
1k views

In Symfony 3.4, is there a way to validate optional input GET parameters passed in through the querystring as integers? If provided, I am using the $ownerId and $courseId to query the corresponding ...
crmpicco's user avatar
  • 17.3k
0 votes
1 answer
474 views

I have at the moment two controllers. GitlabAuthController UserController I need to add the path prefix api to UserController only. Before I was trying following at annotations.yaml file: ...
nas's user avatar
  • 2,477
2 votes
2 answers
936 views

So basically I am trying to achieve this: New in Symfony 4.3: Always Include Route Default Values I have a task entity, which has multiple states like new, open & closed. For this reason I am ...
Syllz's user avatar
  • 340
1 vote
1 answer
209 views

Is there a possibility to configure routing in TYPO3 v9 to have .html applied to every URL? In ext:realurl and TYPO3 v8 (and previous versions) configuration defaultToHTMLsuffixOnPrev could have been ...
mcyg's user avatar
  • 327
-1 votes
2 answers
5k views

I know how to generate an URL for a route. However now I need to generate an URL for a controller or for a controller with a method. I checked the sourced of UrlGenerator but did not find any relevant ...
FreeLightman's user avatar
  • 2,312
1 vote
1 answer
923 views

I am using Symfony 4.2. When I set a route with an optional parameter, can I still use the route without a trailing slash? api_post: path: /api/drive/{slug?} controller: App\Controller\Api::...
ESP32's user avatar
  • 8,773
1 vote
0 answers
387 views

In TYPO3 Version 9.5.11 I would like to have my own URL rewritten with GET parameters. The URL looks like this: https://www.website.com/my-page/?logintype=login&dc=1246dh4bd6&code=...
Martin's user avatar
  • 83
0 votes
1 answer
462 views

I'm trying to setting up symfony/routing component on my project.. Things go well but when I define prefix for routes, it throw route not found exception for root path of this prefix. For example, ...
Hasan Teoman Tıngır's user avatar
3 votes
1 answer
1k views

I'm trying to start migrating my legacy project to Symfony, piece by piece (Strangler Application). I followed this documentation, but I can only load my home URL / of my legacy application. Other URL'...
Timo002's user avatar
  • 3,208
1 vote
1 answer
214 views

I'm creating a Symfony CMS by myself. I want to map paths like /login and /{slug} at the same time, but I don't know if it is possible. I tried simply setting both of the paths in 2 different ...
Dawid Cyron's user avatar
4 votes
1 answer
1k views

I'm in the process of upgrading Symfony from 3.4 to 4.3 and I have a situation in which every route is matched with controller and method correctly, but then the request reaches ...
domagoj's user avatar
  • 956
1 vote
1 answer
2k views

I'm new to Symfony and trying to learn the basics. I recently saw this question and I wanted to learn how routing works. So I copied the Controller1.php from the question and changed it to ...
user avatar

1
2 3 4 5