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: Normalize template name using regex to allow capitalized prefixes #26

Merged
merged 1 commit into from
Jun 12, 2024

Conversation

literat
Copy link
Contributor

@literat literat commented Jun 12, 2024

  • prefixes in the format PREFIX_ for template name can now be used
  • it will normalize the template name to lowercase - prefix_
  • motivation is to allow UNSTABLE_ prefix name for our components

  * prefixes in format `PREFIX_` for template name can now be used
  * it will normalize the template name to lower case - `prefix_`
  * motivation is to allowed `UNSTABLE_` prefix name for our components
@literat literat merged commit d9ebece into main Jun 12, 2024
1 check passed
@literat literat deleted the feat/unstable-prefix branch June 12, 2024 11:12
Copy link
Member

@crishpeen crishpeen left a comment

Choose a reason for hiding this comment

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

Don't we need any documentation for this?

@@ -146,6 +152,13 @@ function (array $matches) {
);
}

private function normalizeComponentPathName(string $name): string
Copy link
Member

Choose a reason for hiding this comment

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

shouldn't we test this too? At least it would help me understand it what it does :D

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The test was modified to cover this change. However, the private methods cannot be tested directly. 🤷

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