Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
4e28a95
Update dependencies to work with Bolt 6
bobvandevijver Dec 18, 2025
07a7738
Upgrade ECS to be in sync with bolt/core
bobvandevijver Dec 18, 2025
c3f7995
Upgrade phpstan, add rector
bobvandevijver Dec 18, 2025
3f1cc0a
Replace Tightenco\Collect with Illuminate
bobvandevijver Dec 18, 2025
84e712a
Use constructor property promotion
bobvandevijver Dec 18, 2025
8bafd13
Use request stack correctly
bobvandevijver Dec 18, 2025
eefad35
Add readonly modifiers to injected services
bobvandevijver Dec 18, 2025
e4fd00c
collection
bobvandevijver Dec 18, 2025
c0934e0
Promoty annotations to actual typings
bobvandevijver Dec 18, 2025
542da4f
Apply remaining rector suggestions
bobvandevijver Dec 18, 2025
e5fd7bc
Add ext-curl to composer requirements
bobvandevijver Dec 18, 2025
7859682
Migrate from annotation to attribute
bobvandevijver Dec 18, 2025
126a9f0
Fix request deprecation
bobvandevijver Dec 18, 2025
5e31056
Resolve extension typing
bobvandevijver Dec 18, 2025
098823a
Fix PHPStan issues
bobvandevijver Dec 18, 2025
98f963b
Resolve PHPStan issues
bobvandevijver Dec 18, 2025
a7f1581
Resolve PHPStan issues
bobvandevijver Dec 18, 2025
4de4eb8
Use FormInterface instead of Form
bobvandevijver Dec 18, 2025
aeefb2a
Resolve PHPStan issues
bobvandevijver Dec 18, 2025
58303f5
Add baseline for missing array/generic types
bobvandevijver Dec 18, 2025
d807150
Add github actions
bobvandevijver Dec 18, 2025
268be74
Add .editorconfig
bobvandevijver Dec 18, 2025
fb1b215
Bump dependencies
bobvandevijver Dec 18, 2025
15d94b1
Add GD extension to actions
bobvandevijver Dec 18, 2025
7cc76b7
Use run to install composer dependencies instead of action
bobvandevijver Dec 18, 2025
5ca831b
Apply latest Rector changes
bobvandevijver Dec 18, 2025
b56d634
Add stale workflow
bobvandevijver Dec 18, 2025
61c17a7
Add additional readonly modifiers
bobvandevijver Dec 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 96 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# editorconfig.org

root = true

[*]
# Change these settings to your own preference
indent_style = space
indent_size = 4

# We recommend you to keep these unchanged
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.feature]
indent_style = space
indent_size = 2

[*.js]
indent_style = space
indent_size = 4

[*.json]
indent_style = space
indent_size = 4

[*.md]
trim_trailing_whitespace = false

[*.php]
indent_style = space
indent_size = 4

[*.scss]
indent_style = space
indent_size = 2

[*.sh]
indent_style = tab
indent_size = 4

[*.vcl]
indent_style = space
indent_size = 2

[*.xml]
indent_style = space
indent_size = 4

[*.{yaml,yml}]
indent_style = space
indent_size = 2
trim_trailing_whitespace = false

[.github/workflows/*.yml]
indent_style = space
indent_size = 2

[.gitmodules]
indent_style = tab
indent_size = 4

[*.neon{,.dist}]
indent_style = tab
indent_size = 4

[.php_cs{,.dist}]
indent_style = space
indent_size = 4

[composer.json]
indent_style = space
indent_size = 4

[docker-compose{,.*}.{yaml,yml}]
indent_style = space
indent_size = 2

[Dockerfile]
indent_style = tab
indent_size = 4

[Makefile]
indent_style = tab
indent_size = 4

[package.json]
indent_style = space
indent_size = 2

[phpunit.xml{,.dist}]
indent_style = space
indent_size = 4
80 changes: 80 additions & 0 deletions .github/workflows/code_analysis.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: Code Analysis

on:
pull_request: null
push:
branches:
- main

env:
COMPOSER_CACHE_DIR: /tmp/composer-cache

jobs:
rector_analysis:
name: Rector analysis
runs-on: ubuntu-latest
env:
PHP_VERSION: 8.4
steps:
- uses: actions/checkout@v6

- uses: shivammathur/setup-php@v2
with:
php-version: ${{ env.PHP_VERSION }}
extensions: json, mbstring, pdo, curl, pdo_sqlite, gd
coverage: none
tools: symfony-cli
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Cache Composer dependencies
uses: actions/cache@v4
with:
path: ${{ env.COMPOSER_CACHE_DIR }}
key: ${{ runner.os }}-${{ env.PHP_VERSION }}-${{ hashFiles('**/composer.json') }}

- run: composer install --no-progress --no-interaction

- run: vendor/bin/rector process -n --no-progress-bar --ansi

code_analysis:
strategy:
fail-fast: false
matrix:
php-version: [ '8.2', '8.3', '8.4' ]
actions:
- name: Coding Standard
# tip: add "--ansi" to commands in CI to make them full of colors
run: vendor/bin/ecs check src --ansi

- name: PHPStan
run: vendor/bin/phpstan analyse --ansi

- name: Check composer.json and composer.lock
run: composer validate --strict --ansi

name: ${{ matrix.actions.name }} - PHP ${{ matrix.php-version }}
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v6
# see https://github.com/shivammathur/setup-php
- uses: shivammathur/setup-php@v2
with:
# test the lowest version, to make sure checks pass on it
php-version: ${{ matrix.php-version }}
extensions: json, mbstring, pdo, curl, pdo_sqlite, gd
coverage: none
tools: symfony-cli
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Cache Composer dependencies
uses: actions/cache@v4
with:
path: ${{ env.COMPOSER_CACHE_DIR }}
key: ${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('**/composer.json') }}

