-
Notifications
You must be signed in to change notification settings - Fork 5
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
Refactored install command #111
Conversation
Made a PR to Statamic so we can select specific repositories on the install command for the Eloquent Driver. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It feels weird to have this file here with a namespace that doesn't match. Maybe create a stubs directory just like Laravel handles that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But the namespace matches and we dont actually publish it to the project, we load it from this repository.
See src/Commands/InstallCommand.php:85
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah I see, but it's likely that the end user want to edit the user model.
- Maybe keep it as a stub and publish it? But what if there is already a model?
- Keep it here and extend it within the project?
- If there is already a user model; that file still needs this changes.
So maybe option 2 so we can simply change the "extends ..." in case 3 so it will extend the model from this package instead of the framework? project -> package -> framework
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes 2 seems fine to me as well.
But during the install command do we just keep it in the package?
So when a user wants to extend it into their project, they can do it themselves.
If you run the command twice, it doesn't mess anything up? |
Added some checks and changed some stuff around to make sure nothing breaks when running the install command multiple times. |
Changed the flow for the install command a bit, also added the configuration for the User model so we don't need #90 anymore.
The flow of the install command now is as follows:
@php artisan statamic:install --ansi
into the post-autoload-dump, as Statamic's install command doesn't do that.Next we setup everything for the user by:
statamic:auth:migration
command.Now we setup everything for the Eloquent Driver by:
statamic:install:eloquent-driver
command to configure the Eloquent DriverAt last we ask the user to:
Furthermore i changed the version of
rapidez/sitemap
to^3.0
for it to work with Rapidez v3.