Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(context): allow to set default context with an env variable #193

Merged
merged 1 commit into from
Nov 14, 2023

Conversation

joelwurtz
Copy link
Member

The goal is to be able to have a way to avoid setting the context for each command by using an env variable.

It only overrides the default context, a command executed with --context=test will use the test context regardless of the env variable definition

Copy link
Member

@lyrixx lyrixx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Except the CS change, I like it 👍🏼

@@ -5,6 +5,6 @@
abstract class AsCommandArgument
{
public function __construct(
public readonly string|null $name = null,
public readonly null|string $name = null,
Copy link
Member

@lyrixx lyrixx Oct 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a way to avoid this diff?
I really prefer string|null over null|string.
Also I prefer string? over string|null

@lyrixx lyrixx merged commit d272fab into main Nov 14, 2023
3 checks passed
@lyrixx lyrixx deleted the feat/default-context-in-env branch November 14, 2023 10:05
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.

4 participants