chore(psr4): phase 3 (Core) — namespace Core/Enum + Core/Exception

- Core/Enum → XcVm\Core\Enum (BootContext, ModuleState, ServerEnvironment).
- Core/Exception → XcVm\Core\Exception (XcVmException) + \Container
  (ContainerException, CircularDependencyException, ServiceCreationException) +
  \Module (ModuleException + the 4 module exceptions). The hierarchy resolves:
  XcVmException extends \RuntimeException; the Container/Module exceptions extend
  XcVmException via use; ContainerException keeps its PSR ContainerExceptionInterface.
- Add use to referrers across src/ and tests/; fix the leading-backslash refs
  qualified in earlier hub commits (\ModuleState, \ServerEnvironment,
  \XcVmException, \ContainerException, \ModuleLoadException, ...) to their FQCNs.
- phpstan-baseline.neon regenerated (292→292).

Verified: php -l clean; PHPStan no errors (first pass); PHPUnit 295/295;
leading-backslash re-sweep clean.
This commit is contained in:
Divarion-D
2026-06-24 22:23:42 +03:00
parent 432c8a010a
commit dc335a8334
21 changed files with 101 additions and 47 deletions
+2 -1
View File
@@ -1,6 +1,7 @@
<?php
namespace XcVm\Core\Container\Psr;
use XcVm\Core\Exception\Container\ContainerException;
/**
* Thrown when a service identifier is not found in the container.
@@ -8,4 +9,4 @@ namespace XcVm\Core\Container\Psr;
* @package XC_VM_Core_Container
* @license AGPL-3.0 https://www.gnu.org/licenses/agpl-3.0.html
*/
class NotFoundException extends \ContainerException implements NotFoundExceptionInterface {}
class NotFoundException extends \XcVm\Core\Exception\Container\ContainerException implements NotFoundExceptionInterface {}