Closed webhdx closed 4 years ago
I'm trying to use your code. I've added Doctrine config from README and I'm getting errors at ConnectionFactory:30
. I think it's because I'm using a connection string (doctrine.dbal.connections.*.url
) so I don't have neither dbname
or master
in $params
.
@gronostajo I need more info how to reproduce your setup.
@webhdx I believe it's standard Symfony/Doctrine setup since Symfony 4.0. In doctrine.yaml
I don't have separate dbname
+host
+user
+password
but a single url
(provided through an environment variable, but that should be irrelevant). So there's a single string like this: postgres://user:password@host:5432/dbname
Here's a Doctrine config created by Flex that should reproduce this issue:
gently ping @DonCallisto
Sorry for being late on this. I don't think that's gonna work. Basically if you take a look at
https://github.com/liuggio/fastest/pull/146/files#diff-9a08194c7e449f5d3951cb3814bf513aR56-R60
you can see that static function and constructor are called with same parameter (type). That's cleary an error, as you can check the implementation of Process
before sf5: you clearly see that constructor accept only array wereas the static function accepts only string.
I think that tests are false positives here.
Take a look at previous comments I've done on #143
https://github.com/liuggio/fastest/pull/143#issuecomment-559963043 https://github.com/liuggio/fastest/pull/143#issuecomment-559968777
Maybe this idea is good, even if I would go with a "common" solution (like cast all to array or cast all to strings). Maybe this build was failing due to other reasons (like how fastest is executed? Didn't checked in depth).
Moreover I can't understand if https://github.com/liuggio/fastest/pull/146#issuecomment-602613971 is realated or not.
+1 for this PR :-) Can't wait to start using Symfony 5
hi @webhdx, do you have any update about this PR? Can I help in any way?
@webhdx @gronostajo @kocoten1992 @matlar83 check #149 please and give it a try and a feedback. Thanks.
Since #143 is not really moving forward I'm making new pull request. I've aligned the code to suggestions from @DonCallisto. Since it is no longer possible to mock static methods in phpunit (ref. https://github.com/sebastianbergmann/phpunit-documentation/issues/77) I didn't want to go into the route of using another Mock framework. It would be just better to rely on Travis so it tests using different Symfony versions. I think this is the case now so it's covered.
I've also fixed
ProcessManagerTest
by changing all commands to arrays since it's supported in allsymfony/process
versions.