I don't know why show this error "[InvalidArgumentException] Driver "ORM" is unsupported for this extension" after Sylius Assortment Bundle installation with this documentation http://sylius.readthedocs.org/en/latest/bundles/SyliusAssortmentBundle.html
After adding these line In config.yml shows me error:
sylius_assortment:
driver: ORM
classes:
model:
product: Application\Bundle\AssortmentBundle\Entity\Product
Please any one suggest me What i am doing wrong..
The driver name has changed to doctrine/orm instead of just ORM. The documentation is out dated. I have fixed it and added a pull request. It should get updated soon.
With YAML (the config format) you must preserve the indenting
so indent the body of sylius_assortment with spaces:
sylius_assortment:
driver: ORM
classes:
model:
product: Application\Bundle\AssortmentBundle\Entity\Product
I solved it.I just add this code.Then it worked.
sylius_assortment:
driver: doctrine/orm
classes:
model:
product: Application\Bundle\AssortmentBundle\Entity\Product
Related
I have an installation of Symfony 4.3 and I upgrade it to 4.4.19.
On my old installation Sentry was working well with excluded_exception.
I use it like this on sentry.yaml :
sentry:
dsn: "https://key#sentry.io/id"
options:
excluded_exceptions:
- App\Exception\BadArgumentException
- App\Exception\BadFilterException
- App\Exception\BadRequestException
But when I upgrade to 4.4.19 symfony logs tells me that excluded_exceptions does not exist.
Sentry get each exception on my project. It works well so I don't understand why it doesn't recognize this option. (I've seen that it was add to sentry on v2.1).
I've tried to do a composer update sentry/sentry-symfony but nothing changes.
On my composer.json I have this on require part :
"sentry/sentry": "^3.1", "sentry/sentry-symfony": "^4.0",
So I don't know what to do now to fix this problem. I must forgot something maybe.
Please check upgrade file for Sentry Symfony 4.0.
According to this file sentry.options.excluded_exceptions configuration option was removed.
To exclude exceptions you must use IgnoreErrorsIntegration service:
sentry:
options:
integrations:
- 'Sentry\Integration\IgnoreErrorsIntegration'
services:
Sentry\Integration\IgnoreErrorsIntegration:
arguments:
$options:
ignore_exceptions:
- App\Exception\BadArgumentException
- App\Exception\BadFilterException
- App\Exception\BadRequestException
I'm trying to make migrations based on a diff of my entities.
I'm expecting for the initial run (and following runs) that doctrine generates a migration with the diff.
I've tried the following solution but this results in "No changes detected in your mapping information."
I've poked and went thru the doctrine migrations source code to see if I can extend/alter the behavior to no results.
I also found related issues in doctine dbal like this one and this one.
Is doctrine migrations still the way or is there another lib which is better suited for this problem?
I'm running PHP 7.4.4, Symfony 5.0.6, Doctrine Migrations 2.2.6 (latest stable), Postgres 12.1.
Doctrine config:
doctrine:
dbal:
driver: 'pdo_pgsql'
server_version: '12.1'
charset: utf8
url: '%env(resolve:DATABASE_URL)%'
dbname: storage001
default_dbname: storage001
Entity example:
/**
* #ORM\Table(schema="storage001", name="entityName")
*/
class EntityClass1
{
...
}
I am trying to configure the bundle from : https://symfony.com/doc/master/bundles/DoctrineFixturesBundle/index.html
and when I try to run the command :
$ php bin/console doctrine:fixtures:load
getting error:
In LoadDataFixturesDoctrineCommand.php line 95:
Could not find any fixture services to load.
You need to update (app/config/services.yml)
services:
resource: '../../src/DataFixtures/*'
https://symfony.com/doc/master/bundles/DoctrineFixturesBundle/index.html
Other problem is here in to the above tutorial
// src/DataFixtures/AppFixtures.php
namespace App\DataFixtures;
name space should be :
namespace DataFixtures;
I´m trying to make working doctrine2 extensions but it still wrotes me this error:
Fatal error: Class 'Gedmo\Tree\TreeListener' not found in /data/web/virtuals/48565/virtual/www/domains/kozusnikjan.com/Symfony/app/cache/prod/appProdDebugProjectContainer.php on line 1377
And I don´t know, how to solve the problem. Please, help. Here are some files:
http://pastebin.com/k9rqvGQn -- config.yml
http://pastebin.com/TvxbvEyS -- doctrine-extensions.yml
http://pastebin.com/prUFmrTb -- AppKernel.php
http://pastebin.com/0zAaHwW9 -- DoctrineExtensionListener.php
Thank you very much
Edit:
New files:
http://pastebin.com/qEAZtFba -- composer.json
http://pastebin.com/aBnvrZj9 -- config.yml
http://pastebin.com/E1aSSddm -- appKernel.php
I edited this files. I didn´t create any file. Thank you for your help!
You're using Gedmo directly. Try through StofDoctrineExtensionsBundle...
If you are using composer add to your composer.json at require section
"stof/doctrine-extensions-bundle": "1.1.*#dev"
and run composer update. You must load bundle on AppKernel.
then put on your config.yml
stof_doctrine_extensions:
default_locale: %locale%
orm:
default:
tree: true
May be you wanna find your problem, but I use Gedmo this way and works fine.
I know it's an old Problem, but I had this one too today. Solved it by declaring the tree listener as a service:
https://github.com/Atlantic18/DoctrineExtensions/blob/master/doc/symfony2.md#doctrine-extension-listener-services
It's the same for every Gedmo extension such as translatable, sluggable, timestampable...
I've a weird problem with propel.
My configuration in config.yml:
propel:
dbal:
driver: %database_driver%
user: %database_user%
password: %database_password%
dsn: %database_driver%:host=%database_host%;dbname=%database_name%;charset=UTF8
path: %kernel.root_dir%/../vendor/propel
phing_path: %kernel.root_dir%/../vendor/phing
I created my database with that command: php app/console propel:database:create and it worked very well but when I'm trying to create my first table with php app/console propel:model:build i've a fatal error telling: PHP Fatal error: Class 'Phing' not found.
I verified in the folder, everything is there. I guess that is an autoloading problem but I've followed the documentation at http://www.propelorm.org/cookbook/symfony2/working-with-symfony2.html and http://symfony.com/doc/master/book/propel.html
Any idea? Thanks a lot!
Which dependencies management system do you use?
This is an autoloading issue, and you should add the following definition:
$loader->registerPrefixes(array(
...
'Phing' => __DIR__.'/../path/to/phing/classes/phing',
));
where path/to/phing is the path where you installed Phing.