-
Notifications
You must be signed in to change notification settings - Fork 320
feat(predis): support json:/csv: env processors for DSN arrays #759
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
base: master
Are you sure you want to change the base?
Changes from all commits
88109a2
a6111f3
5d4bf1d
dc7a1ad
2745cce
e3878c5
26f0cec
a7c62fe
53240b2
f1cc8cb
a89e667
873abd0
f0bd24a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,7 @@ | ||
| <?xml version="1.0"?> | ||
| <psalm | ||
| errorLevel="4" | ||
| findUnusedIssueHandlerSuppression="false" | ||
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| xmlns="https://getpsalm.org/schema/config" | ||
| xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd" | ||
|
|
@@ -19,8 +20,16 @@ | |
| <referencedMethod name="Symfony\Component\Config\Definition\Builder\NodeBuilder::end"/> | ||
| </errorLevel> | ||
| </UnusedMethodCall> | ||
| <UndefinedInterfaceMethod> | ||
| <errorLevel type="suppress"> | ||
| <referencedMethod name="Symfony\Component\Config\Definition\Builder\NodeParentInterface::end"/> | ||
| </errorLevel> | ||
| </UndefinedInterfaceMethod> | ||
| </issueHandlers> | ||
| <plugins> | ||
|
Comment on lines
+17
to
29
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. better to do inline suppression |
||
| <pluginClass class="Psalm\PhpUnitPlugin\Plugin"/> | ||
| <pluginClass class="Psalm\SymfonyPsalmPlugin\Plugin"> | ||
| <containerXml>tests/Functional/App/var/cache/test/Snc_RedisBundle_Tests_Functional_App_KernelTestDebugContainer.xml</containerXml> | ||
| </pluginClass> | ||
| </plugins> | ||
| </psalm> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -35,11 +35,9 @@ snc_redis: | |
| cluster: | ||
| type: predis | ||
| alias: cluster | ||
| dsn: | ||
| - redis://sncredis@127.0.0.1/3 | ||
| - redis://sncredis@127.0.0.1/4 | ||
| - redis://sncredis@127.0.0.1/5 | ||
| dsn: "%env(json:REDIS_DSNS)%" | ||
| options: | ||
| cluster: predis | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's the whole point why env vars were not supported for Predis. Predis needs to know connectionCount at build time, where env vars are not resolved yet. Think of a solution. |
||
| prefix: foo | ||
| connection_timeout: 10 | ||
| connection_persistent: true | ||
|
|
@@ -59,20 +57,14 @@ snc_redis: | |
| with_acl: | ||
| type: predis | ||
| alias: with_acl | ||
| dsn: redis://localhost/1 | ||
| dsn: redis://snc_redis:snc_password@localhost:7099/1 | ||
| logging: false | ||
| options: | ||
| parameters: | ||
| username: my_user | ||
| password: sncredis | ||
|
|
||
| services: | ||
| _defaults: | ||
| autowire: true | ||
| autoconfigure: true | ||
| public: false | ||
| bind: | ||
| Predis\Client $predisReplication: '@snc_redis.predis_replication' | ||
|
|
||
| Redis: '@snc_redis.default' | ||
|
|
||
|
|
@@ -87,6 +79,14 @@ services: | |
| resource: './Controller' | ||
| tags: ['controller.service_arguments'] | ||
|
|
||
| Snc\RedisBundle\Tests\Functional\App\Controller\PredisReplication: | ||
| bind: | ||
| Predis\Client $predisReplication: '@snc_redis.predis_replication' | ||
|
|
||
| Snc\RedisBundle\Tests\Functional\App\Controller\Controller: | ||
| arguments: | ||
| $clients: !tagged_iterator snc_redis.client | ||
|
|
||
| var_dumper.cli_dumper: | ||
| class: Symfony\Component\VarDumper\Dumper\CliDumper | ||
| arguments: ['/dev/null'] | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a no go. perhaps can be done inline if possible