I cant separate my vendor folder from my app folder, i get Unrecognized configuration variable sources: "bref"
service: app
provider:
name: aws
runtime: provided.al2
environment:
BREF_AUTOLOAD_PATH: '/tmp/vendor/autoload.php'
functions:
foo:
handler: index.php
layers:
- ${bref:layer.php-81} # PHP
custom:
bref:
separateVendor: true
Hi, please I am having an issue separating my vendor folder from the main app folder. The above serverless.yml settings give Unrecognized configuration variable sources: "bref". But if I add this block
plugins:
- ./vendor/bref/bref
it includes the vendor folder in the app folder which makes it too big and I can't edit my code in lambda in-line editor
Interesting, normally with separateVendor: true the vendor directory should be automatically excluded.
Could you confirm your Bref version?
And maybe try excluding the folder manually with this config:
package:
patterns:
- '!vendor/**'
With respect to the problem indicated in the title, the Unrecognized configuration variable sources: "bref" comes from the fact that the call to the plugin is missing. Please add the following to your serverless.yml when using Bref:
plugins:
- ./vendor/bref/bref
When using separateVendor: true , the vendor/ directory is excluded from the zip file uploaded to S3 (and deployed to Lambda). You can verify it by running unzip -l on the zip file created on your machine:
$ unzip -l .serverless/bref-debug.zip
Archive: .serverless/bref-debug.zip
Length Date Time Name
--------- ---------- ----- ----
109 01-01-1980 00:00 composer.json
64836 01-01-1980 00:00 composer.lock
304 01-01-1980 00:00 index.php
--------- -------
65249 3 files
# Note: replace "bref-debug" with the name of your application
If your zip file is bigger than 3 MB, it will be unavailable in the Lambda Editor on the Console. Please check if you didn't include a picture or a big text file. Or maybe, your project is simply too big.
If the problem persists, can you confirm the version of Bref you are running?
Closing because of inactivity.