Comments (8)
EDIT: Actually this doesn't work.
This could potentially work with a config/packages/dev/doctrine.yaml, and a .env.dev but that is a lot of extra config.
If the global doctrine.yaml uses the 'url', then the test one will use it too which will result in the wrong database being used.
All said, I think the suggestion from gebi84 looks good.
I believe this is the same issue as #101
Original message below:
An alternate solution that uses the connection string would be helpful, however this can be easily overcome with test specific configs.
#config/packages/doctrine.yaml
doctrine:
dbal:
url: '%env(resolve:DATABASE_URL)%'
#config/packages/test/doctrine.yaml
doctrine:
dbal:
driver: '%env(DATABASE_DRIVER)%'
host: '%env(DATABASE_HOST)%'
port: '%env(DATABASE_PORT)%'
dbname: '%env(DATABASE_NAME)%'
user: '%env(DATABASE_USER)%'
password: '%env(DATABASE_PASSWORD)%'
charset: UTF8
Being sure your .env has the required properties
from fastest.
I will start to work with a PR with the Connection Factory based on regex capture for URL approach at least for relational databases like MySQL, PG and SQLITE
See you soon
from fastest.
Could this have something to do with #159?
from fastest.
no I don't think so, this also does not handle the url parameter
from fastest.
Hi guys, is absolutly neccesary support DATABASE_URL param for connection with database, i am not able to establish connection with my database using the params listing like commented us @mr120 :(
from fastest.
Hi @soulcodex, at the moment I won't be able to tackle this quickly. If you find a solution for this issue, you're welcome to open a PR.
from fastest.
@DonCallisto take a look at the changes I have for the package using DSN instead of a list of parameters, it only remains to test it and add the approach for SQLite.
from fastest.
Please, produce a diff (for example with a draft PR) and when I'll have time, I'll try to take a look.
Thanks.
from fastest.
Related Issues (20)
- support of PHP 7.3 HOT 7
- Test names are not aligned with -vv when some tests take minutes and other seconds HOT 4
- Behat tests never end HOT 10
- use input list in inverse mode HOT 5
- generating the list of tests from a PHPUnit XML file ignores the <groups> tag
- Always a false positive HOT 1
- symfony 5 HOT 5
- Incompatible with laravel HOT 3
- before option not working anymore HOT 10
- How to run two commands before tests? HOT 1
- Not compatible with PHPUnit 9+ HOT 2
- Switch to GitHub actions
- Add support for MongoDB official client HOT 4
- Failure on several issues HOT 4
- Latest Symfony Process make fastest screaming with PHP Warning: Array to string conversion HOT 19
- Symfony 5.4 phpunit 9.5 with forceCoversAnnotation and beStrictAboutCoversAnnotation giving random failures HOT 2
- Question about database isolation HOT 3
- Update symfony dependencies to ^6.0 HOT 5
- Couldn't make it run with WordPress HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fastest.