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

Provide a composer package (and a custom command) #1

Open
obriat opened this issue Jul 18, 2023 · 2 comments
Open

Provide a composer package (and a custom command) #1

obriat opened this issue Jul 18, 2023 · 2 comments

Comments

@obriat
Copy link

obriat commented Jul 18, 2023

Your script should be provided as a composer package so it could easily added to a projet: composer require metadrop/drupal-fix-permissions-script.

This package should also provide a composer custom command such as composer drupal_fix_permissions

@rsanzante
Copy link
Member

Thanks for your suggestion. I thought about it but I wasn't sure how to do it. I mean, I can provide a PHP package, but maybe it is better to provide a Drush command, because the script is only for Drupal installations. Also, using a separate PHP package would allow total freedom while using Drush I need to stick to drush commands rules.

Additionally, a bash script has no dependencies. Using a PHP package you need at least PHP... what it sounds reasonable because Drupal uses PHP, but in this world of containers and other tech magic it could happen that you have the source code but not the PHP interpreter.

Also, at some point on this road it seems natural to convert the script to PHP code.

So, I'm not sure what to do. PHP package that runs a bash script? Keeping this repo as a dependency on that PHP package so the functionality is available as PHP package and as simple bash script? The same but using a Drush command instead of a simple PHP package?

Any suggestions on this?

@obriat
Copy link
Author

obriat commented Sep 11, 2023

A drush command seems a good choice.
Open an issue/feature on https://github.com/drush-ops/drush/issues that point to this repo and see I you get good feedbacks.
Then propose an MR ?

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

No branches or pull requests

2 participants