Skip to content

Commit 9f6b920

Browse files
authored
chore: upgrade for Flarum 2.0 (#42)
* chore(2.0): update dependencies Update dependencies to Flarum 2.0 compatible versions. * chore(2.0): update infrastructure Update the extension infrastructure * chore(2.0): misc frontend changes Miscellaneous frontend changes * chore(2.0): misc backend changes Miscellaneous backend changes * chore(2.0): `LESS` code changes Many variables have been renamed to light/dark specific names and most are now used as CSS variables instead. * chore: update for Flarum 2.0 * chore: format js
1 parent b080f81 commit 9f6b920

File tree

20 files changed

+203
-232
lines changed

20 files changed

+203
-232
lines changed

.github/workflows/backend.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on: [workflow_dispatch, push, pull_request]
44

55
jobs:
66
run:
7-
uses: flarum/framework/.github/workflows/REUSABLE_backend.yml@1.x
7+
uses: flarum/framework/.github/workflows/REUSABLE_backend.yml@2.x
88
with:
99
enable_backend_testing: false
1010
enable_phpstan: true

.github/workflows/frontend.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on: [workflow_dispatch, push, pull_request]
44

55
jobs:
66
run:
7-
uses: flarum/framework/.github/workflows/REUSABLE_frontend.yml@1.x
7+
uses: flarum/framework/.github/workflows/REUSABLE_frontend.yml@2.x
88
with:
99
enable_bundlewatch: false
1010
enable_prettier: true
@@ -13,7 +13,7 @@ jobs:
1313
frontend_directory: ./js
1414
backend_directory: .
1515
js_package_manager: yarn
16-
main_git_branch: 1.x
16+
main_git_branch: 2.x
1717

1818
secrets:
1919
bundlewatch_github_token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}

composer.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
}
2020
],
2121
"require": {
22-
"flarum/core": "^1.3.1",
22+
"flarum/core": "^2.0.0",
2323
"sentry/sdk": "^4.0",
2424
"ext-curl": "*"
2525
},
@@ -49,8 +49,8 @@
4949
"color": "#fff"
5050
}
5151
},
52-
"flagrow": {
53-
"discuss": "https://discuss.flarum.org/d/18089"
52+
"branch-alias": {
53+
"2.x": "2.x-dev"
5454
},
5555
"flarum-cli": {
5656
"modules": {
@@ -71,8 +71,9 @@
7171
"analyse:phpstan": "Run static analysis"
7272
},
7373
"require-dev": {
74-
"flarum/phpstan": "*"
74+
"flarum/phpstan": "^2.0.0",
75+
"flarum/testing": "^2.0.0"
7576
},
76-
"minimum-stability": "stable",
77+
"minimum-stability": "beta",
7778
"prefer-stable": true
78-
}
79+
}
File renamed without changes.
File renamed without changes.

js/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
"webpack-merge": "^5.9.0",
2525
"typescript": "^4.5.4",
2626
"typescript-coverage-report": "^0.6.1",
27-
"flarum-tsconfig": "^1.0.2",
28-
"flarum-webpack-config": "^2.0.0",
27+
"flarum-tsconfig": "^2.0.0",
28+
"flarum-webpack-config": "^3.0.0",
2929
"webpack": "^5.95.0",
3030
"webpack-cli": "^5.1.4"
3131
}

js/src/admin/extend.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import Extend from 'flarum/common/extenders';
2+
import SentrySettingsPage from './components/SentrySettingsPage';
3+
4+
export default [
5+
new Extend.Admin() //
6+
.page(SentrySettingsPage),
7+
];

js/src/admin/index.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import app from 'flarum/admin/app';
2-
import SentrySettingsPage from './components/SentrySettingsPage';
2+
3+
export { default as extend } from './extend';
34

45
app.initializers.add('fof/sentry', () => {
5-
app.extensionData.for('fof-sentry').registerPage(SentrySettingsPage);
6+
//
67
});

0 commit comments

Comments
 (0)