Skip to content

Commit

Permalink
fix: preg_replace_callback(): Empty regular expression (#53)
Browse files Browse the repository at this point in the history
* chore: add tests for basic identification of bad words

* enable tests

* php ^7.4

* debug: remove 8.2, 8.3

* refactor and fix tests

* Apply fixes from StyleCI

[ci skip] [skip ci]

* rename test

* perf: store censors in cache rather than db

* Apply fixes from StyleCI

[ci skip] [skip ci]

* further testing

* Apply fixes from StyleCI

[ci skip] [skip ci]

* remove settings based censors key

* Apply fixes from StyleCI

[ci skip] [skip ci]

* chore: switch to yarn

---------

Co-authored-by: StyleCI Bot <[email protected]>
  • Loading branch information
imorland and StyleCIBot committed Jun 12, 2024
1 parent c327690 commit 1e32bbb
Show file tree
Hide file tree
Showing 17 changed files with 2,651 additions and 6,291 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ jobs:
run:
uses: flarum/framework/.github/workflows/[email protected]
with:
enable_backend_testing: false
enable_backend_testing: true
enable_phpstan: true
php_versions: '["7.4", "8.0", "8.1", "8.2", "8.3"]'

backend_directory: .
2 changes: 1 addition & 1 deletion .github/workflows/frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:

frontend_directory: ./js
backend_directory: .
js_package_manager: npm
js_package_manager: yarn
main_git_branch: master

secrets:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ node_modules
bower_components
js/dist
composer.lock
.phpunit.result.cache
27 changes: 23 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
}
],
"require": {
"php": "^7.4 || ^8.0",
"flarum/core": "^1.2.0",
"flarum/approval": "*",
"flarum/flags": "*"
Expand All @@ -53,18 +54,36 @@
},
"flarum-cli": {
"modules": {
"githubActions": true
"githubActions": true,
"backendTesting": true
}
}
},
"require-dev": {
"flarum/phpstan": "*"
"flarum/phpstan": "*",
"flarum/testing": "^1.0.0"
},
"scripts": {
"analyse:phpstan": "phpstan analyse",
"clear-cache:phpstan": "phpstan clear-result-cache"
"clear-cache:phpstan": "phpstan clear-result-cache",
"test": [
"@test:unit",
"@test:integration"
],
"test:unit": "phpunit -c tests/phpunit.unit.xml",
"test:integration": "phpunit -c tests/phpunit.integration.xml",
"test:setup": "@php tests/integration/setup.php"
},
"scripts-descriptions": {
"analyse:phpstan": "Run static analysis"
"analyse:phpstan": "Run static analysis",
"test": "Runs all tests.",
"test:unit": "Runs all unit tests.",
"test:integration": "Runs all integration tests.",
"test:setup": "Sets up a database for use with integration tests. Execute this only once."
},
"autoload-dev": {
"psr-4": {
"FoF\\Filter\\Tests\\": "tests/"
}
}
}
Loading

0 comments on commit 1e32bbb

Please sign in to comment.