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

refactor: flarum 2.0 upgrade #108

Draft
wants to merge 20 commits into
base: master
Choose a base branch
from
Draft

Conversation

SychO9
Copy link
Contributor

@SychO9 SychO9 commented Nov 2, 2024

Upgrades the extension to be compatible with Flarum 2.0

  • This repository was used to test the reliability of the Flarum 2.0 upgrade tool and reinforce it. The rest of it was updated manually and contributed for your convenience.
  • I will likely be posting multiple PRs like these across other repositories, and therefore will not follow-up on any changes.
  • Feel free to make changes to this branch, or close the PR and re-do the upgrade yourself if you prefer.
  • At the very least, this can be used as an example to guide your process either here or in other extensions.

Note

I recommend making a new branch specifically for 2.x releases, and basing this PR off of it, as you will likely want to still support 1.x for a while longer.

Tip

Checkout the upgrade guide: https://docs.flarum.org/2.x/extend/update-2_0

Extension specific-notes

  • This was based on commit: ca18880 there were more commits since then that have to be reapplied.
  • The search source was deleted since the entire search UI was changed in 2.0, this should not be a problem as a solved gambit was added:

image


Marked as draft, but you can essentially do as you please with this.
Thanks!

SychO9 added 20 commits July 26, 2024 09:48
Update dependencies to Flarum 2.0 compatible versions.
Update the extension infrastructure
Importing modules from an extension can now be done though `ext:vendor/extension/module-path` format.
Some Flarum modules are now lazy loaded. Extending them requires a different approach.
Miscellaneous frontend changes
Miscellaneous backend changes
Flarum 2.0 completely changes the JSON:API implementation
Flarum 2.0 introduces a search driver implementation and moves gambits to the frontend.
Many variables have been renamed to light/dark specific names and most are now used as CSS variables instead.
# Conflicts:
#	src/Listeners/SaveBestAnswerToDatabase.php
Start by formatting your code with Prettier.
Flarum 2.0 uses PHPUnit 11.
…views

You now need to provide both plain text and HTML views for notification emails.
@DavideIadeluca DavideIadeluca added the enhancement New feature or request label Nov 2, 2024
@DavideIadeluca DavideIadeluca marked this pull request as draft November 2, 2024 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants