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

Check for latest version #308

Closed
wants to merge 4 commits into from
Closed

Conversation

Jubeki
Copy link
Contributor

@Jubeki Jubeki commented Jan 24, 2024

Closes #306

This prompts the user to update the Laravel Installer before continuing.

How it looks like when the update will be installed (composer messages are wrong because the Laravel Installer Version was changed manually, and therefor Composer does not update anything)

Screenshot 2024-01-25 at 10 40 03

How it looks like when you continue:

Screenshot 2024-01-25 at 10 40 24

To test this you can to the following:

  1. Make sure Laravel Installer is up to date with composer global update
  2. Copy the content of src/NewCommand.php in this PR
  3. Paste it into ~/.composer/vendor/laravel/installer/src/NewCommand.php
  4. Change the version in ~/.composer/vendor/laravel/installer/bin/laravel into 5.3.0
  5. Run laravel new test --no-interaction

To test if the check is not run, you can simply change the version back to 5.4.0.

Considerations

There is also the question how you want to handle downtime with Github. Probably then assuming you are on the latest version?

@Jubeki Jubeki marked this pull request as draft January 25, 2024 09:11
@Jubeki Jubeki marked this pull request as ready for review January 25, 2024 09:46
@taylorotwell
Copy link
Member

Going to table this for now.

@driesvints
Copy link
Member

Sorry @Jubeki, this was my bad. This won't work with situations where the installer is installed using Herd, etc. Thanks for your attempt.

@Jubeki
Copy link
Contributor Author

Jubeki commented Jan 26, 2024

@driesvints I initially had only printed that a new version is available, would this instead be better:

@driesvints
Copy link
Member

It would be the solution doesn't apply for Herd. Let's just table this one for now.

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.

Add check to installer to see if you're on the latest version
3 participants