{"record":{"id":"a041092a3e690706","repo":"phalcon/cphalcon","slug":"access-accessname-does-not-exist-in-component","errorCode":null,"errorMessage":"Access '{accessName}' does not exist in component '{componentName}'","messagePattern":"Access '(.+?)' does not exist in component '(.+?)'","errorType":"exception","errorClass":"Phalcon\\Acl\\Exceptions\\AccessRuleNotFound","httpStatus":null,"severity":"warning","filePath":"phalcon/Acl/Adapter/Memory.zep","lineNumber":767,"sourceCode":"\n    /**\n     * Checks if a role has access to a component\n     */\n    private function allowOrDeny(string roleName, string componentName, var access, var action, var func = null) -> void\n    {\n        var accessList, accessName, accessKey;\n\n        this->checkExists(this->roles, roleName, \"Role\");\n        this->checkExists(this->componentsNames, componentName, \"Component\");\n\n        let accessList = this->accessList;\n\n        if typeof access == \"array\" {\n            for accessName in access {\n                let accessKey = this->buildAccessKey(componentName, accessName);\n\n                if unlikely !isset accessList[accessKey] {\n                        throw new AccessRuleNotFound(accessName, componentName);\n                    }\n            }\n\n            for accessName in access {\n                let accessKey = this->buildKey(roleName, componentName, accessName);\n                let this->access[accessKey] = action;\n\n                if func != null {\n                    let this->functions[accessKey] = func;\n                }\n            }\n        } else {\n            if access != \"*\" {\n                let accessKey = this->buildAccessKey(componentName, access);\n\n                if unlikely !isset accessList[accessKey] {\n                    throw new AccessRuleNotFound(access, componentName);\n                }","sourceCodeStart":749,"sourceCodeEnd":785,"githubUrl":"https://github.com/phalcon/cphalcon/blob/b7419de9cd0a8a3f48441ead84c9f8415d463e25/phalcon/Acl/Adapter/Memory.zep#L749-L785","documentation":"AbstractProducer::setTimeToLive() throws TimeToLiveNotSupportedException when a non-null TTL is requested. The base implementation accepts only null; transports that can expire messages automatically override the method. This keeps ProducerInterface fluent chaining safe: the unsupported call aborts instead of silently ignoring your expiry.","triggerScenarios":"$producer->setTimeToLive(3600) on a producer inheriting AbstractProducer's default (e.g. Beanstalk/Redis queue adapters here).","commonSituations":"Code written against a TTL-capable broker (SQS DelaySeconds/MessageRetentionPeriod, RabbitMQ per-message TTL) reused unchanged; job-dispatch wrappers that always set a TTL; cleanup jobs assuming auto-expiry of unprocessed messages.","solutions":["Drop the setTimeToLive() call for this transport, or pass null.","If message expiry is required, move it to a transport that supports TTL, or implement expiry yourself (e.g. a timestamp field checked by consumers).","Verify the concrete producer class actually overrides setTimeToLive() before setting a value."],"exampleFix":"// before\n$producer->setTimeToLive(3600); // throws TimeToLiveNotSupportedException\n\n// after\n$producer->send($destination, $message);\n// or encode expiry in the payload and let the consumer discard stale jobs:\n$message->setBody(json_encode(['payload' => $data, 'expiresAt' => time() + 3600]));","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    $producer->setTimeToLive($ttl);\n} catch (\\Phalcon\\Queue\\Exceptions\\TimeToLiveNotSupportedException $e) {\n    // encode expiry in the payload instead and let consumers discard stale jobs\n    $message->setBody(json_encode(['payload' => $body, 'expiresAt' => time() + $ttl]));\n}","preventionTips":["Confirm the transport overrides setTimeToLive() before setting a non-null TTL.","For unsupported transports, implement expiry in the message payload with a consumer-side check."],"tags":["queue","producer","ttl","unsupported-feature"],"backgroundTag":"queue-feature-not-supported","analyzedSha":"b7419de9cd0a8a3f48441ead84c9f8415d463e25","analyzedAt":"2026-08-21T06:21:18.811Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}