mirror of
https://github.com/flarum/core.git
synced 2025-08-13 03:44:32 +02:00
Compare commits
53 Commits
sm/lower-r
...
dependabot
Author | SHA1 | Date | |
---|---|---|---|
|
5bf7a5ae53 | ||
|
9fe17b3c24 | ||
|
4dce4d40a3 | ||
|
a81d13e26c | ||
|
382991648c | ||
|
b44d5175b6 | ||
|
d9e79608fb | ||
|
5d281b9471 | ||
|
27087cc713 | ||
|
d5f944023c | ||
|
153fb8684e | ||
|
eca21fa1bf | ||
|
c835bdb59a | ||
|
570580dcf0 | ||
|
e43449c32d | ||
|
bc695e9865 | ||
|
6d88c99782 | ||
|
097a54289f | ||
|
d90573f8f1 | ||
|
f6e84a0dc5 | ||
|
22b74d0404 | ||
|
94b0d67a40 | ||
|
9920a9f2f0 | ||
|
08b36149fd | ||
|
7f001dfe3b | ||
|
5fbb9fe9a7 | ||
|
33a72f5c14 | ||
|
af2a32a3a4 | ||
|
bcff06a362 | ||
|
e1c82a19dc | ||
|
770feabb59 | ||
|
464b67f848 | ||
|
41e5ff2525 | ||
|
49064f6912 | ||
|
7cfa560b4e | ||
|
70081a267f | ||
|
70158aa0ef | ||
|
5e7fbcb0e8 | ||
|
4feb4a3820 | ||
|
6323314ad7 | ||
|
3b69af2ae6 | ||
|
c401e678f3 | ||
|
03fe885b56 | ||
|
1ebceab85a | ||
|
dd45d75cd8 | ||
|
820894a7c9 | ||
|
845228f251 | ||
|
8c331038da | ||
|
04fe684db8 | ||
|
75d05ee85d | ||
|
8ba9f14642 | ||
|
c2b91ba1cd | ||
|
5d10fdc66a |
54
.github/workflows/REUSABLE_backend.yml
vendored
54
.github/workflows/REUSABLE_backend.yml
vendored
@@ -32,7 +32,7 @@ on:
|
||||
type: string
|
||||
required: false
|
||||
# Keep PHP versions synced with build-install-packages.yml
|
||||
default: '["8.2", "8.3"]'
|
||||
default: '["8.2", "8.3", "8.4"]'
|
||||
|
||||
php_extensions:
|
||||
description: PHP extensions to install.
|
||||
@@ -69,8 +69,8 @@ env:
|
||||
FLARUM_TEST_TMP_DIR_LOCAL: tests/integration/tmp
|
||||
COMPOSER_AUTH: ${{ secrets.composer_auth }}
|
||||
DB_DATABASE: flarum_test
|
||||
DB_USERNAME: root
|
||||
DB_PASSWORD: root
|
||||
DB_USERNAME: flarum
|
||||
DB_PASSWORD: password
|
||||
|
||||
jobs:
|
||||
test:
|
||||
@@ -94,7 +94,7 @@ jobs:
|
||||
driver: mysql
|
||||
- service: mariadb
|
||||
db: MariaDB
|
||||
driver: mysql
|
||||
driver: mariadb
|
||||
- service: 'mysql:8.1.0'
|
||||
db: MySQL 8.1
|
||||
driver: mysql
|
||||
@@ -115,7 +115,7 @@ jobs:
|
||||
- php: ${{ fromJSON(inputs.php_versions)[0] }}
|
||||
service: mariadb
|
||||
db: MariaDB
|
||||
driver: mysql
|
||||
driver: mariadb
|
||||
prefix: flarum_
|
||||
prefixStr: (prefix)
|
||||
- php: ${{ fromJSON(inputs.php_versions)[0] }}
|
||||
@@ -159,9 +159,20 @@ jobs:
|
||||
MYSQL_DATABASE: ${{ env.DB_DATABASE }}
|
||||
MYSQL_USER: ${{ env.DB_USERNAME }}
|
||||
MYSQL_PASSWORD: ${{ env.DB_PASSWORD }}
|
||||
MYSQL_ROOT_PASSWORD: ${{ env.DB_PASSWORD }}
|
||||
MYSQL_ROOT_PASSWORD: root
|
||||
ports:
|
||||
- 13306:3306
|
||||
- 3306
|
||||
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=10
|
||||
mariadb:
|
||||
image: ${{ matrix.driver == 'mariadb' && matrix.service || '' }}
|
||||
env:
|
||||
MARIADB_DATABASE: ${{ env.DB_DATABASE }}
|
||||
MARIADB_USER: ${{ env.DB_USERNAME }}
|
||||
MARIADB_PASSWORD: ${{ env.DB_PASSWORD }}
|
||||
MARIADB_ROOT_PASSWORD: root
|
||||
ports:
|
||||
- 3306
|
||||
options: --health-cmd="healthcheck.sh --connect --innodb_initialized" --health-interval=10s --health-timeout=5s --health-retries=3
|
||||
postgres:
|
||||
image: ${{ matrix.driver == 'pgsql' && matrix.service || '' }}
|
||||
env:
|
||||
@@ -169,7 +180,7 @@ jobs:
|
||||
POSTGRES_USER: ${{ env.DB_USERNAME }}
|
||||
POSTGRES_PASSWORD: ${{ env.DB_PASSWORD }}
|
||||
ports:
|
||||
- 15432:5432
|
||||
- 5432
|
||||
options: >-
|
||||
--health-cmd pg_isready
|
||||
--health-interval 10s
|
||||
@@ -183,7 +194,10 @@ jobs:
|
||||
((github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository) || github.event_name != 'pull_request')
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
@@ -194,12 +208,6 @@ jobs:
|
||||
tools: phpunit, composer:v2
|
||||
ini-values: ${{ matrix.php_ini_values }}
|
||||
|
||||
- name: Create MySQL Database
|
||||
if: ${{ matrix.driver == 'mysql' }}
|
||||
run: |
|
||||
sudo systemctl start mysql
|
||||
mysql -uroot -proot -e 'CREATE DATABASE flarum_test;' --port 13306
|
||||
|
||||
- name: Install Composer dependencies
|
||||
run: composer install
|
||||
working-directory: ${{ inputs.backend_directory }}
|
||||
@@ -222,7 +230,8 @@ jobs:
|
||||
fi
|
||||
working-directory: ${{ inputs.backend_directory }}
|
||||
env:
|
||||
DB_PORT: ${{ matrix.driver == 'mysql' && 13306 || 15432 }}
|
||||
DB_HOST: 127.0.0.1
|
||||
DB_PORT: ${{ (matrix.driver == 'mysql' && job.services.mysql.ports['3306']) || (matrix.driver == 'mariadb' && job.services.mariadb.ports['3306']) || (matrix.driver == 'pgsql' && job.services.postgres.ports['5432']) }}
|
||||
DB_PREFIX: ${{ matrix.prefix }}
|
||||
DB_DRIVER: ${{ matrix.driver }}
|
||||
COMPOSER_PROCESS_TIMEOUT: 600
|
||||
@@ -232,13 +241,7 @@ jobs:
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
php: ${{ fromJSON(inputs.php_versions) }}
|
||||
|
||||
services:
|
||||
mysql:
|
||||
image: mysql:8.0.30
|
||||
ports:
|
||||
- 33306:3306
|
||||
php: ${{ fromJson(inputs.php_versions) }}
|
||||
|
||||
name: 'PHPStan PHP ${{ matrix.php }}'
|
||||
|
||||
@@ -265,12 +268,13 @@ jobs:
|
||||
- name: Create MySQL Database
|
||||
run: |
|
||||
sudo systemctl start mysql
|
||||
mysql -uroot -proot -e 'CREATE DATABASE flarum_test;' --port 33306
|
||||
mysql -uroot -proot -e 'CREATE DATABASE flarum_test;' --port 3306
|
||||
|
||||
- name: Run PHPStan
|
||||
run: composer analyse:phpstan
|
||||
env:
|
||||
DB_PORT: 33306
|
||||
DB_USERNAME: root
|
||||
DB_PORT: 3306
|
||||
DB_PASSWORD: root
|
||||
COMPOSER_PROCESS_TIMEOUT: 600
|
||||
FLARUM_TEST_TMP_DIR_LOCAL: ./tmp
|
||||
|
2
.github/workflows/backend.yml
vendored
2
.github/workflows/backend.yml
vendored
@@ -8,4 +8,4 @@ jobs:
|
||||
with:
|
||||
enable_backend_testing: true
|
||||
backend_directory: .
|
||||
monorepo_tests: "framework/core extensions/akismet extensions/approval extensions/flags extensions/likes extensions/mentions extensions/nicknames extensions/statistics extensions/sticky extensions/subscriptions extensions/suspend extensions/tags extensions/messages"
|
||||
monorepo_tests: "framework/core extensions/akismet extensions/approval extensions/flags extensions/likes extensions/mentions extensions/nicknames extensions/statistics extensions/sticky extensions/subscriptions extensions/suspend extensions/tags extensions/messages php-packages/testing/tests"
|
||||
|
2
.github/workflows/build-install-packages.yml
vendored
2
.github/workflows/build-install-packages.yml
vendored
@@ -6,7 +6,7 @@ on:
|
||||
|
||||
env:
|
||||
VERSION: ${{ github.event.release.tag_name }}
|
||||
PHP_VERSIONS: '8.2 8.3'
|
||||
PHP_VERSIONS: '8.2 8.3 8.4'
|
||||
INSTALL_PACKAGES_INPUTS: '{ "flarum_version": "{0}", "php_versions": "{1}" }'
|
||||
|
||||
jobs:
|
||||
|
119
CHANGELOG.md
119
CHANGELOG.md
@@ -1,5 +1,124 @@
|
||||
# Changelog
|
||||
|
||||
## [v2.0.0-beta.1](https://github.com/flarum/framework/compare/v1.8.9...v2.0.0-beta.1)
|
||||
### Changed
|
||||
- php 8.4 [#4103]
|
||||
- JSON:API refactor [#3971]
|
||||
- (mentions) allow renderer to be used without context [#3954]
|
||||
- (flags) add pagination to flags list [#3931]
|
||||
- (mentions) add integration test for reply approval notification [#3748]
|
||||
- (mentions,emoji) tie autocomplete to editor instance [#3913]
|
||||
- (phpstan) upgrade to be compatible with latest dependency updates [#3835]
|
||||
- (tags) prevent loading tag state if loaded previously [#4009]
|
||||
- (testing) run flarum/testing packages tests back again [#3844]
|
||||
- Do not catch exceptions when testing Console commands [#3813]
|
||||
- Patch vulnerability advisory [#3966]
|
||||
- Search box improvements on tablet devices [#4076]
|
||||
- Test using MySQL 8.1 [#3870]
|
||||
- Upgrade dependencies [#3830], [#4012]
|
||||
- Upgrade `intervention/image` to 3.2 [#3947]
|
||||
- Upgrade Wikimedia/less.php to 4.1 [#3837]
|
||||
- Upgrade Mithril to 2.2 [#3831]
|
||||
- (tags) Wrong tag input width if contains CJK characters [#4127]
|
||||
- allow custom actions runner to be defined [#3988]
|
||||
- avoid using `.fa()` mixins and `@fa-var` vars [#3912]
|
||||
- cleanup composer deps (40dcaf882cd017463ca792762d4aa11de8c5c7da)
|
||||
- corrected typos in routes comments [#3840]
|
||||
- extract `FormModal` from `Modal` [#3922]
|
||||
- extract `buildSettingComponent` method into a `FormGroup` component [#3927]
|
||||
- fix typos [#4021]
|
||||
- function names (d15438846895a5cf7b5a584479ef63a6e3119925)
|
||||
- handle deprecations from 1.x [#3909]
|
||||
- ignore deprecation errors in prod [#4072]
|
||||
- improve debugging experience [#3944]
|
||||
- improve test suite [#3814]
|
||||
- increase phpstan level to 6 [#3836]
|
||||
- `HeaderPrimary.js` converted to typescript [#4052]
|
||||
- merge the app with the container & implement the ApplicationContract [#3862]
|
||||
- recover bundlewatch [#3829]
|
||||
- remove ExtenderInterface[] as a conditional option, only support callable or ::class invoke [#3904]
|
||||
- remove listing of posts in the show discussion endpoint [#4067]
|
||||
- remove unused vars in catch [#3839]
|
||||
- simplify if else conditions [#3843]
|
||||
- simplify variable assignment using null coalescing operator [#4000]
|
||||
- support composer auth in workflows [#3961]
|
||||
- switch formatter to `format-message` [#4088]
|
||||
- transpile js to es6 [#3699]
|
||||
- unify frontend initializers naming [#4003]
|
||||
- update FontAwesome v6 icon search link [#4036]
|
||||
- use `::class` syntax to fetch class name instead of `get_class()` function [#3910]
|
||||
- use `hex_color` rule for color validation [#3936]
|
||||
- use `str_contains` instead of `strpos` [#3841]
|
||||
- graceful failure from extend/override errors [#4134]
|
||||
### Fixed
|
||||
- (a11y) convert empty links to buttons [#3926]
|
||||
- (approval) `PostWasApproved` event triggered incorrectly [#3930]
|
||||
- (em) prevent use if missing php functions (94b0d67a4020e1b7027e0df53dee1d681dc822e1)
|
||||
- (em) production ready check (f6e84a0dc576d1cfe8539b7438244edf156e3b1a)
|
||||
- (testing) use cookie for testing authentication [#3924]
|
||||
- 3 char hex color is incorrectly modified to 6 [#4013]
|
||||
- Add conditional rendering for email status in MailPage.tsx [#3997]
|
||||
- Logout controller allows open redirects [#3948], [#4091]
|
||||
- allow use of an attribute named `relationships` (1ead69e9b66ae9bc335be663498b7ea706adbf73)
|
||||
- cannot install without db prefix [#4001]
|
||||
- change length of email field [#4118]
|
||||
- color input changes while typing [#3919]
|
||||
- console extender does not accept `::class` attribute for schedule [#3903]
|
||||
- default labels with `SettingDropdown` and `SelectDropdown` [#3854]
|
||||
- duplicated `mentionsUsers` in extend.php (2b56129d70d18686a73d044ff65b418eef83f388)
|
||||
- handled API errors break preloaded content [#3920]
|
||||
- improve the flarum validator [#4133]
|
||||
- installation command config path can be null (07623afacde590c45a20537add3b72a919050819)
|
||||
- larastan changed namespace [#3955]
|
||||
- larastan changes frequently (af2a32a3a4f50874c63785f5168e1df60f947553)
|
||||
- load event mentioned tags on show discussion endpoint [#3915]
|
||||
- move `UserSearchResult` to common (35f76bce60361caac8001c41c421de30f567b221)
|
||||
- notify for all posts switch field loading state [#3938]
|
||||
- only set actor on events that have it [#3914]
|
||||
- overflowing forum stats [#3940]
|
||||
- paginated list limit hard to change [#3918]
|
||||
- prevent wiping out existing database on install [#4092]
|
||||
- reset save button state when an error occurs in admin page [#4010]
|
||||
- usage of `aria-hidden=false` might cause inconsistent behavior [#4074]
|
||||
- use dynamic viewport units for height of Modals [#3951]
|
||||
- user pages history not registered [#3916]
|
||||
- validate required cli install args [#4093]
|
||||
- make `WelcomeHero` extensible [#3848]
|
||||
- Update the scheduler info link in admin (#3826)
|
||||
### Added
|
||||
- Export Registry [#3842]
|
||||
- Code Splitting [#3860]
|
||||
- Fontawesome v6 [#4020]
|
||||
- extension bisect [#3980]
|
||||
- extension list UI [#4066]
|
||||
- admin search UI [#4022]
|
||||
- add support for `PgSQL` [#3985]
|
||||
- add support for `SQLite` [#3984]
|
||||
- separate `MariaDB` driver [#4132]
|
||||
- advanced maintenance modes [#3977]
|
||||
- notification unsubscribe links [#3872]
|
||||
- email overhaul with HTML multipart [#3872]
|
||||
- date time formats from locales [#4029]
|
||||
- messages extension [#4028]
|
||||
- search drivers (revamp search system) [#3893]
|
||||
- search UI/UX revamp [#3941]
|
||||
- post search adapted with global search [#4019]
|
||||
- vanilla CSS color scheme changes [#3996]
|
||||
- (emoji) allow the user to set the CDN address [#3908]
|
||||
- (nicknames) allow OAuth to provide a nickname [#4004]
|
||||
- (sticky) make excerpt optional in sticky [#4016]
|
||||
- JS `Notification` extender [#3974]
|
||||
- add `whenExtensionDisabled` to `Conditional` extender [#3847]
|
||||
- add option for filtering read stickied on all discussions page [#4073]
|
||||
- allow resetting settings to default [#3935]
|
||||
- define `FLARUM_START` constant [#4082]
|
||||
- dispatch event to `flarum/installation-packages` on release [#3625]
|
||||
- eloquent factories (primarily for tests) [#3982]
|
||||
- frontend content flexible order priorities [#3765]
|
||||
- improve emoji autocomplete [#3923]
|
||||
- recover support for ico favicon [#4126]
|
||||
- theming and extensibility improvements [#3876]
|
||||
|
||||
## [v1.8.1](https://github.com/flarum/framework/compare/v1.8.0...v1.8.1)
|
||||
### Fixed
|
||||
* recover temporary solution for html entities in browser title (e72541e35de4f71f9d870bbd9bb46ddf586bdf1d)
|
||||
|
16
bin/test.sh
Normal file
16
bin/test.sh
Normal file
@@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
|
||||
MONOREPO_TEST="framework/core extensions/akismet extensions/approval extensions/flags extensions/likes extensions/mentions extensions/nicknames extensions/statistics extensions/sticky extensions/subscriptions extensions/suspend extensions/tags extensions/messages php-packages/testing/tests"
|
||||
|
||||
for test in $MONOREPO_TEST; do
|
||||
echo ""
|
||||
echo "===> Testing $test"
|
||||
echo ""
|
||||
|
||||
# composer test:setup --working-dir=$test
|
||||
composer test --working-dir=$test
|
||||
|
||||
echo ""
|
||||
echo "===> Done testing $test"
|
||||
echo ""
|
||||
done
|
@@ -171,8 +171,9 @@
|
||||
"mockery/mockery": "^1.5",
|
||||
"phpunit/phpunit": "^11.0",
|
||||
"phpstan/phpstan": "^1.10.0",
|
||||
"larastan/larastan": "^2.7",
|
||||
"symfony/var-dumper": "^7.0"
|
||||
"larastan/larastan": "2.9.12",
|
||||
"symfony/var-dumper": "^7.0",
|
||||
"flarum/testing-tests": "*@dev"
|
||||
},
|
||||
"config": {
|
||||
"sort-packages": true
|
||||
@@ -217,5 +218,11 @@
|
||||
},
|
||||
"scripts-descriptions": {
|
||||
"analyse:phpstan": "Run static analysis"
|
||||
}
|
||||
},
|
||||
"repositories": [
|
||||
{
|
||||
"type": "path",
|
||||
"url": "php-packages/testing/tests"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -19,7 +19,7 @@
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"flarum/core": "^2.0",
|
||||
"flarum/core": "^2.0.0-beta.1",
|
||||
"flarum/approval": "^2.0"
|
||||
},
|
||||
"autoload": {
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phpunit
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
|
||||
xsi:noNamespaceSchemaLocation="../../../vendor/phpunit/phpunit/phpunit.xsd"
|
||||
backupGlobals="false"
|
||||
cacheDirectory=".phpunit.cache"
|
||||
backupStaticProperties="false"
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phpunit
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
|
||||
xsi:noNamespaceSchemaLocation="../../../vendor/phpunit/phpunit/phpunit.xsd"
|
||||
backupGlobals="false"
|
||||
cacheDirectory=".phpunit.cache"
|
||||
backupStaticProperties="false"
|
||||
|
@@ -19,7 +19,7 @@
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"flarum/core": "^2.0",
|
||||
"flarum/core": "^2.0.0-beta.1",
|
||||
"flarum/flags": "^2.0"
|
||||
},
|
||||
"autoload": {
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phpunit
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
|
||||
xsi:noNamespaceSchemaLocation="../../../vendor/phpunit/phpunit/phpunit.xsd"
|
||||
backupGlobals="false"
|
||||
cacheDirectory=".phpunit.cache"
|
||||
backupStaticProperties="false"
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phpunit
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
|
||||
xsi:noNamespaceSchemaLocation="../../../vendor/phpunit/phpunit/phpunit.xsd"
|
||||
backupGlobals="false"
|
||||
cacheDirectory=".phpunit.cache"
|
||||
backupStaticProperties="false"
|
||||
|
@@ -19,7 +19,7 @@
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"flarum/core": "^2.0"
|
||||
"flarum/core": "^2.0.0-beta.1"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
|
@@ -19,7 +19,7 @@
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"flarum/core": "^2.0"
|
||||
"flarum/core": "^2.0.0-beta.1"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
|
2
extensions/embed/js/dist/forum.js
generated
vendored
2
extensions/embed/js/dist/forum.js
generated
vendored
File diff suppressed because one or more lines are too long
2
extensions/embed/js/dist/forum.js.map
generated
vendored
2
extensions/embed/js/dist/forum.js.map
generated
vendored
File diff suppressed because one or more lines are too long
@@ -19,7 +19,7 @@
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"flarum/core": "^2.0"
|
||||
"flarum/core": "^2.0.0-beta.1"
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
|
2
extensions/emoji/js/dist/forum.js
generated
vendored
2
extensions/emoji/js/dist/forum.js
generated
vendored
File diff suppressed because one or more lines are too long
2
extensions/emoji/js/dist/forum.js.map
generated
vendored
2
extensions/emoji/js/dist/forum.js.map
generated
vendored
File diff suppressed because one or more lines are too long
@@ -19,7 +19,7 @@
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"flarum/core": "^2.0"
|
||||
"flarum/core": "^2.0.0-beta.1"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phpunit
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
|
||||
xsi:noNamespaceSchemaLocation="../../../vendor/phpunit/phpunit/phpunit.xsd"
|
||||
backupGlobals="false"
|
||||
cacheDirectory=".phpunit.cache"
|
||||
backupStaticProperties="false"
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phpunit
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
|
||||
xsi:noNamespaceSchemaLocation="../../../vendor/phpunit/phpunit/phpunit.xsd"
|
||||
backupGlobals="false"
|
||||
cacheDirectory=".phpunit.cache"
|
||||
backupStaticProperties="false"
|
||||
|
@@ -7,7 +7,7 @@
|
||||
],
|
||||
"license": "MIT",
|
||||
"require": {
|
||||
"flarum/core": "^2.0"
|
||||
"flarum/core": "^2.0.0-beta.1"
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
|
@@ -19,7 +19,7 @@
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"flarum/core": "^2.0"
|
||||
"flarum/core": "^2.0.0-beta.1"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
|
@@ -64,7 +64,7 @@ class LikePostTest extends TestCase
|
||||
|
||||
#[Test]
|
||||
#[DataProvider('allowedUsersToLike')]
|
||||
public function can_like_a_post_if_allowed(int $postId, ?int $authenticatedAs, string $message, bool $canLikeOwnPost = null)
|
||||
public function can_like_a_post_if_allowed(int $postId, ?int $authenticatedAs, string $message, ?bool $canLikeOwnPost = null)
|
||||
{
|
||||
if (! is_null($canLikeOwnPost)) {
|
||||
$this->setting('flarum-likes.like_own_post', $canLikeOwnPost);
|
||||
@@ -82,7 +82,7 @@ class LikePostTest extends TestCase
|
||||
|
||||
#[Test]
|
||||
#[DataProvider('unallowedUsersToLike')]
|
||||
public function cannot_like_a_post_if_not_allowed(int $postId, ?int $authenticatedAs, string $message, bool $canLikeOwnPost = null)
|
||||
public function cannot_like_a_post_if_not_allowed(int $postId, ?int $authenticatedAs, string $message, ?bool $canLikeOwnPost = null)
|
||||
{
|
||||
if (! is_null($canLikeOwnPost)) {
|
||||
$this->setting('flarum-likes.like_own_post', $canLikeOwnPost);
|
||||
@@ -100,7 +100,7 @@ class LikePostTest extends TestCase
|
||||
|
||||
#[Test]
|
||||
#[DataProvider('allowedUsersToLike')]
|
||||
public function can_dislike_a_post_if_liked_and_allowed(int $postId, ?int $authenticatedAs, string $message, bool $canLikeOwnPost = null)
|
||||
public function can_dislike_a_post_if_liked_and_allowed(int $postId, ?int $authenticatedAs, string $message, ?bool $canLikeOwnPost = null)
|
||||
{
|
||||
if (! is_null($canLikeOwnPost)) {
|
||||
$this->setting('flarum-likes.like_own_post', $canLikeOwnPost);
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phpunit
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
|
||||
xsi:noNamespaceSchemaLocation="../../../vendor/phpunit/phpunit/phpunit.xsd"
|
||||
backupGlobals="false"
|
||||
cacheDirectory=".phpunit.cache"
|
||||
backupStaticProperties="false"
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phpunit
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
|
||||
xsi:noNamespaceSchemaLocation="../../../vendor/phpunit/phpunit/phpunit.xsd"
|
||||
backupGlobals="false"
|
||||
cacheDirectory=".phpunit.cache"
|
||||
backupStaticProperties="false"
|
||||
|
@@ -19,7 +19,7 @@
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"flarum/core": "^2.0"
|
||||
"flarum/core": "^2.0.0-beta.1"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
|
@@ -18,7 +18,7 @@ class DiscussionLockedPost extends AbstractEventPost implements MergeableInterfa
|
||||
{
|
||||
public static string $type = 'discussionLocked';
|
||||
|
||||
public function saveAfter(Post $previous = null): static
|
||||
public function saveAfter(?Post $previous = null): static
|
||||
{
|
||||
// If the previous post is another 'discussion locked' post, and it's
|
||||
// by the same user, then we can merge this post into it. If we find
|
||||
|
@@ -19,7 +19,7 @@
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"flarum/core": "^2.0"
|
||||
"flarum/core": "^2.0.0-beta.1"
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
|
@@ -19,7 +19,7 @@
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"flarum/core": "^2.0"
|
||||
"flarum/core": "^2.0.0-beta.1"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
|
@@ -25,9 +25,13 @@ class FormatGroupMentions
|
||||
public function __invoke(Renderer $renderer, mixed $context, string $xml): string
|
||||
{
|
||||
return Utils::replaceAttributes($xml, 'GROUPMENTION', function ($attributes) use ($context) {
|
||||
$group = ($context instanceof AbstractModel && $context->isRelation('mentionsGroups'))
|
||||
? $context->mentionsGroups->find($attributes['id']) // @phpstan-ignore-line
|
||||
: Group::find($attributes['id']);
|
||||
/** @var Group|null $group */
|
||||
$group = match (true) {
|
||||
$context instanceof AbstractModel && $context->isRelation('mentionsGroups') => $context->relationLoaded('mentionsGroups')
|
||||
? $context->mentionsGroups->find($attributes['id']) // @phpstan-ignore-line
|
||||
: $context->mentionsGroups()->find($attributes['id']), // @phpstan-ignore-line
|
||||
default => Group::query()->find($attributes['id']),
|
||||
};
|
||||
|
||||
if ($group) {
|
||||
$attributes['groupname'] = $group->name_plural;
|
||||
|
@@ -31,9 +31,13 @@ class FormatPostMentions
|
||||
public function __invoke(Renderer $renderer, mixed $context, string $xml): string
|
||||
{
|
||||
return Utils::replaceAttributes($xml, 'POSTMENTION', function ($attributes) use ($context) {
|
||||
$post = ($context instanceof AbstractModel && $context->isRelation('mentionsPosts'))
|
||||
? $context->mentionsPosts->find($attributes['id']) // @phpstan-ignore-line
|
||||
: Post::find($attributes['id']);
|
||||
/** @var Post|null $post */
|
||||
$post = match (true) {
|
||||
$context instanceof AbstractModel && $context->isRelation('mentionsPosts') => $context->relationLoaded('mentionsPosts')
|
||||
? $context->mentionsPosts->find($attributes['id']) // @phpstan-ignore-line
|
||||
: $context->mentionsPosts()->find($attributes['id']), // @phpstan-ignore-line
|
||||
default => Post::query()->find($attributes['id']),
|
||||
};
|
||||
|
||||
if ($post && $post->user) {
|
||||
$attributes['displayname'] = $post->user->display_name;
|
||||
|
@@ -17,13 +17,16 @@ use s9e\TextFormatter\Utils;
|
||||
|
||||
class FormatTagMentions
|
||||
{
|
||||
public function __invoke(Renderer $renderer, mixed $context, string $xml, Request $request = null): string
|
||||
public function __invoke(Renderer $renderer, mixed $context, string $xml, ?Request $request = null): string
|
||||
{
|
||||
return Utils::replaceAttributes($xml, 'TAGMENTION', function ($attributes) use ($context) {
|
||||
/** @var Tag|null $tag */
|
||||
$tag = ($context instanceof AbstractModel && $context->isRelation('mentionsTags'))
|
||||
? $context->mentionsTags->find($attributes['id']) // @phpstan-ignore-line
|
||||
: Tag::query()->find($attributes['id']);
|
||||
$tag = match (true) {
|
||||
$context instanceof AbstractModel && $context->isRelation('mentionsTags') => $context->relationLoaded('mentionsTags')
|
||||
? $context->mentionsTags->find($attributes['id']) // @phpstan-ignore-line
|
||||
: $context->mentionsTags()->find($attributes['id']), // @phpstan-ignore-line
|
||||
default => Tag::query()->find($attributes['id']),
|
||||
};
|
||||
|
||||
if ($tag) {
|
||||
$attributes['deleted'] = false;
|
||||
|
@@ -27,9 +27,13 @@ class FormatUserMentions
|
||||
public function __invoke(Renderer $renderer, mixed $context, string $xml): string
|
||||
{
|
||||
return Utils::replaceAttributes($xml, 'USERMENTION', function ($attributes) use ($context) {
|
||||
$user = ($context instanceof AbstractModel && $context->isRelation('mentionsUsers'))
|
||||
? $context->mentionsUsers->find($attributes['id']) // @phpstan-ignore-line
|
||||
: User::find($attributes['id']);
|
||||
/** @var User|null $user */
|
||||
$user = match (true) {
|
||||
$context instanceof AbstractModel && $context->isRelation('mentionsUsers') => $context->relationLoaded('mentionsUsers')
|
||||
? $context->mentionsUsers->find($attributes['id']) // @phpstan-ignore-line
|
||||
: $context->mentionsUsers()->find($attributes['id']), // @phpstan-ignore-line
|
||||
default => User::query()->find($attributes['id']),
|
||||
};
|
||||
|
||||
$attributes['deleted'] = false;
|
||||
|
||||
|
@@ -34,9 +34,13 @@ class UnparsePostMentions
|
||||
protected function updatePostMentionTags(mixed $context, string $xml): string
|
||||
{
|
||||
return Utils::replaceAttributes($xml, 'POSTMENTION', function ($attributes) use ($context) {
|
||||
$post = ($context instanceof AbstractModel && $context->isRelation('mentionsPosts'))
|
||||
? $context->mentionsPosts->find($attributes['id']) // @phpstan-ignore-line
|
||||
: Post::find($attributes['id']);
|
||||
/** @var Post|null $post */
|
||||
$post = match (true) {
|
||||
$context instanceof AbstractModel && $context->isRelation('mentionsPosts') => $context->relationLoaded('mentionsPosts')
|
||||
? $context->mentionsPosts->find($attributes['id']) // @phpstan-ignore-line
|
||||
: $context->mentionsPosts()->find($attributes['id']), // @phpstan-ignore-line
|
||||
default => Post::query()->find($attributes['id']),
|
||||
};
|
||||
|
||||
if ($post && $post->user) {
|
||||
$attributes['displayname'] = $post->user->display_name;
|
||||
|
@@ -29,9 +29,12 @@ class UnparseTagMentions
|
||||
{
|
||||
return Utils::replaceAttributes($xml, 'TAGMENTION', function (array $attributes) use ($context) {
|
||||
/** @var Tag|null $tag */
|
||||
$tag = ($context instanceof AbstractModel && $context->isRelation('mentionsTags'))
|
||||
? $context->mentionsTags->find($attributes['id']) // @phpstan-ignore-line
|
||||
: Tag::query()->find($attributes['id']);
|
||||
$tag = match (true) {
|
||||
$context instanceof AbstractModel && $context->isRelation('mentionsTags') => $context->relationLoaded('mentionsTags')
|
||||
? $context->mentionsTags->find($attributes['id']) // @phpstan-ignore-line
|
||||
: $context->mentionsTags()->find($attributes['id']), // @phpstan-ignore-line
|
||||
default => Tag::query()->find($attributes['id']),
|
||||
};
|
||||
|
||||
if ($tag) {
|
||||
$attributes['tagname'] = $tag->name;
|
||||
|
@@ -34,9 +34,13 @@ class UnparseUserMentions
|
||||
protected function updateUserMentionTags(mixed $context, string $xml): string
|
||||
{
|
||||
return Utils::replaceAttributes($xml, 'USERMENTION', function ($attributes) use ($context) {
|
||||
$user = ($context instanceof AbstractModel && $context->isRelation('mentionsUsers'))
|
||||
? $context->mentionsUsers->find($attributes['id']) // @phpstan-ignore-line
|
||||
: User::find($attributes['id']);
|
||||
/** @var User|null $user */
|
||||
$user = match (true) {
|
||||
$context instanceof AbstractModel && $context->isRelation('mentionsUsers') => $context->relationLoaded('mentionsUsers')
|
||||
? $context->mentionsUsers->find($attributes['id']) // @phpstan-ignore-line
|
||||
: $context->mentionsUsers()->find($attributes['id']), // @phpstan-ignore-line
|
||||
default => User::query()->find($attributes['id']),
|
||||
};
|
||||
|
||||
$attributes['displayname'] = $user?->display_name ?? $this->translator->trans('core.lib.username.deleted_text');
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phpunit
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
|
||||
xsi:noNamespaceSchemaLocation="../../../vendor/phpunit/phpunit/phpunit.xsd"
|
||||
backupGlobals="false"
|
||||
cacheDirectory=".phpunit.cache"
|
||||
backupStaticProperties="false"
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phpunit
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
|
||||
xsi:noNamespaceSchemaLocation="../../../vendor/phpunit/phpunit/phpunit.xsd"
|
||||
backupGlobals="false"
|
||||
cacheDirectory=".phpunit.cache"
|
||||
backupStaticProperties="false"
|
||||
|
@@ -7,7 +7,7 @@
|
||||
"type": "flarum-extension",
|
||||
"license": "MIT",
|
||||
"require": {
|
||||
"flarum/core": "^2.0"
|
||||
"flarum/core": "^2.0.0-beta.1"
|
||||
},
|
||||
"authors": [
|
||||
{
|
||||
|
2
extensions/messages/js/dist/forum.js
generated
vendored
2
extensions/messages/js/dist/forum.js
generated
vendored
File diff suppressed because one or more lines are too long
2
extensions/messages/js/dist/forum.js.map
generated
vendored
2
extensions/messages/js/dist/forum.js.map
generated
vendored
File diff suppressed because one or more lines are too long
@@ -11,7 +11,7 @@
|
||||
"flarum-tsconfig": "^2.0.0",
|
||||
"typescript": "^4.5.4",
|
||||
"typescript-coverage-report": "^0.6.1",
|
||||
"@flarum/jest-config": "^1.0.1"
|
||||
"@flarum/jest-config": "^2.0.0"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "webpack --mode development --watch",
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phpunit
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
|
||||
xsi:noNamespaceSchemaLocation="../../../vendor/phpunit/phpunit/phpunit.xsd"
|
||||
backupGlobals="false"
|
||||
cacheDirectory=".phpunit.cache"
|
||||
backupStaticProperties="false"
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phpunit
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
|
||||
xsi:noNamespaceSchemaLocation="../../../vendor/phpunit/phpunit/phpunit.xsd"
|
||||
backupGlobals="false"
|
||||
cacheDirectory=".phpunit.cache"
|
||||
backupStaticProperties="false"
|
||||
|
@@ -19,7 +19,7 @@
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"flarum/core": "^2.0"
|
||||
"flarum/core": "^2.0.0-beta.1"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phpunit
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
|
||||
xsi:noNamespaceSchemaLocation="../../../vendor/phpunit/phpunit/phpunit.xsd"
|
||||
backupGlobals="false"
|
||||
cacheDirectory=".phpunit.cache"
|
||||
backupStaticProperties="false"
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phpunit
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
|
||||
xsi:noNamespaceSchemaLocation="../../../vendor/phpunit/phpunit/phpunit.xsd"
|
||||
backupGlobals="false"
|
||||
cacheDirectory=".phpunit.cache"
|
||||
backupStaticProperties="false"
|
||||
|
@@ -22,7 +22,7 @@
|
||||
"source": "https://github.com/flarum/extension-manager"
|
||||
},
|
||||
"require": {
|
||||
"flarum/core": "^2.0",
|
||||
"flarum/core": "^2.0.0-beta.1",
|
||||
"composer/composer": "^2.7"
|
||||
},
|
||||
"require-dev": {
|
||||
|
@@ -46,6 +46,11 @@ return [
|
||||
&& is_writable($paths->base.'/composer.lock');
|
||||
|
||||
$document->payload['flarum-extension-manager.using_sync_queue'] = resolve(Queue::class) instanceof SyncQueue;
|
||||
|
||||
$document->payload['flarum-extension-manager.missing_functions'] = array_values(array_filter(
|
||||
['proc_open', 'escapeshellarg'],
|
||||
fn (string $function): bool => ! function_exists($function)
|
||||
));
|
||||
}),
|
||||
|
||||
new Extend\Locales(__DIR__.'/locale'),
|
||||
|
2
extensions/package-manager/js/dist/admin.js
generated
vendored
2
extensions/package-manager/js/dist/admin.js
generated
vendored
File diff suppressed because one or more lines are too long
2
extensions/package-manager/js/dist/admin.js.map
generated
vendored
2
extensions/package-manager/js/dist/admin.js.map
generated
vendored
File diff suppressed because one or more lines are too long
@@ -1,6 +1,4 @@
|
||||
import app from 'flarum/admin/app';
|
||||
import Component from 'flarum/common/Component';
|
||||
import Alert from 'flarum/common/components/Alert';
|
||||
import { ComponentAttrs } from 'flarum/common/Component';
|
||||
|
||||
import Installer from './Installer';
|
||||
@@ -17,18 +15,10 @@ export default class ControlSection extends Component<ComponentAttrs> {
|
||||
return (
|
||||
<div className="ExtensionPage-settings ExtensionManager-controlSection">
|
||||
<div className="container">
|
||||
{app.data['flarum-extension-manager.writable_dirs'] ? (
|
||||
<Form>
|
||||
<Installer />
|
||||
<Updater />
|
||||
</Form>
|
||||
) : (
|
||||
<div className="Form-group">
|
||||
<Alert type="warning" dismissible={false}>
|
||||
{app.translator.trans('flarum-extension-manager.admin.file_permissions')}
|
||||
</Alert>
|
||||
</div>
|
||||
)}
|
||||
<Form>
|
||||
<Installer />
|
||||
<Updater />
|
||||
</Form>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
@@ -8,6 +8,7 @@ import ControlSection from './ControlSection';
|
||||
import ConfigureComposer from './ConfigureComposer';
|
||||
import ConfigureAuth from './ConfigureAuth';
|
||||
import DiscoverSection from './DiscoverSection';
|
||||
import Alert from 'flarum/common/components/Alert';
|
||||
|
||||
export default class SettingsPage extends ExtensionPage {
|
||||
content() {
|
||||
@@ -43,9 +44,33 @@ export default class SettingsPage extends ExtensionPage {
|
||||
sections(vnode: Mithril.VnodeDOM<ExtensionPageAttrs, this>): ItemList<unknown> {
|
||||
const items = super.sections(vnode);
|
||||
|
||||
items.add('discover', <DiscoverSection />, 15);
|
||||
const writableDirs = app.data['flarum-extension-manager.writable_dirs'];
|
||||
const missingFunctions = app.data['flarum-extension-manager.missing_functions'] as string[] | undefined;
|
||||
const usable = writableDirs && (!missingFunctions || missingFunctions.length === 0);
|
||||
|
||||
items.add('control', <ControlSection />, 10);
|
||||
if (usable) {
|
||||
items.add('discover', <DiscoverSection />, 15);
|
||||
|
||||
items.add('control', <ControlSection />, 10);
|
||||
} else {
|
||||
items.add(
|
||||
'warning',
|
||||
<div className="ExtensionPage-settings">
|
||||
<div className="container">
|
||||
<div className="Form-group">
|
||||
<Alert type="error" dismissible={false}>
|
||||
{!app.data['flarum-extension-manager.writable_dirs']
|
||||
? app.translator.trans('flarum-extension-manager.admin.file_permissions')
|
||||
: app.translator.trans('flarum-extension-manager.admin.required_php_functions', {
|
||||
functions: (app.data['flarum-extension-manager.missing_functions'] as string[]).join(', '),
|
||||
})}
|
||||
</Alert>
|
||||
</div>
|
||||
</div>
|
||||
</div>,
|
||||
10
|
||||
);
|
||||
}
|
||||
|
||||
items.setPriority('content', 8);
|
||||
|
||||
|
@@ -7,7 +7,7 @@ export enum VersionStability {
|
||||
}
|
||||
|
||||
export function isProductionReady(version: string): boolean {
|
||||
return [VersionStability.Stable, VersionStability.RC].includes(stability(version));
|
||||
return [VersionStability.Stable].includes(stability(version));
|
||||
}
|
||||
|
||||
export function stability(version: string): VersionStability {
|
||||
|
@@ -99,6 +99,10 @@ flarum-extension-manager:
|
||||
minor_update_confirmation:
|
||||
content: This will also update any other extensions/packages with available updates.
|
||||
|
||||
required_php_functions: >
|
||||
The extension manager requires the following PHP functions to be enabled: <code>{functions}</code>.
|
||||
If you do not have access to the PHP configuration, please contact your hosting provider.
|
||||
|
||||
sections:
|
||||
discover:
|
||||
description: Add new features and integrations to your Flarum forum with extensions.
|
||||
|
@@ -1,31 +0,0 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Flarum.
|
||||
*
|
||||
* For detailed copyright and license information, please view the
|
||||
* LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Flarum\ExtensionManager;
|
||||
|
||||
use Illuminate\Validation\Validator;
|
||||
|
||||
/**
|
||||
* @todo: fix in 2.0
|
||||
*/
|
||||
trait AllValidatorRules
|
||||
{
|
||||
protected function makeValidator(array $attributes): Validator
|
||||
{
|
||||
$rules = $this->getRules();
|
||||
|
||||
$validator = $this->validator->make($attributes, $rules, $this->getMessages());
|
||||
|
||||
foreach ($this->configuration as $callable) {
|
||||
$callable($this, $validator);
|
||||
}
|
||||
|
||||
return $validator;
|
||||
}
|
||||
}
|
@@ -13,7 +13,7 @@ use Flarum\Foundation\AbstractValidator;
|
||||
|
||||
class ConfigureAuthValidator extends AbstractValidator
|
||||
{
|
||||
use AllValidatorRules;
|
||||
protected bool $validateMissingKeys = true;
|
||||
|
||||
protected array $rules = [
|
||||
'github-oauth' => ['sometimes', 'array'],
|
||||
|
@@ -13,7 +13,7 @@ use Flarum\Foundation\AbstractValidator;
|
||||
|
||||
class ConfigureComposerValidator extends AbstractValidator
|
||||
{
|
||||
use AllValidatorRules;
|
||||
protected bool $validateMissingKeys = true;
|
||||
|
||||
protected array $rules = [
|
||||
'minimum-stability' => ['sometimes', 'in:stable,RC,beta,alpha,dev'],
|
||||
|
@@ -17,7 +17,7 @@ class SetupComposer
|
||||
|
||||
private $config;
|
||||
|
||||
public function __construct(array $config = null)
|
||||
public function __construct(?array $config = null)
|
||||
{
|
||||
$this->config = $config;
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phpunit
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
|
||||
xsi:noNamespaceSchemaLocation="../../../vendor/phpunit/phpunit/phpunit.xsd"
|
||||
backupGlobals="false"
|
||||
cacheDirectory=".phpunit.cache"
|
||||
backupStaticProperties="false"
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phpunit
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
|
||||
xsi:noNamespaceSchemaLocation="../../../vendor/phpunit/phpunit/phpunit.xsd"
|
||||
backupGlobals="false"
|
||||
cacheDirectory=".phpunit.cache"
|
||||
backupStaticProperties="false"
|
||||
|
@@ -19,7 +19,7 @@
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"flarum/core": "^2.0",
|
||||
"flarum/core": "^2.0.0-beta.1",
|
||||
"pusher/pusher-php-server": "^7.2"
|
||||
},
|
||||
"require-dev": {
|
||||
|
@@ -19,7 +19,7 @@
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"flarum/core": "^2.0"
|
||||
"flarum/core": "^2.0.0-beta.1"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
|
2
extensions/statistics/js/dist/admin.js
generated
vendored
2
extensions/statistics/js/dist/admin.js
generated
vendored
File diff suppressed because one or more lines are too long
2
extensions/statistics/js/dist/admin.js.map
generated
vendored
2
extensions/statistics/js/dist/admin.js.map
generated
vendored
File diff suppressed because one or more lines are too long
@@ -142,7 +142,7 @@ class ShowStatisticsData implements RequestHandlerInterface
|
||||
$dbFormattedDatetime = match ($query->getConnection()->getDriverName()) {
|
||||
'sqlite' => "strftime($format, $column)",
|
||||
'pgsql' => "TO_CHAR($column, $format)",
|
||||
'mysql' => "DATE_FORMAT($column, $format)",
|
||||
'mysql', 'mariadb' => "DATE_FORMAT($column, $format)",
|
||||
default => throw new Exception('Unsupported database driver'),
|
||||
};
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phpunit
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
|
||||
xsi:noNamespaceSchemaLocation="../../../vendor/phpunit/phpunit/phpunit.xsd"
|
||||
backupGlobals="false"
|
||||
cacheDirectory=".phpunit.cache"
|
||||
backupStaticProperties="false"
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phpunit
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
|
||||
xsi:noNamespaceSchemaLocation="../../../vendor/phpunit/phpunit/phpunit.xsd"
|
||||
backupGlobals="false"
|
||||
cacheDirectory=".phpunit.cache"
|
||||
backupStaticProperties="false"
|
||||
|
@@ -19,7 +19,7 @@
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"flarum/core": "^2.0"
|
||||
"flarum/core": "^2.0.0-beta.1"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
|
@@ -18,7 +18,7 @@ class DiscussionStickiedPost extends AbstractEventPost implements MergeableInter
|
||||
{
|
||||
public static string $type = 'discussionStickied';
|
||||
|
||||
public function saveAfter(Post $previous = null): static
|
||||
public function saveAfter(?Post $previous = null): static
|
||||
{
|
||||
// If the previous post is another 'discussion stickied' post, and it's
|
||||
// by the same user, then we can merge this post into it. If we find
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phpunit
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
|
||||
xsi:noNamespaceSchemaLocation="../../../vendor/phpunit/phpunit/phpunit.xsd"
|
||||
backupGlobals="false"
|
||||
cacheDirectory=".phpunit.cache"
|
||||
backupStaticProperties="false"
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phpunit
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
|
||||
xsi:noNamespaceSchemaLocation="../../../vendor/phpunit/phpunit/phpunit.xsd"
|
||||
backupGlobals="false"
|
||||
cacheDirectory=".phpunit.cache"
|
||||
backupStaticProperties="false"
|
||||
|
@@ -19,7 +19,7 @@
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"flarum/core": "^2.0"
|
||||
"flarum/core": "^2.0.0-beta.1"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phpunit
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
|
||||
xsi:noNamespaceSchemaLocation="../../../vendor/phpunit/phpunit/phpunit.xsd"
|
||||
backupGlobals="false"
|
||||
cacheDirectory=".phpunit.cache"
|
||||
backupStaticProperties="false"
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phpunit
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
|
||||
xsi:noNamespaceSchemaLocation="../../../vendor/phpunit/phpunit/phpunit.xsd"
|
||||
backupGlobals="false"
|
||||
cacheDirectory=".phpunit.cache"
|
||||
backupStaticProperties="false"
|
||||
|
@@ -19,7 +19,7 @@
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"flarum/core": "^2.0"
|
||||
"flarum/core": "^2.0.0-beta.1"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
|
2
extensions/suspend/js/dist/forum.js
generated
vendored
2
extensions/suspend/js/dist/forum.js
generated
vendored
File diff suppressed because one or more lines are too long
2
extensions/suspend/js/dist/forum.js.map
generated
vendored
2
extensions/suspend/js/dist/forum.js.map
generated
vendored
File diff suppressed because one or more lines are too long
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phpunit
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
|
||||
xsi:noNamespaceSchemaLocation="../../../vendor/phpunit/phpunit/phpunit.xsd"
|
||||
backupGlobals="false"
|
||||
cacheDirectory=".phpunit.cache"
|
||||
backupStaticProperties="false"
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phpunit
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
|
||||
xsi:noNamespaceSchemaLocation="../../../vendor/phpunit/phpunit/phpunit.xsd"
|
||||
backupGlobals="false"
|
||||
cacheDirectory=".phpunit.cache"
|
||||
backupStaticProperties="false"
|
||||
|
@@ -19,7 +19,7 @@
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"flarum/core": "^2.0"
|
||||
"flarum/core": "^2.0.0-beta.1"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
|
1
extensions/tags/js/dist-typings/common/components/TagSelectionModal.d.ts
generated
vendored
1
extensions/tags/js/dist-typings/common/components/TagSelectionModal.d.ts
generated
vendored
@@ -58,6 +58,7 @@ export default class TagSelectionModal<CustomAttrs extends ITagSelectionModalAtt
|
||||
oninit(vnode: Mithril.Vnode<CustomAttrs, this>): void;
|
||||
className(): string;
|
||||
title(): string | undefined;
|
||||
lengthWithCJK(text: string): number;
|
||||
content(): JSX.Element | JSX.Element[];
|
||||
/**
|
||||
* Filters the available tags on every state change.
|
||||
|
2
extensions/tags/js/dist/admin.js
generated
vendored
2
extensions/tags/js/dist/admin.js
generated
vendored
File diff suppressed because one or more lines are too long
2
extensions/tags/js/dist/admin.js.map
generated
vendored
2
extensions/tags/js/dist/admin.js.map
generated
vendored
File diff suppressed because one or more lines are too long
2
extensions/tags/js/dist/common/components/TagSelectionModal.js
generated
vendored
2
extensions/tags/js/dist/common/components/TagSelectionModal.js
generated
vendored
File diff suppressed because one or more lines are too long
2
extensions/tags/js/dist/common/components/TagSelectionModal.js.map
generated
vendored
2
extensions/tags/js/dist/common/components/TagSelectionModal.js.map
generated
vendored
File diff suppressed because one or more lines are too long
2
extensions/tags/js/dist/forum.js
generated
vendored
2
extensions/tags/js/dist/forum.js
generated
vendored
File diff suppressed because one or more lines are too long
2
extensions/tags/js/dist/forum.js.map
generated
vendored
2
extensions/tags/js/dist/forum.js.map
generated
vendored
File diff suppressed because one or more lines are too long
2
extensions/tags/js/dist/forum/components/TagDiscussionModal.js
generated
vendored
2
extensions/tags/js/dist/forum/components/TagDiscussionModal.js
generated
vendored
File diff suppressed because one or more lines are too long
2
extensions/tags/js/dist/forum/components/TagDiscussionModal.js.map
generated
vendored
2
extensions/tags/js/dist/forum/components/TagDiscussionModal.js.map
generated
vendored
File diff suppressed because one or more lines are too long
@@ -135,6 +135,14 @@ export default class TagSelectionModal<
|
||||
return this.attrs.title;
|
||||
}
|
||||
|
||||
lengthWithCJK(text: string) {
|
||||
let length = 0;
|
||||
for (const char of text) {
|
||||
length += /[\u4E00-\u9FFF\u3400-\u4DBF\uF900-\uFAFF]/.test(char) ? 2 : 1;
|
||||
}
|
||||
return length;
|
||||
}
|
||||
|
||||
content() {
|
||||
if (this.loading || !this.tags) {
|
||||
return <LoadingIndicator />;
|
||||
@@ -145,7 +153,12 @@ export default class TagSelectionModal<
|
||||
const secondaryCount = this.secondaryCount();
|
||||
const tags = this.getFilteredTags();
|
||||
|
||||
const inputWidth = Math.max(extractText(this.getInstruction(primaryCount, secondaryCount)).length, this.filter().length);
|
||||
// 1 CJK character's width equals to 2ch,
|
||||
// so we count 1 CJK character as 2 characters.
|
||||
const inputWidth = Math.max(
|
||||
this.lengthWithCJK(extractText(this.getInstruction(primaryCount, secondaryCount))),
|
||||
this.lengthWithCJK(this.filter())
|
||||
);
|
||||
|
||||
return [
|
||||
<div className="Modal-body">
|
||||
|
@@ -18,7 +18,7 @@ class DiscussionTaggedPost extends AbstractEventPost implements MergeableInterfa
|
||||
{
|
||||
public static string $type = 'discussionTagged';
|
||||
|
||||
public function saveAfter(Post $previous = null): static
|
||||
public function saveAfter(?Post $previous = null): static
|
||||
{
|
||||
// If the previous post is another 'discussion tagged' post, and it's
|
||||
// by the same user, then we can merge this post into it. If we find
|
||||
|
@@ -146,7 +146,7 @@ class Tag extends AbstractModel
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setLastPostedDiscussion(Discussion $discussion = null): static
|
||||
public function setLastPostedDiscussion(?Discussion $discussion = null): static
|
||||
{
|
||||
$this->last_posted_at = optional($discussion)->last_posted_at;
|
||||
$this->last_posted_discussion_id = optional($discussion)->id;
|
||||
|
@@ -32,7 +32,7 @@ class TagRepository
|
||||
* Find a tag by ID, optionally making sure it is visible to a certain
|
||||
* user, or throw an exception.
|
||||
*/
|
||||
public function findOrFail(int $id, User $actor = null): Tag
|
||||
public function findOrFail(int $id, ?User $actor = null): Tag
|
||||
{
|
||||
$query = Tag::where('id', $id);
|
||||
|
||||
@@ -45,7 +45,7 @@ class TagRepository
|
||||
*
|
||||
* @return Collection<int, Tag>
|
||||
*/
|
||||
public function all(User $user = null): Collection
|
||||
public function all(?User $user = null): Collection
|
||||
{
|
||||
$query = Tag::query();
|
||||
|
||||
@@ -55,7 +55,7 @@ class TagRepository
|
||||
/**
|
||||
* Get the ID of a tag with the given slug.
|
||||
*/
|
||||
public function getIdForSlug(string $slug, User $user = null): ?int
|
||||
public function getIdForSlug(string $slug, ?User $user = null): ?int
|
||||
{
|
||||
$query = Tag::where('slug', $slug);
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phpunit
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
|
||||
xsi:noNamespaceSchemaLocation="../../../vendor/phpunit/phpunit/phpunit.xsd"
|
||||
backupGlobals="false"
|
||||
cacheDirectory=".phpunit.cache"
|
||||
backupStaticProperties="false"
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phpunit
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
|
||||
xsi:noNamespaceSchemaLocation="../../../vendor/phpunit/phpunit/phpunit.xsd"
|
||||
backupGlobals="false"
|
||||
cacheDirectory=".phpunit.cache"
|
||||
backupStaticProperties="false"
|
||||
|
@@ -4,142 +4,142 @@
|
||||
{
|
||||
"name": "akismet",
|
||||
"gitRemote": "git@github.com:flarum/akismet.git",
|
||||
"mainBranch": "main"
|
||||
"mainBranch": "2.x"
|
||||
},
|
||||
{
|
||||
"name": "approval",
|
||||
"gitRemote": "git@github.com:flarum/approval.git",
|
||||
"mainBranch": "main"
|
||||
"mainBranch": "2.x"
|
||||
},
|
||||
{
|
||||
"name": "bbcode",
|
||||
"gitRemote": "git@github.com:flarum/bbcode.git",
|
||||
"mainBranch": "main"
|
||||
"mainBranch": "2.x"
|
||||
},
|
||||
{
|
||||
"name": "embed",
|
||||
"gitRemote": "git@github.com:flarum/embed.git",
|
||||
"mainBranch": "main"
|
||||
"mainBranch": "2.x"
|
||||
},
|
||||
{
|
||||
"name": "emoji",
|
||||
"gitRemote": "git@github.com:flarum/emoji.git",
|
||||
"mainBranch": "main"
|
||||
"mainBranch": "2.x"
|
||||
},
|
||||
{
|
||||
"name": "flags",
|
||||
"gitRemote": "git@github.com:flarum/flags.git",
|
||||
"mainBranch": "main"
|
||||
"mainBranch": "2.x"
|
||||
},
|
||||
{
|
||||
"name": "lang-english",
|
||||
"gitRemote": "git@github.com:flarum/lang-english.git",
|
||||
"mainBranch": "main"
|
||||
"mainBranch": "2.x"
|
||||
},
|
||||
{
|
||||
"name": "likes",
|
||||
"gitRemote": "git@github.com:flarum/likes.git",
|
||||
"mainBranch": "main"
|
||||
"mainBranch": "2.x"
|
||||
},
|
||||
{
|
||||
"name": "lock",
|
||||
"gitRemote": "git@github.com:flarum/lock.git",
|
||||
"mainBranch": "main"
|
||||
"mainBranch": "2.x"
|
||||
},
|
||||
{
|
||||
"name": "markdown",
|
||||
"gitRemote": "git@github.com:flarum/markdown.git",
|
||||
"mainBranch": "main"
|
||||
"mainBranch": "2.x"
|
||||
},
|
||||
{
|
||||
"name": "mentions",
|
||||
"gitRemote": "git@github.com:flarum/mentions.git",
|
||||
"mainBranch": "main"
|
||||
"mainBranch": "2.x"
|
||||
},
|
||||
{
|
||||
"name": "nicknames",
|
||||
"gitRemote": "git@github.com:flarum/nicknames.git",
|
||||
"mainBranch": "main"
|
||||
"mainBranch": "2.x"
|
||||
},
|
||||
{
|
||||
"name": "package-manager",
|
||||
"gitRemote": "git@github.com:flarum/package-manager.git",
|
||||
"mainBranch": "main"
|
||||
"mainBranch": "2.x"
|
||||
},
|
||||
{
|
||||
"name": "pusher",
|
||||
"gitRemote": "git@github.com:flarum/pusher.git",
|
||||
"mainBranch": "main"
|
||||
"mainBranch": "2.x"
|
||||
},
|
||||
{
|
||||
"name": "statistics",
|
||||
"gitRemote": "git@github.com:flarum/statistics.git",
|
||||
"mainBranch": "main"
|
||||
"mainBranch": "2.x"
|
||||
},
|
||||
{
|
||||
"name": "sticky",
|
||||
"gitRemote": "git@github.com:flarum/sticky.git",
|
||||
"mainBranch": "main"
|
||||
"mainBranch": "2.x"
|
||||
},
|
||||
{
|
||||
"name": "subscriptions",
|
||||
"gitRemote": "git@github.com:flarum/subscriptions.git",
|
||||
"mainBranch": "main"
|
||||
"mainBranch": "2.x"
|
||||
},
|
||||
{
|
||||
"name": "suspend",
|
||||
"gitRemote": "git@github.com:flarum/suspend.git",
|
||||
"mainBranch": "main"
|
||||
"mainBranch": "2.x"
|
||||
},
|
||||
{
|
||||
"name": "tags",
|
||||
"gitRemote": "git@github.com:flarum/tags.git",
|
||||
"mainBranch": "main"
|
||||
"mainBranch": "2.x"
|
||||
},
|
||||
{
|
||||
"name": "messages",
|
||||
"gitRemote": "git@github.com:flarum/messages.git",
|
||||
"mainBranch": "main"
|
||||
"mainBranch": "2.x"
|
||||
}
|
||||
],
|
||||
"composer": [
|
||||
{
|
||||
"name": "testing",
|
||||
"gitRemote": "git@github.com:flarum/testing.git",
|
||||
"mainBranch": "main"
|
||||
"mainBranch": "2.x"
|
||||
},
|
||||
{
|
||||
"name": "phpstan",
|
||||
"gitRemote": "git@github.com:flarum/phpstan.git",
|
||||
"mainBranch": "main"
|
||||
"mainBranch": "2.x"
|
||||
}
|
||||
],
|
||||
"npm": [
|
||||
{
|
||||
"name": "jest-config",
|
||||
"gitRemote": "git@github.com:flarum/jest-config.git",
|
||||
"mainBranch": "main"
|
||||
"mainBranch": "2.x"
|
||||
},
|
||||
{
|
||||
"name": "prettier-config",
|
||||
"gitRemote": "git@github.com:flarum/prettier-config.git",
|
||||
"mainBranch": "main"
|
||||
"mainBranch": "2.x"
|
||||
},
|
||||
{
|
||||
"name": "webpack-config",
|
||||
"gitRemote": "git@github.com:flarum/flarum-webpack-config.git",
|
||||
"mainBranch": "main"
|
||||
"mainBranch": "2.x"
|
||||
},
|
||||
{
|
||||
"name": "tsconfig",
|
||||
"gitRemote": "git@github.com:flarum/flarum-tsconfig.git",
|
||||
"mainBranch": "main"
|
||||
"mainBranch": "2.x"
|
||||
}
|
||||
],
|
||||
"core": {
|
||||
"name": "core",
|
||||
"gitRemote": "git@github.com:flarum/flarum-core.git",
|
||||
"mainBranch": "main"
|
||||
"mainBranch": "2.x"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
4
framework/core/js/dist-typings/admin/components/GeneralSearchSource.d.ts
generated
vendored
4
framework/core/js/dist-typings/admin/components/GeneralSearchSource.d.ts
generated
vendored
@@ -1,5 +1,5 @@
|
||||
import type Mithril from 'mithril';
|
||||
import type { SearchSource } from './Search';
|
||||
import type { GlobalSearchSource } from './GlobalSearch';
|
||||
import { GeneralIndexData } from '../states/GeneralSearchIndex';
|
||||
import { ExtensionConfig } from '../utils/AdminRegistry';
|
||||
export declare class GeneralSearchResult {
|
||||
@@ -20,7 +20,7 @@ export declare class GeneralSearchResult {
|
||||
/**
|
||||
* Finds and displays settings, permissions and installed extensions (i.e. general search results) in the search dropdown.
|
||||
*/
|
||||
export default class GeneralSearchSource implements SearchSource {
|
||||
export default class GeneralSearchSource implements GlobalSearchSource {
|
||||
protected results: Map<string, GeneralSearchResult[]>;
|
||||
resource: string;
|
||||
title(): string;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user