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

Clarify 'composer update' message + generate *.php for Grav >= 1.7 #62

Merged
merged 2 commits into from
Feb 28, 2021
Merged

Clarify 'composer update' message + generate *.php for Grav >= 1.7 #62

merged 2 commits into from
Feb 28, 2021

Conversation

pamtbaau
Copy link
Contributor

I would like to suggest two changes:

  1. From own experience and from post on forum, the message displayed after creating a 'new-plugin' is confusing when user is not familiar with composer. It is not clear that user must change directory into the folder of the new plugin. See also issue #61

    When user creates plugin 'myplugin', new message would be:

    'Please run `cd user/plugins/myplugin` and `composer update` to initialize the autoloader'

  2. Since Grav 1.7+ is now the default version people download, I would like to suggest the generated code is for Grav >= 1.7 and show comment when required version of Grav is < 1.7

    public static function getSubscribedEvents(): array
    {
        return [
            'onPluginsInitialized' => [
                // Uncomment following line when plugin requires Grav < 1.7
                // ['autoload', 100000],
                ['onPluginsInitialized', 0]
            ]
        ];
    }
    

@w00fz w00fz merged commit c8adb0d into getgrav:develop Feb 28, 2021
@w00fz
Copy link
Member

w00fz commented Feb 28, 2021

Thanks, looks good

w00fz added a commit that referenced this pull request Feb 28, 2021
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.

2 participants