- run: composer install --no-progress --no-interaction

- run: ${{ matrix.actions.run }}
42 changes: 42 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Close stale issues and PRs

on:
schedule:
- cron: '0 7 * * *'

permissions: { }

concurrency:
group: close-stale-${{ github.ref }}
cancel-in-progress: true

jobs:
stale:
name: Close stale issues and PRs
runs-on: ubuntu-24.04
permissions:
actions: write
issues: write
pull-requests: write
steps:
- uses: actions/stale@v10.1.0
with:
sort-by: updated
ascending: true # Start with ascending to process oldest items first
days-before-stale: 60
days-before-close: 30
exempt-all-milestones: true
stale-issue-message: >-
In an effort to keep our issue list manageable, we are marking this issue as stale because it has been 60 days without activity.
If this issue is still relevant, please let us know by posting a quick comment so that it remains open.
close-issue-message: >-
This issue was closed because it has been stalled for 90 days with no activity.
Feel free to open a new issue if necessary!
stale-pr-message: >-
In an effort to keep our pull request list manageable, we are marking this PR as stale because it has been 60 days without activity.
If this PR is still relevant, please let us know by posting a quick comment or update so that it can be assigned and hopefully merged.
close-pr-message: >-
This PR was closed because it has been stalled for 90 days with no activity.
Feel free to open a new PR if necessary!
39 changes: 29 additions & 10 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,34 @@
{
"name": "bolt/forms",
"description": "📦 This Bolt extension can be used to handle forms in your Bolt 5 project.",
"description": "📦 This Bolt extension can be used to handle forms in your Bolt project.",
"type": "bolt-extension",
"license": "MIT",
"authors": [
{
"name": "Bolt developers"
},
{
"name": "Bob den Otter",
"email": "bobdenotter@gmail.com"
}
],
"require": {
"php": ">=7.2.9",
"twig/twig": "^2.12 || ^3.0",
"php": ">=8.2",
"ext-curl": "*",
"ext-json": "*",
"gregwar/captcha-bundle": "^2.2",
"pixelopen/cloudflare-turnstile-bundle": "^0.1.3"
"twig/twig": "^3.21",
"gregwar/captcha-bundle": "^2.4",
"pixelopen/cloudflare-turnstile-bundle": "^0.4"
},
"require-dev": {
"phpstan/phpstan": "^0.12",
"phpstan/phpstan-doctrine": "^0.12",
"phpstan/phpstan-symfony": "^0.12",
"bolt/core": "^5.1",
"symplify/easy-coding-standard": "^10.2"
"bolt/core": "^6.0",
"phpstan/extension-installer": "1.4.3",
"phpstan/phpstan": "2.1.33",
"phpstan/phpstan-deprecation-rules": "2.0.3",
"phpstan/phpstan-doctrine": "2.0.12",
"phpstan/phpstan-symfony": "2.0.9",
"rector/rector": "2.2.14",
"symplify/easy-coding-standard": "^13"
},
"autoload": {
"psr-4": {
Expand All @@ -31,6 +38,18 @@
"minimum-stability": "dev",
"prefer-stable": true,
"extra": {
"branch-alias": {
"dev-main": "2.0.x-dev"
},
"entrypoint": "Bolt\\BoltForms\\Extension"
},
"config": {
"allow-plugins": {
"symfony/flex": false,
"drupol/composer-packages": false,
"dealerdirect/phpcodesniffer-composer-installer": false,
"symfony/runtime": true,
"phpstan/extension-installer": true
}
}
}
Loading