{"record":{"id":"bf191ce1039daac3","repo":"Intervention/image","slug":"not-implemented","errorCode":null,"errorMessage":"Not implemented","messagePattern":"Not implemented","errorType":"exception","errorClass":"Intervention\\Image\\Exceptions\\NotSupportedException","httpStatus":null,"severity":"error","filePath":"src/Drivers/Imagick/Core.php","lineNumber":72,"sourceCode":"     * @see CollectionInterface::push()\n     *\n     * @throws DriverException\n     */\n    public function push(mixed $item): CollectionInterface\n    {\n        return $this->add($item);\n    }\n\n    /**\n     * {@inheritdoc}\n     *\n     * @see CoreInterface::map()\n     *\n     * @throws NotSupportedException\n     */\n    public function map(callable $callback): CoreInterface\n    {\n        throw new NotSupportedException('Not implemented');\n    }\n\n    /**\n     * {@inheritdoc}\n     *\n     * @see CoreInterface::filter()\n     *\n     * @throws Exception\n     */\n    public function filter(callable $callback): CoreInterface\n    {\n        throw new \\Exception('Not implemented');\n    }\n\n    /**\n     * {@inheritdoc}\n     *\n     * @see CollectionInterface::get()","sourceCodeStart":54,"sourceCodeEnd":90,"githubUrl":"https://github.com/Intervention/image/blob/5598b9e39751c34afc5cdee84abef77f92c26f68/src/Drivers/Imagick/Core.php#L54-L90","documentation":"CoreInterface declares map(), but the Imagick driver's Core deliberately does not implement it — the call always throws NotSupportedException('Not implemented'). Unlike the GD driver, where frames can be mapped over cheaply, Imagick frames cannot be transformed in place that way, so this is a known capability gap of the Imagick backend, not an environment or input problem.","triggerScenarios":"Calling $image->core()->map(callable) on any image loaded with the Imagick driver — typically code ported from the GD driver where map() works, or generic collection-style code that treats Core like a plain Collection.","commonSituations":"Shared packages that manipulate cores of both drivers; snippets copied from GD-oriented examples; abstractions that enumerate driver capabilities implicitly.","solutions":["Iterate frames explicitly instead: foreach ($image->core() as $frame) {...} — Core implements Iterator — or use $image->core()->toArray().","Branch on the driver before using map(), reserving it for the GD path.","Prefer the high-level fluent API (modifiers, frame loops) over low-level Core operations where possible."],"exampleFix":"// before\n$image->core()->map(fn ($frame) => process($frame)); // Imagick driver → NotSupportedException\n\n// after: iterate frames explicitly (Core is an Iterator)\nforeach ($image->core()->toArray() as $frame) {\n    process($frame);\n}","handlingStrategy":"validation","validationCode":"if ($image->driver() instanceof \\Intervention\\Image\\Drivers\\Gd\\Driver) {\n    $image->core()->map($callback);\n} else {\n    foreach ($image->core()->toArray() as $frame) {\n        $callback($frame);\n    }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Treat Core methods as driver-specific: check the driver before low-level operations.","Prefer iteration (Core is an Iterator) over map()/filter() for portable code.","Use the high-level fluent API where it covers the need."],"tags":["imagick","core","map","not-implemented","driver-difference"],"backgroundTag":"feature-not-implemented","analyzedSha":"5598b9e39751c34afc5cdee84abef77f92c26f68","analyzedAt":"2026-08-23T02:17:31.068Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}