extra-php-extensions icon indicating copy to clipboard operation
extra-php-extensions copied to clipboard

It seems ${bref-extra:spx-php-83} isn't available?

Open ricbra opened this issue 5 months ago • 1 comments

Config:

functions:
    web:
        handler: public/index.php
        timeout: 28
        runtime: php-83-fpm
        layers:
            - ${bref-extra:spx-php-83}

When trying to deploy I get:

Error:
Cannot resolve serverless.yaml: Variables resolution errored with:
  - Cannot resolve variable at "functions.web.layers.0": TypeError: Cannot read properties of undefined (reading 'classes')
    at Object.resolve (/builds/keepgettingbetter/smart/onderhoudsconfigurator/vendor/bref/extra-php-extensions/index.js:35:51)
    at async VariablesResolver.Object.defineProperties.memoizeMethods.resolveSource.d.normalizer.type.type (/builds/keepgettingbetter/smart/onderhoudsconfigurator/node_modules/serverless/lib/configuration/variables/resolve.js:565:24)
    at async /builds/keepgettingbetter/smart/onderhoudsconfigurator/node_modules/serverless/lib/configuration/variables/resolve.js:279:20
    at async VariablesResolver.resolveVariableSource (/builds/keepgettingbetter/smart/onderhoudsconfigurator/node_modules/serverless/lib/configuration/variables/resolve.js:277:9)
    at async VariablesResolver.resolveVariable (/builds/keepgettingbetter/smart/onderhoudsconfigurator/node_modules/serverless/lib/configuration/variables/resolve.js:194:24)
    at async /builds/keepgettingbetter/smart/onderhoudsconfigurator/node_modules/serverless/lib/configuration/variables/resolve.js:118:9
    at async Promise.all (index 0)
    at async VariablesResolver.resolveVariables (/builds/keepgettingbetter/smart/onderhoudsconfigurator/node_modules/serverless/lib/configuration/variables/resolve.js:112:5)
    at async VariablesResolver.self (/builds/keepgettingbetter/smart/onderhoudsconfigurator/node_modules/serverless/lib/configuration/variables/resolve.js:4[61](https://gitlab.com/keepgettingbetter/smart/onderhoudsconfigurator/-/jobs/10543543894#L61):9)
    at async Promise.all (index 17)
    at async /builds/keepgettingbetter/smart/onderhoudsconfigurator/node_modules/serverless/scripts/serverless.js:763:9
    at async /builds/keepgettingbetter/smart/onderhoudsconfigurator/node_modules/serverless/scripts/serverless.js:619:7

When I use some random other extension (e.g. ${bref-extra:blackfire-php-83}) it works.

ricbra avatar Jul 02 '25 14:07 ricbra

Yes, it seems only 8.0 support was added back then. This is community contributed so I have no idea if this will work on more recent versions 😬 https://github.com/brefphp/extra-php-extensions/blob/master/layers/spx/config.json

mnapoli avatar Jul 04 '25 14:07 mnapoli