Found while working on #2497243: Replace Symfony container with a Drupal one, stored in cache:

Problem/Motivation

- The solution to using PhpStorage was that production systems can use the ReadOnlyStorage.

That does not work in practice however, because the test that was supposed to test that itself has a bug.

     // Instantiate it a second time and we should still get a ContainerBuilder
     // class because we are using the read-only PHP storage.
-    $kernel = $this->getTestKernel($request, $modules_enabled, TRUE);
+    $kernel = $this->getTestKernel($request, NULL, TRUE);

is needed to fix the test and then it fails.

The reason this worked was, because if $modules_enabled is passed, then updateModules() is called before boot(), which obviously would not happen on a production system.

Proposed resolution

- Implement #2497243: Replace Symfony container with a Drupal one, stored in cache to make us independent of PHPStorage as needed storage.

Other possibilities might work and will need to be implemented if #2497243: Replace Symfony container with a Drupal one, stored in cache is not done.

Remaining tasks

- Fix the test
- Wait for #2497243: Replace Symfony container with a Drupal one, stored in cache

User interface changes

- None

API changes

- None

Data model changes

- None

Comments

fabianx’s picture

Status: Active » Needs review
StatusFileSize
new738 bytes

This will fail.

Status: Needs review » Needs work

The last submitted patch, 1: read_only_container_is-2530586-1.patch, failed testing.

neclimdul’s picture

Status: Needs work » Needs review
StatusFileSize
new4.4 KB

I'm not sure so much that is isn't working but rather the tests make no sense. If the storage is read only how would reloading the container for a new request return a Builder instead of the previous container stored on disk?

Sensible tests seem to actually pass.

fabianx’s picture

#3: Not really, the intention of the test was that the read-only container gets the new module list.

That is what is not working.

neclimdul’s picture

We've written the module list to the container for a very long time so if its read only how would that ever be possible?

Status: Needs review » Needs work

The last submitted patch, 3: read_only_container_is-2530586-3.patch, failed testing.

fabianx’s picture

Status: Needs work » Closed (duplicate)

This is fixed, because the parent issue did go in.