Skip to content

Commit 52f6927

Browse files
committed
refactor(runtime): remove legacy embedded control layer
1 parent 06824b4 commit 52f6927

34 files changed

Lines changed: 60 additions & 884 deletions

README.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Run these commands after installing or updating EasyLibrary:
6363
At minimum, a healthy server should report `Problems: 0`. When all official packages are installed and active, a full package-backed test server looks like this:
6464

6565
```txt
66-
Libraries: 13 / standalone: 0 / package-backed: 13 / embedded runtime: 0 / embedded classpath: 0
66+
Libraries: 13 / standalone: 0 / package-backed: 13 / not installed: 0
6767
Problems: 0
6868
Command provider: package-backed
6969
Command backend: libcommand-rich
@@ -173,9 +173,9 @@ if(!AgentRuntimeAPI::isAvailable()){
173173
AgentFlagsAPI::set(AgentNetworkFlags::DOUBLE_XP, true, 3600, 'Weekend booster');
174174
```
175175

176-
## Legacy embedded libraries during the 3.0-dev migration
176+
## Legacy 2.x bundled libraries during the 3.0-dev migration
177177

178-
EasyLibrary 3.x no longer ships official libs as always-on embedded code.
178+
EasyLibrary 3.x no longer ships official libs as always-on bundled code.
179179
These namespaces are now provided by package-backed or standalone libs. If a
180180
server still needs the old full-bundle behavior, stay on the latest 2.x stable
181181
while migrating one library at a time.
@@ -444,11 +444,9 @@ Runtime states:
444444
|---|---|
445445
| `standalone-active` | The standalone plugin is enabled and owns the library provider. |
446446
| `standalone-installed-disabled` | A standalone plugin or PHAR was found, but it is not enabled. |
447-
| `embedded-runtime` | Historical/legacy state from older migration builds. New 3.x core builds do not provide embedded runtimes. |
448-
| `embedded-classpath` | Historical/legacy state from older migration builds. New 3.x core builds do not provide embedded classpath libs. |
449-
| `embedded-disabled` | No package/standalone provider is active and the legacy 2.x full-bundle fallback is not available in 3.x. |
447+
| `not-installed` | No package-backed or standalone provider is active for that official library. |
450448
| `duplicate-runtime` | A standalone plugin is active while another provider appears to own the same runtime. This should be fixed. |
451-
| `missing` | No standalone or package-backed provider is available for that library. |
449+
| `missing` | A provider was expected but the required runtime classes or plugin identity could not be found. |
452450

453451
The doctor intentionally comes before file writes. A server should be able to
454452
answer "what is active and why?" before EasyLibrary downloads official library

composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
},
1212
"classmap": [
1313
"src/Library.php",
14-
"src/LibraryModules.php",
1514
"src/LibraryComponents.php",
1615
"src/crashdump.php"
1716
]

phpstan.neon.dist

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ parameters:
33
paths:
44
- src/Library.php
55
- src/LibraryComponents.php
6-
- src/LibraryModules.php
76
- src/imperazim/module/listener/ModulePluginListener.php
87
scanFiles:
98
- tests/phpstan-pmmp-stubs.php

phpstan.neon.dist.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ parameters:
33
paths:
44
- src/Library.php
55
- src/LibraryComponents.php
6-
- src/LibraryModules.php
76
- src/imperazim/module/listener/ModulePluginListener.php
87
scanFiles:
98
- tests/phpstan-pmmp-stubs.php

plugin.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,6 @@ permissions:
4545
easylibrary.command.runtime:
4646
default: op
4747
description: Inspect EasyLibrary runtime providers
48-
easylibrary.command.runtime.control:
49-
default: op
50-
description: Access retired runtime-control compatibility commands
5148
easylibrary.command.config:
5249
default: op
5350
description: Inspect EasyLibrary modular configuration state

src/Library.php

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -60,28 +60,6 @@ public function getCommandBackendRegistration(): ?CommandBackendRegistration {
6060
return $this->commandBackendRegistration;
6161
}
6262

63-
public function startEmbeddedAgentBridgeRuntime(): bool {
64-
throw new \RuntimeException('Agent Bridge runtime was removed from EasyLibrary 3.x. Install the EasyLibraryAgentBridge package or standalone plugin instead.');
65-
}
66-
67-
public function stopEmbeddedAgentBridgeRuntime(): bool {
68-
if (!$this->callAgentManagerMethod('shutdown')) {
69-
return false;
70-
}
71-
72-
$this->agentManager = null;
73-
return true;
74-
}
75-
76-
public function reloadEmbeddedAgentBridgeRuntime(): bool {
77-
if (!is_object($this->agentManager)) {
78-
return $this->startEmbeddedAgentBridgeRuntime();
79-
}
80-
81-
return $this->callAgentManagerMethod('reload');
82-
}
83-
84-
8563
/**
8664
* Register the EasyLibrary package plugin loader as early as PMMP allows.
8765
*/
@@ -117,7 +95,6 @@ protected function onEnable(): void {
11795
$this->packageAutoloadManager = new PackageAutoloadManager($this);
11896
$this->packageAutoloadManager->enableInstalledPackages();
11997
$this->startPackageMountMonitor();
120-
LibraryModules::loadModules($this);
12198

12299
$this->componentsManager = new LibraryComponents($this);
123100
$this->componentsManager->enableComponents();
@@ -163,7 +140,6 @@ protected function onDisable(): void {
163140
$this->moduleManager->disableAll();
164141
}
165142
$this->componentsManager->disableComponents();
166-
LibraryModules::unloadModules($this);
167143
}
168144

169145
private function callAgentManagerMethod(string $method): bool {

src/LibraryModules.php

Lines changed: 0 additions & 110 deletions
This file was deleted.

src/imperazim/library/LibraryRuntimeState.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@ final class LibraryRuntimeState {
99
public const STANDALONE_ACTIVE = 'standalone-active';
1010
public const STANDALONE_DISABLED = 'standalone-installed-disabled';
1111
public const PACKAGE_BACKED_ACTIVE = 'package-backed-active';
12-
public const EMBEDDED_RUNTIME = 'embedded-runtime';
13-
public const EMBEDDED_CLASSPATH = 'embedded-classpath';
14-
public const EMBEDDED_DISABLED = 'embedded-disabled';
12+
public const NOT_INSTALLED = 'not-installed';
1513
public const DUPLICATE_RUNTIME = 'duplicate-runtime';
1614
public const MISSING = 'missing';
1715
public const UNKNOWN = 'unknown';

0 commit comments

Comments
 (0)