-
Notifications
You must be signed in to change notification settings - Fork 99
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
chore: remove dependency on thecodingmachine/cache-utils #695
Conversation
src/FactoryContext.php
Outdated
@@ -28,6 +29,7 @@ public function __construct( | |||
private readonly RecursiveTypeMapperInterface $recursiveTypeMapper, | |||
private readonly ContainerInterface $container, | |||
private readonly CacheInterface $cache, | |||
private readonly ClassBoundCacheContractFactoryInterface|null $classBoundCacheContractFactory = 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.
Shoud it be added at the end of the list to preserve BC?
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.
Good Catch! I added it near to cache for no particular reason (maybe optics?).
Will adjust later.
@xyng thanks for this. For PHPStan, yea, not sure what's going on with that. It looks like a syntax recommended change. If you could give that a shot, that'd be great. I think it'd be best to place this in I think with @andrew-demb's recommendation on the |
@oojacoboo @andrew-demb i have adjusted according to your feedback. Thanks a lot! Edit: I also found I've missed using the |
85c3ca1
to
337b7f8
Compare
The package seems to be unmaintained and prevents usage due to old psr/simple-cache. This removes the dependency on that package. The package provided cache clearance on Classes and ParentClasses when their files changed. This functionality can still be achieved by creating a custom implementation of `TheCodingMachine\GraphQLite\Utils\Cache\ClassBoundCacheContractFactoryInterface`. fixes thecodingmachine#693
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #695 +/- ##
============================================
- Coverage 95.72% 95.38% -0.34%
- Complexity 1773 1811 +38
============================================
Files 154 173 +19
Lines 4586 4791 +205
============================================
+ Hits 4390 4570 +180
- Misses 196 221 +25 ☔ View full report in Codecov by Sentry. |
…eprecation This is necessary because symfony/cache is not compatible with every supported version of psr/simple-cache. More info here: symfony/symfony#44738
The package seems to be unmaintained and prevents usage due to old
psr/simple-cache
.This removes the dependency on that package, which provided cache clearance on Classes and ParentClasses when their files changed.
The functionality can still be achieved by creating a custom implementation of
TheCodingMachine\GraphQLite\Utils\Cache\ClassBoundCacheContractFactoryInterface
that returns a wrapped version ofthecodingmachine/cache-utils
or an updated fork.My implementation is quite naive and changes how the caching works. This may be considered a breaking change.
I'm happy to make adjustments if needed.
fixes #693
Note: PHPStan seems to have problems. This is probably not related to my changes.