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

The result cache should still work if there are no composer or baseline files. #1037

Conversation

frankdekker
Copy link
Contributor

@frankdekker frankdekker commented Sep 27, 2023

Type: bugfix
Originated from: #1011
Breaking change: no

The result cache will generate cache data with 5 keys. One of those keys is baselineHash, which can be null. However I used
isset (instead of array_keys_exist), to check if all keys were present. Ive changed this to array_keys_exist instead.

Added testcase for the original problem.

Thanks @mvoelker for the investigation of the problem.

@codecov
Copy link

codecov bot commented Sep 27, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (247f84e) 92.40% compared to head (91e3022) 92.39%.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1037      +/-   ##
============================================
- Coverage     92.40%   92.39%   -0.01%     
- Complexity     1221     1225       +4     
============================================
  Files           110      110              
  Lines          3343     3342       -1     
============================================
- Hits           3089     3088       -1     
  Misses          254      254              
Files Coverage Δ
...c/main/php/PHPMD/Cache/ResultCacheStateFactory.php 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kylekatarnls kylekatarnls merged commit bb29fe8 into phpmd:master Sep 28, 2023
31 checks passed
@kylekatarnls kylekatarnls added this to the 2.14.1 milestone Sep 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

None yet

3 participants