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

[WIP] Create Install Command #118

Draft
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

AlexJump24
Copy link
Contributor

@AlexJump24 AlexJump24 commented Oct 14, 2024

Currently WIP as need to prompt for the configuration values if the user says yes to configuring Cachet.

One thing I'm not 100% sure the best approach for is configuring a secondary connection, incase you want to the migrations separate to your main database. Something I'd probably always want to do given the potential for table name clashes etc.

I wasn't sure if either to define getConnectionName() on each model which I think is the approach Laravel Passport takes, or extends the base model and defining on there and having all models extend the internal base model. Or there is probably an even better idea 😄

I've also moved the database settings from the seeder to the migration as it was kind of duplicating the logic, if this is not ok I can revert. Same with moving things from the testbench.yaml as felt it may as well be in the install command now other than the Sqlite file which would be needed for Testbench.

Once the configuration values are set up I am not sure what else would then be needed as its a bit different now given its composer required into applications rather than a standalone Laravel application.

Hopefully this is all ok so far!

@jbrooksuk jbrooksuk force-pushed the feature/issue-104-install-command branch from bcc4b52 to 760bd43 Compare October 15, 2024 09:51
@jbrooksuk jbrooksuk linked an issue Oct 15, 2024 that may be closed by this pull request
@jbrooksuk
Copy link
Member

@AlexJump24 I think some of the options we ask for don't need to be required. For example:

  • About
  • Refresh Rate

And maybe the attribute can have two properties; required and default?

src/Settings/Attributes/Description.php Outdated Show resolved Hide resolved
src/Settings/Attributes/Description.php Outdated Show resolved Hide resolved
src/Commands/InstallCommand.php Outdated Show resolved Hide resolved
@AlexJump24
Copy link
Contributor Author

AlexJump24 commented Oct 18, 2024

sure 👍🏼 @jbrooksuk

Did you have any preference on the following for supporting a separate connection.

I wasn't sure if either to define getConnectionName() on each model which I think is the approach Laravel Passport takes, or extends the base model and defining on there and having all models extend the internal base model. Or there is probably an even better idea

@jbrooksuk
Copy link
Member

jbrooksuk commented Oct 19, 2024

Hmm, I think I'd use the method that Pulse uses, where it has a connection config which I believe fallsback to the default.

https://github.com/laravel/pulse/blob/5dd3cd257305c796900a69d3307fea3de1425813/config/pulse.php#L59-L66

@jbrooksuk
Copy link
Member

Hey @AlexJump24, how's this going?

@jbrooksuk jbrooksuk force-pushed the feature/issue-104-install-command branch from 44bb282 to c628bc5 Compare November 30, 2024 15:23
@AlexJump24
Copy link
Contributor Author

Hi @jbrooksuk sorry I totally missed this message, I have been unfortunately very busy so have been unable to look into this, I am hoping with the Xmas break coming up that I'll have some time to address the latest feedback for you 🙂

@jbrooksuk
Copy link
Member

@AlexJump24 no problem! Enjoy Christmas and I hope to see your future contributions 🫶

@jbrooksuk
Copy link
Member

By the way @AlexJump24, this command can also optionally call cachet:make:user to finish the setup process 👌

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.

Install Command
2 participants