SpecScanner - Fix installation error ("Class XyzSpecProvider does not exist") #24874
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
(This is inspired by @eileenmcnaughton's #24807. It does not preclude #24807, but it should fix more symptoms.)
This addresses a regression affecting
civiimport
andsearch_kit
(and probablycivigeometry
, but I haven't tested that one). The problem arises as follows:SpecProvider
(such asciviimport
orsearch_kit
).civicrm/admin/extensions
), install the extension.Before (5.54.0)
It appears to work.
Internally, the installation flushes various caches in various ways. It does not flush/rebuild the container (in local/PHP memory). This can be confusing when doing automated tests, but (for production) it ultimately works out anyway. (It deletes the container-cache-file, so the future page-views will rebuild, and the final content will be correct.)
Before (5.54.1, 5.55.beta)
It appears to fail.
Internally, the installation flushes various caches in various ways. This includes flushing the container (in local/PHP memory as well as the file-based cache). This is better for automated tests, but (for production) one of the interim flushes occurs at a poor moment -- when
LegacySpecScanner
sees an inconsistent world and crashes with:After
It appears to work.
Internally, the installation flushes various caches, including the container (in local/PHP memory as well as the file-based cache). This is better for automated tests. For production, it basically works -- it ignores the inconsistent interim state (seen in 5.54.1), and it ultimately works because (as in 5.54.0) the final content of the container is correct.