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

Encourage setting PHP version explicitly #430

Merged
merged 2 commits into from
Apr 5, 2023
Merged

Conversation

rmccue
Copy link
Member

@rmccue rmccue commented Oct 5, 2022

See humanmade/altis-core#590 - we should encourage users to explicitly set the PHP platform version.

@rmccue
Copy link
Member Author

rmccue commented Oct 5, 2022

It may be worth us changing the other config change notes to use the composer config command too, since it's harder to do that wrong

Copy link
Contributor

@kadamwhite kadamwhite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this clarifies the order of operations in a way that would have prevented my issue. If I'm understanding correctly, my mistake was that I upgraded too far while trying to prepare for PHP8, and the text that has been added here doesn't give me any direction that I would have understood. What about something like,

If you are deploying to a live environment that has not yet been upgraded to your target PHP version, the steps above may have resulted in incompatible dependencies for the current PHP version. Set the PHP version target back to the current server target and re-run update Altis with all dependencies to pin any sub dependencies at PHP 7.4-compatible versions.

If there's a different order of operations, for example if we should only deploy Altis 12 alongside a full upgrade to PHP 8, I think that would be good to call out.

@rmccue
Copy link
Member Author

rmccue commented Oct 5, 2022

The section entitled "Switch Off Composer's Platform Check" should cover this already?

@roborourke
Copy link
Contributor

roborourke commented Oct 5, 2022

@rmccue I'm not sure the issue was to do with the platform check from Composer exactly but an uninstallable set of dependencies for the current PHP version based on the composer.lock file.

@mikelittle mikelittle merged commit ed2b492 into master Apr 5, 2023
@mikelittle mikelittle deleted the php-version-explicit branch April 5, 2023 14:59
@hm-backport
Copy link

hm-backport bot commented Apr 5, 2023

The backport to v12-branch failed:

Commits ["3fc68c23ce94fbe6d4bfcee7e591a1341cdc312e","06dd76859bc399d39aad460633b69cbaa6e8f94d"] could not be cherry-picked on top of v12-branch

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub.
git fetch
# Create new working tree.
git worktree add .worktrees/backport v12-branch
# Navigate to the new directory.
cd .worktrees/backport
# Cherry-pick all the commits of this pull request and resolve the likely conflicts.
git cherry-pick 3fc68c23ce94fbe6d4bfcee7e591a1341cdc312e 06dd76859bc399d39aad460633b69cbaa6e8f94d
# Create a new branch with these backported commits.
git checkout -b backport-430-to-v12-branch
# Push it to GitHub.
git push --set-upstream origin backport-430-to-v12-branch
# Go back to the original working tree.
cd ../..
# Delete the working tree.
git worktree remove .worktrees/backport

Then, create a pull request where the base branch is v12-branch and the compare/head branch is backport-430-to-v12-branch.

@hm-backport
Copy link

hm-backport bot commented Apr 5, 2023

The backport to v13-branch failed:

Commits ["3fc68c23ce94fbe6d4bfcee7e591a1341cdc312e","06dd76859bc399d39aad460633b69cbaa6e8f94d"] could not be cherry-picked on top of v13-branch

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub.
git fetch
# Create new working tree.
git worktree add .worktrees/backport v13-branch
# Navigate to the new directory.
cd .worktrees/backport
# Cherry-pick all the commits of this pull request and resolve the likely conflicts.
git cherry-pick 3fc68c23ce94fbe6d4bfcee7e591a1341cdc312e 06dd76859bc399d39aad460633b69cbaa6e8f94d
# Create a new branch with these backported commits.
git checkout -b backport-430-to-v13-branch
# Push it to GitHub.
git push --set-upstream origin backport-430-to-v13-branch
# Go back to the original working tree.
cd ../..
# Delete the working tree.
git worktree remove .worktrees/backport

Then, create a pull request where the base branch is v13-branch and the compare/head branch is backport-430-to-v13-branch.

@hm-backport
Copy link

hm-backport bot commented Apr 5, 2023

The backport to v14-branch failed:

Commits ["3fc68c23ce94fbe6d4bfcee7e591a1341cdc312e","06dd76859bc399d39aad460633b69cbaa6e8f94d"] could not be cherry-picked on top of v14-branch

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub.
git fetch
# Create new working tree.
git worktree add .worktrees/backport v14-branch
# Navigate to the new directory.
cd .worktrees/backport
# Cherry-pick all the commits of this pull request and resolve the likely conflicts.
git cherry-pick 3fc68c23ce94fbe6d4bfcee7e591a1341cdc312e 06dd76859bc399d39aad460633b69cbaa6e8f94d
# Create a new branch with these backported commits.
git checkout -b backport-430-to-v14-branch
# Push it to GitHub.
git push --set-upstream origin backport-430-to-v14-branch
# Go back to the original working tree.
cd ../..
# Delete the working tree.
git worktree remove .worktrees/backport

Then, create a pull request where the base branch is v14-branch and the compare/head branch is backport-430-to-v14-branch.

@mikelittle mikelittle added this to the Altis V15 milestone Apr 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants