Skip to content

Commit

Permalink
Adjust default timer field to something generic (#6)
Browse files Browse the repository at this point in the history
* minor: adjust default timer field to something generic
* Change build target of pull request in CI

---------

Co-authored-by: Niels Keurentjes <[email protected]>
  • Loading branch information
kbond and curry684 authored Nov 10, 2023
1 parent 3c6b059 commit 4c25206
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: test suite

on:
pull_request:
pull_request_target:
push:
branches:
- master
Expand Down
7 changes: 5 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,14 @@
"phpunit/phpunit": "^10.4.2",
"symfony/browser-kit": "^6.3.2|^7.0",
"symfony/css-selector": "^6.3.2|^7.0",
"symfony/debug-pack": "^1.0.10",
"symfony/debug-bundle": "^6.3|^7.0",
"symfony/dotenv": "^6.3.7|^7.0",
"symfony/monolog-bundle": "^3.0",
"symfony/routing": "^6.3.5|^7.0",
"symfony/runtime": "^6.3.2|^7.0",
"symfony/twig-bundle": "^6.3|^7.0"
"symfony/stopwatch": "^6.3|^7.0",
"symfony/twig-bundle": "^6.3|^7.0",
"symfony/web-profiler-bundle": "^6.3|^7.0"
},
"autoload": {
"psr-4": { "Omines\\AntiSpamBundle\\": "src/"}
Expand Down
2 changes: 1 addition & 1 deletion docs/mkdocs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ antispam:
timer:

# Base name of the injected field
field: __antispam_time
field: ___token
min: 3
max: 3600

Expand Down
2 changes: 1 addition & 1 deletion src/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ private function addTimerSection(NodeBuilder $profile): void
->children()
->scalarNode('field')
->info('Base name of the injected field')
->defaultValue('__antispam_time')
->defaultValue('___token')
->end()
->integerNode('min')->defaultValue(SubmitTimerType::DEFAULT_MIN)->min(0)->end()
->integerNode('max')->defaultValue(SubmitTimerType::DEFAULT_MAX)->min(60)->end()
Expand Down
4 changes: 2 additions & 2 deletions tests/Unit/Fixtures/config-1-output.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ profiles:
timer:
min: 3
max: 3600
field: __antispam_time
field: ___token

url_count:
max: 3
Expand All @@ -36,7 +36,7 @@ profiles:
timer:
min: 2
max: 3600
field: __antispam_time
field: ___token

stealth: true
passive: false

0 comments on commit 4c25206

Please sign in to comment.