Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: keep_database_and_schema config is ignored it is always false with SQL Server #235

Open
FireOlex opened this issue Jul 20, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@FireOlex
Copy link

FireOlex commented Jul 20, 2023

Preconditions

-------------------- --------------------------------- 
  Symfony                                               
-------------------- --------------------------------- 
  Version              6.3.1                            
  Long-Term Support    No                               
  End of maintenance   01/2024 (in +195 days)           
  End of life          01/2024 (in +195 days)           
-------------------- --------------------------------- 
  Kernel                                                
-------------------- --------------------------------- 
  Type                 App\Kernel                       
  Environment          dev                              
  Debug                true                             
  Charset              UTF-8                            
  Cache directory      ./var/cache/dev (7.7 MiB)        
  Build directory      ./var/cache/dev (7.7 MiB)        
  Log directory        ./var/log (535 KiB)              
-------------------- --------------------------------- 
  PHP                                                   
-------------------- --------------------------------- 
  Version              8.2.7                            
  Architecture         64 bits                          
  Intl locale          n/a                              
  Timezone             UTC (2023-07-20T09:00:53+00:00)  
  OPcache              false                            
  APCu                 false                            
  Xdebug               false                            
-------------------- --------------------------------- 
  LiipTestFixturesBundle
-------------------- --------------------------------- 
  Version 2.6.0

Steps to reproduce

Creating config file for liip.

# config/packages/test/liip_fixtures.yaml
liip_test_fixtures:
  keep_database_and_schema: true

Expected result

When I run the debug command it should say true. And when I run my test the bundle should not try to create the table and schemas.

php bin/console debug:config LiipTestFixturesBundle keep_database_and_schema

Current configuration for "liip_test_fixtures.keep_database_and_schema"
=======================================================================

true

Actual result

When I run my test LiipTestFixtureBundle try always to create the Table and Schema and Ignores my config.
I also run the command

php bin/console debug:config LiipTestFixturesBundle keep_database_and_schema

Current configuration for "liip_test_fixtures.keep_database_and_schema"
=======================================================================

false

Thes are my logs from the tests.

php -d memory_limit=4G vendor/bin/phpunit
-------------------- --------------------------------- 
Logs
-------------------- --------------------------------- 
PDOException: SQLSTATE[42000]: [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]Object is invalid. Extended properties are not permitted on 'dbo.[user].roles', or the object does not exist.

/var/www/html/vendor/doctrine/dbal/src/Driver/PDO/Connection.php:32
/var/www/html/vendor/doctrine/dbal/src/Driver/Middleware/AbstractConnectionMiddleware.php:46
/var/www/html/vendor/doctrine/dbal/src/Driver/Middleware/AbstractConnectionMiddleware.php:46
/var/www/html/vendor/doctrine/dbal/src/Driver/Middleware/AbstractConnectionMiddleware.php:46
/var/www/html/vendor/doctrine/dbal/src/Logging/Connection.php:50
/var/www/html/vendor/doctrine/dbal/src/Driver/Middleware/AbstractConnectionMiddleware.php:46
/var/www/html/vendor/symfony/doctrine-bridge/Middleware/Debug/Connection.php:74
/var/www/html/vendor/doctrine/dbal/src/Connection.php:1204
/var/www/html/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/SchemaTool.php:106
/var/www/html/vendor/liip/test-fixtures-bundle/src/Services/DatabaseTools/ORMDatabaseTool.php:113
@FireOlex FireOlex added the bug Something isn't working label Jul 20, 2023
@alexislefebvre
Copy link
Collaborator

Thanks for the report.

Whaf if you set the test environment? Please share the output of this command:

php bin/console --env=test debug:config LiipTestFixturesBundle keep_database_and_schema

On a side note, the stack trace in this issue shows that it uses Doctrine but I don't know if this bundle is compatible with SQL server.

@FireOlex
Copy link
Author

Thank you for your anwser. You are right with --env=test the output is correct. Yes I also believe that the bundle is not compatible with SQL server. I did not manage to get it work.

@alexislefebvre alexislefebvre changed the title [Bug]: keep_database_and_schema config is ignored it is always false [Bug]: keep_database_and_schema config is ignored it is always false with SQL Server Sep 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants