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

Removed platform-config #81

Merged
merged 3 commits into from
Jun 6, 2023
Merged

Removed platform-config #81

merged 3 commits into from
Jun 6, 2023

Conversation

bleutzinn
Copy link
Contributor

Removed the platform configuration part as it unnecessarily constrains the installation of dependencies. As adviced by Ole Vik after research by pamtbaau, see Grav Forum post Unable to use third party library in new plugin

bleutzinn added 2 commits June 1, 2023 17:02
Removed the platform configuration part as it unnecessarily constrains the installation of dependencies.
A plugin name must not start with a numeric character to avoid illegal class names.
@bleutzinn
Copy link
Contributor Author

Also added a validation check on the name value to prevent a plugin name starting with a numeric character. Fixes issue #79

if ($value === null || trim($value) === '') {
throw new \RuntimeException('Name cannot be empty');
}

// Check if name starts with a numeric character
if (is_numeric($value[0])) {
throw new \RuntimeException('Name must start with a alphanumeric character [a-z|A-Z]');

Choose a reason for hiding this comment

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

I assume it's meant to be just an alpha instead of alphanumeric :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for spotting! That was a typo.
An updates PR is in the making.

@rhukster rhukster merged commit f09f468 into getgrav:develop Jun 6, 2023
@rhukster
Copy link
Member

rhukster commented Jun 6, 2023

Cheers.

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.

3 participants