Description
The framework's package-based architecture has each package self-contained with its own Contracts/, Exceptions/, etc. However, src/Contracts/StorageInterface.php is a leftover shared contract that breaks this pattern -- it's the sole file in src/Contracts/ and creates cross-package coupling.
Problem
StorageInterface is never used as a type-hint or in an instanceof check anywhere in the codebase. The polymorphism it provides is unused.
CookieStorageInterface extends StorageInterface but overrides set() and delete() with incompatible signatures, violating the Liskov Substitution Principle.
Four unrelated packages (Config, Debugger, Session, Cookie) are coupled through a shared contract they never interchange.
src/Contracts/ is the only top-level shared contracts folder, inconsistent with every other package.
Acceptance criteria
src/Contracts/ directory no longer exists
SessionStorageInterface and CookieStorageInterface are self-contained (no external extends)
Config implements ConfigInterface from its own package
DebuggerStore implements DebuggerStoreInterface from its own package
Implementing classes use @inheritDoc instead of duplicating docblocks
All existing tests pass with no new failures
phpstan level 6 passes with no new errors
Description
The framework's package-based architecture has each package self-contained with its own Contracts/, Exceptions/, etc. However,
src/Contracts/StorageInterface.phpis a leftover shared contract that breaks this pattern -- it's the sole file insrc/Contracts/and creates cross-package coupling.Problem
StorageInterfaceis never used as a type-hint or in an instanceof check anywhere in the codebase. The polymorphism it provides is unused.CookieStorageInterfaceextendsStorageInterfacebut overridesset()anddelete()with incompatible signatures, violating the Liskov Substitution Principle.Four unrelated packages (
Config,Debugger,Session,Cookie) are coupled through a shared contract they never interchange.src/Contracts/is the only top-level shared contracts folder, inconsistent with every other package.Acceptance criteria
src/Contracts/directory no longer existsSessionStorageInterfaceandCookieStorageInterfaceare self-contained (no external extends)ConfigimplementsConfigInterfacefrom its own packageDebuggerStoreimplementsDebuggerStoreInterfacefrom its own packageImplementing classes use
@inheritDoc insteadof duplicating docblocksAll existing tests pass with no new failures
phpstan level 6 passes with no new errors