Proposal: Add config option to disable DI definition change cache invalidation `invalidateResultCacheOnDiDefinitionChange`
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
Research direction
Start by reading PR #421 and its discussion to understand how DI definition changes trigger result-cache invalidation. Define the behavior of the proposed invalidateResultCacheOnDiDefinitionChange option, then add the corresponding configuration coverage and documentation; done means the option reliably controls this invalidation without changing the default behavior.
Written by the indexing model from the issue text.
Description
Hi 👋 First of all, thank you for the great work on PHPStan and the Symfony extension!
We are working on integrating result cache in our project to speed up analysis times. However, we noticed that the cache is invalidated very frequently, which reduces its effectiveness in most of our development workflows.
After some investigation, we identified the source of this behavior to be the feature added in this PR
We completely understand the value of this feature, it ensures the cache is invalidated when DI definitions change, which is especially important for production builds or CI pipelines to guarantee correctness.
However, in our development setup, this behavior is too aggressive. The DI container in our Symfony app changes very frequently , and as a result, the cache is invalidated most of the time. This defeats the purpose of caching during active development.
We suggest introducing a new configuration option (which was once discussed in the original PR but never merged):
- Dominant language
- PHP
- Stars
- 800
- Forks
- 104
- Avg merge
- 4m
- Merged PRs (30d)
- 1
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from phpstan/phpstan-symfony
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
phpstan/phpstan-symfony#510 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
phpstan/phpstan-symfony#494 · 5 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
phpstan/phpstan-symfony#268 ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
phpstan/phpstan-symfony#509 · 2 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 48/100
phpstan/phpstan-symfony#466 · 4 comments ·
All issues in phpstan/phpstan-symfony
Similar issues
-
priority: p3
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
googleapis/librarian#7636 ·
-
0. Needs triage bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
nextcloud/fulltextsearch#1011 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
phpstan/phpstan-doctrine#794 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Automattic/static-site-importer#1767 ·