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

Missing '-b 20.04' in Homestead installation guide #109

Closed
notjoshjames opened this issue Apr 18, 2022 · 5 comments
Closed

Missing '-b 20.04' in Homestead installation guide #109

notjoshjames opened this issue Apr 18, 2022 · 5 comments

Comments

@notjoshjames
Copy link

In the Get Started section, the user is directed to clone the Homestead repository with the following command:

git clone https://github.com/laravel/homestead.git vagrant/Homestead

However, this does not match the command in the vagrant/README.md which is:

git clone https://github.com/laravel/homestead.git vagrant/Homestead -b 20.04

The critical difference is the latter option is using -b to specify the specific branch, 20.04. This results in an entirely different virtual machine.

I originally used the clone command in the Learn documentation, and just spent an hour trying to identify why PHP and other dependencies differed from what was specified. This should be updated!

@StrykeSlammerII
Copy link
Contributor

Q: Adjusting the git clone command here looks like a bandaid fix to me. Is it better to update the expected software instead?

Short A: Looks like the UF install directions for Homestead are generally outdated.
I don't know how painful it will be to update UF's install process and documents.

Long A:

  • Homestead 20.04 branch is currently listed as "stale", with last update 16 months ago vs 3 months for release branch--BUT 20.04 seems to also have ~100 commits that weren't merged back with main. I have no idea how relevant any of those are.
  • There are several issues in first half of '21 that also mention related install problems. Homestead release 12.3.1 notes say that the 20.04 branch reference was taken out of their readme (summer of '21), and I also found a note (Feb '21) from the maintainer that 20.04 is no longer supported:
    "There will not be any more releases from the 20.04 branch. You should always upgrade to the latest version of Homestead. it's the only one I'm able to support." Originally posted by @svpernova09 in 11.x/10.x base box Composer Hotfix laravel/homestead#1623 (comment)

I'm not a dev on any of these projects, so I'm not 100% sure on the best solution ☹️ Is it worth bandaid-ing UF's "Getting Started" Homestead to explicitly 20.04 (with a note that it is an old branch) until fully updated documentation can be put in place?

@notjoshjames Did the non-20.04 VM cause actual issues setting up UF, or did it just waste time because of the unexpected software/versions?

(I remember having to jump through hoops and do extra research to get UF running from scratch last time I tried. That was only my second UF install, and I don't recall the details now 😦 Some of my difficulties were because I'm noob at DevOps, but possibly the 20.04 branch would have made following the directions easier.)

@svpernova09
Copy link

For Laravel Homestead, end-users should be using the release branch. Brave souls may use main as it's generally stable. The docs cover this quite clearly with an example to check out the release branch. If you must pin a specific Homestead version, realize that Homestead repo versions are tied directly to Homestead base boxes. I do my best to never allow Homestead to work on an incompatible base box but sometimes it just doesn't work out.

If you want to offer Homestead as a foundation, pick a major version and know that version will always be a specific Ubuntu LTS: IE Homestead repo version 13.x will always be Ubuntu 20.04. Soon™️Homestead 14.x will be released supporting Ubuntu 22.04. If you want to target a specific LTS this should give you enough information to plan your upgrades. Note: I don't go back and rebuild old base boxes. Eventually, things like mirrors and certificates will become outdated and ultimately will be unusable.

If you'd like more info using/abusing Homestead feel free to join the Laravel DIscord (https://discord.gg/mPZNm7A) and say hello in the #homestead channel.

@lcharette
Copy link
Member

@StrykeSlammerII The real answer is probably somewhere in between. Homestead box moves faster than UF does. So best solution would indeed to "fix" UF integration, but at the same time chose a (newer) stable box and stick to it as @svpernova09 suggested.

In any case, PR are welcomed to fix this :)

@notjoshjames
Copy link
Author

@StrykeSlammerII you're right, seems like there's a lot of other improvements needed in the Homestead section.

I ran into separate issues with both VMs; I loosely remember three separate challenges:

  • about a dozen -deprecated flags originating from Slim/../collection visible client-side; I think this is a combination of PHP version and Apache handling those errors
  • the "failed to open stream" error referenced in the Vagrant readme (my host is MacOS); I edited the .yaml file as instructed, but after vagrant reload --provision I still experienced the same error
  • some kind of nginx resolution error that seemed unrelated to the previous two mentioned issues

I'm <2 weeks into UserFrosting, and I'm afraid I didn't take detailed notes to reproduce as after sinking a few hours into this and Lando, I opted to just spin up a VPS so I can take control of the Apache config.

From my perspective, I think the skeleton of the Homestead docs is good, but there may be a number of dependencies affecting its accuracy. I'll check on this in a few weeks when I'm more familiar with the codebase and have a few hours to spare. Thanks for the input, everyone.

@lcharette
Copy link
Member

about a dozen -deprecated flags originating from Slim/../collection visible client-side; I think this is a combination of PHP version and Apache handling those errors

That's a PHP 8.1 "feature" (https://stackoverflow.com/a/71133750/445757). PHP Version should be fixed to 8.0 short term.

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

4 participants