Projekt

Allgemein

Profil

Aktionen

GX-Bug #68712

geschlossen

The GXModules ServiceProvider registration cache is not cleared correctly

Von Tobias Schindler vor fast 3 Jahren hinzugefügt. Vor mehr als 2 Jahren aktualisiert.

Status:
Erledigt
Priorität:
Dringend
Zugewiesen an:
Ahmed Hamouda
Kategorie:
GXModules
Zielversion:
% erledigt:

0%

Geschätzter Aufwand:
Steps to reproduce:
Betroffene Versionen:
4.4.0.2
Release Notes Langtext:

Es ist ein Fehler im Modulcache behoben worden


Beschreibung

After executing the "Empty modules cache" action, the GXModules ServiceProvider registration cache still exists. Therefore, new Modules can only be registered after manually deleting the cache file.

To test this issue, create a new service provider for a module and verify that the service provider code is executed:

  • Create file: GXModules/Test/Test/TestServiceProvider.php
  • Copy content:
<?php

declare(strict_types=1);

namespace GXModules\Test\Test;

use Gambio\Core\Application\DependencyInjection\AbstractModuleServiceProvider;

class TestServiceProvider extends AbstractModuleServiceProvider
{
    public function provides(): array
    {
        // if registered correctly, expect that one of the 'die' functions are executed
        die('TestServiceProvider::provides');
        return [];
    }


    public function register(): void
    {
        // if registered correctly, expect that one of the 'die' functions are executed
        die('TestServiceProvider::register');
    }
}
  • Go to clear cache page
  • Delete modules cache

Expect "TestServiceProvider::provides" from the first methods die statement as output after clearing the cache


Aktionen

Auch abrufbar als: Atom PDF