{"record":{"id":"1107d3142ee189d1","repo":"symfony/http-foundation","slug":"s-is-already-an-instance-of","errorCode":null,"errorMessage":"\"%s\" is already an instance of \"SessionUpdateTimestampHandlerInterface\", you cannot wrap it with \"%s\".","messagePattern":"\"(.+?)\" is already an instance of \"SessionUpdateTimestampHandlerInterface\", you cannot wrap it with \"(.+?)\"\\.","errorType":"exception","errorClass":"LogicException","httpStatus":null,"severity":"error","filePath":"Session/Storage/Handler/StrictSessionHandler.php","lineNumber":27,"sourceCode":"    public function __construct(\n        private \\SessionHandlerInterface $handler,\n    ) {\n        if ($handler instanceof \\SessionUpdateTimestampHandlerInterface) {\n            throw new \\LogicException(\\sprintf('\"%s\" is already an instance of \"SessionUpdateTimestampHandlerInterface\", you cannot wrap it with \"%s\".', get_debug_type($handler), self::class));\n        }\n    }","sourceCodeStart":9,"sourceCodeEnd":45,"githubUrl":"https://github.com/symfony/http-foundation/blob/5aea19cd678fa4140f6108406f1096de5e9ed6e4/Session/Storage/Handler/StrictSessionHandler.php#L9-L45","documentation":"A LogicException thrown in StrictSessionHandler's constructor when the wrapped $handler already implements SessionUpdateTimestampHandlerInterface. StrictSessionHandler exists to add those timestamp/validate-id behaviors, so double-wrapping would duplicate them and corrupt session semantics; the offending input is the already-strict handler instance passed in.","triggerScenarios":"Thrown at Session/Storage/Handler/StrictSessionHandler.php:27 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check ($handler instanceof \\SessionUpdateTimestampHandlerInterface) before constructing and use the handler as-is","Pass the underlying raw SessionHandlerInterface (e.g. NativeFileSessionHandler or \\SessionHandler) instead of an already-strict wrapper","Refactor wiring code so StrictSessionHandler is applied exactly once per handler chain"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5aea19cd678fa4140f6108406f1096de5e9ed6e4","analyzedAt":"2026-09-13T01:52:22.855Z","contentChangedAt":"2026-09-13T01:52:22.855Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}