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

Issue with lint command and cache.adapter.redis after upgrade to 5.4.0 #44515

Closed
lugosium opened this issue Dec 8, 2021 · 6 comments
Closed

Comments

@lugosium
Copy link

lugosium commented Dec 8, 2021

Symfony version(s) affected

6.0.0

Description

After upgrading to 5.4.0, everything is working fine except the lint command which gives:

 [ERROR] Invalid definition for service "cache.app": argument 1 of
         "Symfony\Component\Cache\Adapter\RedisAdapter::__construct()" accepts
         "Redis|RedisArray|RedisCluster|Predis\ClientInterface|Symfony\Component\Cache\Traits\RedisProxy|Symfony\Compone
         nt\Cache\Traits\RedisClusterProxy", "Symfony\Component\Cache\Adapter\AbstractAdapter" passed.

How to reproduce

Use redis as cache for system and app:

framework:
    cache:
        app: cache.adapter.redis
        system: cache.adapter.redis
        default_redis_provider: 'redis://localhost'

Launch lint command:

./bin/console --env dev lint:container

Possible Solution

No response

Additional Context

If i comment app and system keys, it's OK with the default values.

@chalasr
Copy link
Member

chalasr commented Dec 9, 2021

I'm on it.

@lugosium
Copy link
Author

My bad @chalasr, it's only on v6.0.0 that the problem occurs.

@chalasr
Copy link
Member

chalasr commented Dec 14, 2021

@lugosium No worries, I guessed it as the real type declaration has only been introduced on 6.0.

@Philosoft
Copy link

Does it affect only lint:container command (so only CI step should be disabled for me) or it will shoot me in the a back in the most inconvenient time possible? That thing is really frightening to me on a way to 6.0 upgrade

@lugosium
Copy link
Author

lugosium commented Jan 8, 2022

Does it affect only lint:container command (so only CI step should be disabled for me) or it will shoot me in the a back in the most inconvenient time possible? That thing is really frightening to me on a way to 6.0 upgrade

It's only the lint command, everything else work correctly.

@fabpot fabpot closed this as completed Jan 9, 2022
fabpot added a commit that referenced this issue Jan 9, 2022
…ypeDeclarationsPass if it's a Definition with a factory (fancyweb)

This PR was merged into the 4.4 branch.

Discussion
----------

[DependencyInjection] Ignore argument type check in CheckTypeDeclarationsPass if it's a Definition with a factory

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  |  no
| Deprecations? | no
| Tickets       | #35599, #44515
| License       | MIT
| Doc PR        | -

When a definition uses a factory, we don't know what it returns.

Commits
-------

b9095e6 [DependencyInjection] Ignore argument type check in CheckTypeDeclarationsPass if it's a Definition with a factory
symfony-splitter pushed a commit to symfony/dependency-injection that referenced this issue Jan 9, 2022
…ypeDeclarationsPass if it's a Definition with a factory (fancyweb)

This PR was merged into the 4.4 branch.

Discussion
----------

[DependencyInjection] Ignore argument type check in CheckTypeDeclarationsPass if it's a Definition with a factory

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  |  no
| Deprecations? | no
| Tickets       | symfony/symfony#35599, symfony/symfony#44515
| License       | MIT
| Doc PR        | -

When a definition uses a factory, we don't know what it returns.

Commits
-------

b9095e6c09 [DependencyInjection] Ignore argument type check in CheckTypeDeclarationsPass if it's a Definition with a factory
@lugosium
Copy link
Author

lugosium commented Jan 9, 2022

Thank you everybody.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants