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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add autoconfiguration of Nette Extensions #61

Open
jelen07 opened this issue Nov 19, 2019 · 2 comments
Open

Add autoconfiguration of Nette Extensions #61

jelen07 opened this issue Nov 19, 2019 · 2 comments

Comments

@jelen07
Copy link

jelen07 commented Nov 19, 2019

I'm not sure if this is the right repostiory for an issue like this, if not I'm sorry in advance.

馃挕 The idea

It would be really helpful if the developer could enable extension simply by

$ composer require 68publishers/application # or any other Nette extension

and some mechanism will do other manual work automatically. Like

  • register the extension
  • add default configuration if necessary
  • update package.json if the extension has some frontend dependency
  • add or run schema migrations if needed
  • register styles and JS if available
  • show some notice
  • composer remove action
  • composer update
  • and so on

To achieve something like that, it would be necessary to create some recommendations (best practices) for extension structure, project configuration and so on.

There're at least three important questions

  1. How to implement this - should it be the Composer extension or something else?
  2. Where should be stored configuration files - within the extension or in some other repository?
  3. What types of "actions" should be implemented? (see the previous list)

Any hints?

@janbarasek
Copy link

Now I think it can be solved by Package Manager (not the official solution).

@mabar
Copy link
Contributor

mabar commented Feb 7, 2023

I am working on orisai/installer which solves that just by running composer require/update

Currently is implemented registration of config files from vendor and their sorting based on composer dependencies.

I will also add interactive upgrade scripts in case package has some required configuration.

However I think handling assets is out-of-scope as there are many possible solutions.
I will probably soon implement extension for handling assets without requiring build tool like Vite/Webpack. It may be used as an optional dependency by installer using packages for zero config assets.

Running migrations is completely out of scope as it is practically just adding folder with migrations in vendor config and running single command in the app. Copying to app and running from there (so they can be edited) is more of a migration tool job.

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

3 participants