Questions tagged [symfony-flex]

Symfony Flex is a Composer plugin that helps developers install and manage Symfony applications, from the most simple micro-style projects to the more complex ones with dozens of dependencies. It replaces and improves the Symfony Installer and the Symfony Standard Edition, automating the most common tasks of Symfony applications, like installing and removing bundles and other Composer dependencies. Flex works for Symfony 3.3 and higher.

87 questions
5
votes
0 answers

why copy-from-recipe doesn't add any file to my base project?

I run a local flex server in my local pc (windows) from : https://github.com/moay/server-for-symfony-flex and I made a recipe with config/routes/api-form-bundle.yaml and my manifest : { "bundles": { "XXX\\ApiFormBundle\\XXXApiFormBundle":…
Mahsa.mnz
  • 69
  • 5
5
votes
1 answer

How to change Symfony's console script name

I just installed fresh copy of stable Symfony 4 as follows: composer create-project symfony/website-skeleton . I would like to rename the console script name though from bin/console to bin/symfony. How to do that? If I just rename it, after…
Mike Doe
  • 16,349
  • 11
  • 65
  • 88
5
votes
4 answers

Symfony 4 - 3rd-party bundle commands are no longer automatically discovered

According to the documentation, a command class must extend Command or ContainerAwareCommand to be automatically discovered and registered (provided its bundle is registered in the Kernel, of course). Since Symfony 4+, this discovery doesn't work as…
Ben
  • 845
  • 1
  • 8
  • 18
5
votes
2 answers

What is the purpose of the AuthenticatorInterface::supports() method?

In Symfony 4, the AuthenticatorInterface::supports() method has the following comment: interface AuthenticatorInterface extends AuthenticationEntryPointInterface { /** * Does the authenticator support the given Request? * * If…
Loupax
  • 4,728
  • 6
  • 41
  • 68
4
votes
1 answer

How composer `extra.symfony.require` restriction is enforced?

Let's say I have a Symfony v4.4 (Flex) project with the following block in the composer.json: "extra": { "symfony": { "allow-contrib": false, "require": "4.4.*" } } As expected, it restricts the Symfony core packages to…
zerkms
  • 249,484
  • 69
  • 436
  • 539
4
votes
3 answers

Webpack FOSJsRoutingBundle integration with Symfony Flex and Angular

I cannot get FOSJsRoutingBundle to work with Symfony Flex, Webpack and AngularJS. I've been using this bundle in Symfony 3 with AngularJS for a long time and there's never been an issue but with the introduction of webpack in Symfony Flex, the setup…
Dan
  • 11,914
  • 14
  • 49
  • 112
3
votes
2 answers

Error after upgrading to Symfony 5.3 and updading flex recipes (symfony:recipes:install --force)

Trying to perform a "minor" version upgrade (5.2 to 5.3) on a fresh/clean symfony 5.2 project (i.e. composer create-project symfony/website-skeleton:"5.2.*" s5test) Then i just add a home page for testing purposes…
pok_net
  • 358
  • 3
  • 12
3
votes
2 answers

PhpStorm and Symfony plugin: completion in config YAML's in Flex layout

This week I updated a project to Symfony 4 and Flex. It used to be that the PhpStorm Symfony plugin provided code completion in the app/config.yml file for all keys and sometimes values. However, now that that file is split up in multiple files in…
nickygerritsen
  • 325
  • 3
  • 12
3
votes
2 answers

Connect to Database Symfony 4 Flex

I am using Symfony 4 Flex.I using this tutorial . This is my my database connection information database_host: 127.0.0.1 database_user: root database_password: null At first i install Doctrine composer require doctrine maker and then i set my…
pedram shabani
  • 1,654
  • 2
  • 20
  • 30
3
votes
1 answer

Symfony 4 - Best practices / environment variables

I've been using parameters.yml for years but now it's time to switch to Symfony 4 with environment variables :-) I have several questions about deploying this on my server. I'm using Nginx + PHP-FPM. The documentation says we can set environment…
Ben
  • 845
  • 1
  • 8
  • 18
3
votes
1 answer

How to add middleware for one or two controllers in Symfony4?

I want a few controllers which have methods like this: public function syncAction(EntityManager $em) { $posts = $em->getRepository('App:Posts')->findAllByOwner($this->getUser()); return new JsonResponse(['ok' => true, 'posts' =>…
Anton Medvedev
  • 3,393
  • 3
  • 28
  • 40
3
votes
1 answer

Behat with symfony flex

I want to use behat with symfony flex When i inject service in behat context file inside constructor, the autowire dont works. I need to explicitly configure service to public to use that service in behat. Is there another way to inject service in…
3
votes
2 answers

Symfony - DoctrineBundle is not registered in your application

I have a problem with Doctrine Bundle. When i try entry to webpage i have error: The DoctrineBundle is not registered in your application. It's strange because in config/bundles.php i has: return [ …
3
votes
0 answers

How to generate admin class from symfony 3.3

How to generate admin class for one entity with symfony flex project and SonataAdmin? There are not more bundles, so "The bundle name:" fail on generating admin class. Any idea or suggestion?
cnoa23
  • 31
  • 2
2
votes
1 answer

Why do I get this error when I attempt to upgrade Symfony by changing `extra.symfony.require`?

I am trying to upgrade from Symfony 5.2 to Symfony 5.3. I don't know which packages to update Symfony so I was using the official site, and I have followed both: https://symfony.com/doc/current/setup/upgrade_major.html And also …
Bradmage
  • 1,233
  • 1
  • 15
  • 41