{"record":{"id":"cc819f1ff3fc6298","repo":"Intervention/image","slug":"property-name-does-not-exists-for-this-class","errorCode":null,"errorMessage":"Property {name} does not exists for {this::class}","messagePattern":"Property (.+?) does not exists for (.+?)","errorType":"exception","errorClass":"InvalidArgumentException","httpStatus":null,"severity":"error","filePath":"src/Config.php","lineNumber":33,"sourceCode":"    public function __construct(\n        public bool $autoOrientation = true,\n        public bool $decodeAnimation = true,\n        public string|ColorInterface $backgroundColor = 'ffffff',\n        public bool $strip = false,\n    ) {\n        //\n    }\n\n    /**\n     * Set values of given config options.\n     *\n     * @throws InvalidArgumentException\n     */\n    public function setOptions(mixed ...$options): self\n    {\n        foreach ($this->prepareOptions($options) as $name => $value) {\n            if (!property_exists($this, $name)) {\n                throw new InvalidArgumentException('Property ' . $name . ' does not exists for ' . $this::class);\n            }\n\n            $this->{$name} = $value;\n        }\n\n        return $this;\n    }\n\n    /**\n     * This method makes it possible to call self::setOptions() with a single\n     * array instead of named parameters.\n     *\n     * @param array<mixed> $options\n     * @return array<mixed>\n     */\n    private function prepareOptions(array $options): array\n    {\n        if ($options === []) {","sourceCodeStart":15,"sourceCodeEnd":51,"githubUrl":"https://github.com/Intervention/image/blob/5598b9e39751c34afc5cdee84abef77f92c26f68/src/Config.php#L15-L51","documentation":"Config::setOptions() only accepts keys matching real properties of the Config class. The library ships exactly four: autoOrientation, decodeAnimation, backgroundColor and strip. Any other key, whether passed as a named argument or inside an array, is rejected with the offending property name in the message.","triggerScenarios":"new ImageManager(['autoOrient' => true]) (v2 spelling), setOptions(['background' => 'ff0000']) (truncated name), or any option removed or renamed in the major version you are using.","commonSituations":"Upgrading from Intervention Image v2 to v3 where 'autoOrient' became 'autoOrientation'; typos in option keys; copying configuration snippets from other projects or older docs.","solutions":["Use only the supported keys: autoOrientation, decodeAnimation, backgroundColor, strip","Rename the v2 'autoOrient' key to 'autoOrientation' when upgrading to v3","Compare the key in the exception message against the public properties in src/Config.php"],"exampleFix":"// before\n$manager = new ImageManager(['autoOrient' => true]);\n\n// after\n$manager = new ImageManager(['autoOrientation' => true]);","handlingStrategy":"validation","validationCode":"$allowed = ['autoOrientation', 'decodeAnimation', 'backgroundColor', 'strip'];\n$options = array_intersect_key($userOptions, array_flip($allowed));\n$manager = new ImageManager($options);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep the option list to autoOrientation, decodeAnimation, backgroundColor, strip","After a major upgrade, diff your option keys against src/Config.php","Store config keys in one place instead of scattering literals"],"tags":["config","options","validation","upgrade"],"backgroundTag":"invalid-config-option","analyzedSha":"5598b9e39751c34afc5cdee84abef77f92c26f68","analyzedAt":"2026-08-23T02:17:31.068Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}