diff --git a/src/Plugin/Plugin.php b/src/Plugin/Plugin.php index cd1b6960bd..de9b0a2240 100644 --- a/src/Plugin/Plugin.php +++ b/src/Plugin/Plugin.php @@ -174,12 +174,8 @@ public function link(): string|null */ public function license(): License { - if ($this->license instanceof License) { - return $this->license; - } - // resolve license info from Closure, array or string - return $this->license = License::from( + return License::from( plugin: $this, license: $this->license ); diff --git a/tests/Plugin/PluginTest.php b/tests/Plugin/PluginTest.php index 4faf43ec53..c96df32f15 100644 --- a/tests/Plugin/PluginTest.php +++ b/tests/Plugin/PluginTest.php @@ -254,8 +254,6 @@ public function testLicense(): void { $plugin = new Plugin(name: 'getkirby/test-plugin'); $this->assertInstanceOf(License::class, $license = $plugin->license()); - // check for cached instance - $this->assertSame($license, $plugin->license()); } public function testLicenseFromString(): void