symfony-flex

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

我们两清 提交于 2020-06-16 09:25:03
问题 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 stick to the v4.4 version. symfony/monolog-bridge package respects it, so you cannot install symfony/monolog-bridge ~4.3.0 or ^5.0 . Yet you can install symfony/monolog-bundle ~3.5.0 , which is also expected, given it's just a bundle that is not part of the core Symfony

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

女生的网名这么多〃 提交于 2020-06-16 09:22:50
问题 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 stick to the v4.4 version. symfony/monolog-bridge package respects it, so you cannot install symfony/monolog-bridge ~4.3.0 or ^5.0 . Yet you can install symfony/monolog-bundle ~3.5.0 , which is also expected, given it's just a bundle that is not part of the core Symfony

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

爷,独闯天下 提交于 2020-06-16 09:21:11
问题 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 stick to the v4.4 version. symfony/monolog-bridge package respects it, so you cannot install symfony/monolog-bridge ~4.3.0 or ^5.0 . Yet you can install symfony/monolog-bundle ~3.5.0 , which is also expected, given it's just a bundle that is not part of the core Symfony

How write a Symfony Flex recipe for a new bundle?

江枫思渺然 提交于 2020-04-28 09:01:34
问题 I tried to find any documentation about using Symfony Flex but so far no luck. Almost all docs point to installing a bundle that uses symfony Flex, not how to create a bundle that is using it. I even tried to reverse engineer some of the packages but again, no luck. My goal is to generate a default configuration file for my bundle in config/packages/my_bundle.yaml . What I need to know is where do I need to put it and what env variables (if any) will I have available? 回答1: What is a Flex

How to generate document with Symfony 3.4 using Symfony flex

老子叫甜甜 提交于 2019-12-24 19:46:38
问题 With Symfony flex, one of the change is that there is no default bundle when using the symfony/skeleton. I don't find a way to use the command doctrine:mongodb:generate:documents in this context. Could you please tell me how to use it ? Exemple: php bin\console doctrine:mongodb:generate:documents App 2018-02-17T18:35:22+00:00 [error] Error thrown while running command "doctrine:mongodb:generate:documents AppBundle --document Test". Message: "No bundle AppBundle was found." In

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

筅森魡賤 提交于 2019-12-23 16:05:18
问题 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 expected. Try this: composer create-project symfony/skeleton test-maxmind-sf4 cd test-maxmind-sf4 composer req cravler/maxmind-geoip-bundle dev-master php bin/console list You will notice that: cravler:maxmind:geoip-update is not registered

Should I keep symfony.lock in my version control?

主宰稳场 提交于 2019-12-23 12:33:21
问题 I'm starting to use Symfony Flex to bootstrap my project and I realized that running composer install for the first time generates a file named symfony.lock for which I could find no documentation. What does this file do? Should I keep it in my version control and deploy it or should I .gitignore it? 回答1: Yes, officially you must add it to the version control: Flex keeps tracks of the recipes it installed in the symfony.lock file, which must be committed to your code repository. http:/

How can I retrieve my environment variables in a parameter file in Symfony4 structure?

此生再无相见时 提交于 2019-12-19 05:58:38
问题 I did a fresh Symfony installation by using Symfony Flex and the new skeleton belong to the next Symfony 4 directory structure. I add and configure a first third-party bundle : HWIOAuthBundle. This bundle is used to connect via Twitter using two secret information. I declare my consumer_id and my consumer_secret in the config/packages/hwi_oauth.yaml file. hwi_oauth: firewall_names: [secured_area] resource_owners: twitter: type: twitter client_id: XXXXXMyIdXXXXX client_secret:

Unable to generate an IRI for the item of type

╄→尐↘猪︶ㄣ 提交于 2019-12-16 18:04:31
问题 I am actually building an API based on: symfony/flex: v1.0.61 symfony: v4.0.3 api-platform/api-pack: v1.0.1 api-platform/core: v2.1.4 The CRUD operations were easy to implement. Nevertheless, the custom operation does not seem to be straightforward. The custom operation I am trying to implement will simply return a App\Entity\Product based on a given $slug . the route is: /api/products/by-slugs/{slug} the method is: GET the operation type is: itemOperations This is how things are being done:

Symfony 4 Doctrine not working from console [2002] No such file or directory

▼魔方 西西 提交于 2019-12-10 10:35:30
问题 I´m working with symfony 4 and this error ocurr when runnning doctrine console commands: In AbstractMySQLDriver.php line 108: An exception occurred in driver: SQLSTATE[HY000] [2002] No such file or directory I think this is because there´s something wrong with the connection but when I run the application it has access to the database without errors, so I can not imagine what is wrong with the connection. I was able to continue working by creating manually the database and using php bin