FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Set `BREF_STACK_NAME` on PHP functions by mnapoli · Pull Request #18 · brefphp/constructs · GitHub

Repository navigation

Set BREF_STACK_NAME on PHP functions - #18

Open
mnapoli wants to merge 1 commit into
mainfrom
bref-stack-name
Open

mnapoli wants to merge 1 commit into
mainfrom
bref-stack-name

Conversation

mnapoli commented Sep 26, 2026

Copy link
Copy Markdown
Member

Bref now sets a BREF_STACK_NAME environment variable containing the stack name on all functions deployed with serverless.yml (brefphp/bref#2184) and with Bref Cloud's bref.php (brefphp/cloud#388). This PR does the same for CDK applications, so that the variable is available whatever the deployment method.

With the stack name, an application can find resources named after the stack. For example, the Laravel bridge exposes it as config('bref.stack_name') (brefphp/laravel-bridge#211) to route Laravel queue names to SQS queues with Queue::forward(). With CDK, that only works if the application names its SQS queues <stack>-<name>, like Lift and Bref Cloud do.

PhpFunction and PhpFpmFunction set it to Stack.of(this).stackName, and ConsoleFunction inherits it from PhpFunction. A BREF_STACK_NAME passed in the function's environment is kept, like with the plugin.

The Bref plugin sets this variable on `serverless.yml` deployments (brefphp/bref#2184), and Bref Cloud on `bref.php` deployments (brefphp/cloud#388). CDK applications get the same variable, unless they set it themselves.

Claude-Session: https://claude.ai/code/session_01MAbMtQ3io736HaRVpwKzCD
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant


Back | FazBrowse Home | New Git URL