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

Replace spaces with - in prefix too #60

Closed
wants to merge 2 commits into from

Conversation

datashaman
Copy link
Contributor

@datashaman datashaman commented Mar 25, 2022

Calling prefix() independently of nameWithPrefix() results in a function prefix which has spaces in it, which is not valid for a Lambda function name.

Calling prefix() independently of name() results in a function prefix which has spaces in it, which is not valid for a Lambda function name.
@wilsenhc
Copy link
Contributor

Would be great if you added a new test case(s) for this so it doesn't break again in the future

@yoeriboven
Copy link

I had the same problem but it was because of a dot. Could you also filter out '.' besides spaces?

@Francismori7
Copy link

Francismori7 commented Jul 28, 2022

I have an issue on my end with ACCENTS, for instance we use "Ratté" in APP_NAME.

Should we just slugify the prefix? Str::slug()

    /**
     * Used by Sidecar to differentiate between apps and environments.
     *
     * @return string
     */
    public function prefix()
    {
        return 'SC-' . Str::of(config('app.name') . '-' . Sidecar::getEnvironment())->slug() . '-';
    }

@aarondfrancis
Copy link
Owner

I think #30 fixes all of these issues, there were quite a few things I didn't consider w.r.t. the app name, but we should be good to go now. Thanks for the PR and the test cases! Lemme know if you hit anything else.

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.

5 participants