Skip to content

Upgrade for Bolt 6 - #126

Merged
bobvandevijver merged 28 commits into
mainfrom
bolt6
Dec 20, 2025
Merged

Upgrade for Bolt 6#126
bobvandevijver merged 28 commits into
mainfrom
bolt6

Conversation

@bobvandevijver

Copy link
Copy Markdown
Member

No description provided.

CopilotAI review requested due to automatic review settings December 18, 2025 22:15

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR upgrades the BoltForms extension for compatibility with Bolt 6, focusing on modernizing the PHP codebase to support PHP 8.2+ requirements and improving code quality through updated tooling.

Key changes:

  • Modernized PHP syntax with constructor property promotion, readonly properties, typed parameters, and return types
  • Updated dependency versions and tooling (PHPStan, Rector, ECS) to support PHP 8.2-8.4
  • Replaced deprecated/removed APIs with modern equivalents (e.g., Request::get()Request::request->get())

Reviewed changes

Copilot reviewed 38 out of 39 changed files in this pull request and generated 5 comments.

Show a summary per file
FileDescription
src/Validator/Constraints/RecaptchaValidator.phpModernized constructor with promoted properties, added return types, updated request access pattern
src/Validator/Constraints/Recaptcha.phpAdded PHP 8 Attribute, converted properties to constructor parameters
src/Validator/Constraints/HcaptchaValidator.phpModernized constructor with promoted properties, added return types, updated request access pattern
src/Validator/Constraints/Hcaptcha.phpAdded PHP 8 Attribute, converted properties to constructor parameters
src/Services/RecaptchaService.phpModernized constructor, updated method signatures with return types
src/Services/HcaptchaService.phpModernized constructor, updated method signatures with return types
src/Honeypot.phpMade class readonly, refactored to accept FormBuilder as parameter instead of storing it
src/FormRuntime.phpModernized constructor, improved error handling with RuntimeException for missing request
src/FormHelper.phpUpdated type hint from concrete Form class to FormInterface
src/FormBuilder.phpModernized constructor, replaced fully qualified Exception class references with imported Exception
src/Form/ContenttypeType.phpModernized constructor, added type checking for PagerfantaInterface
src/Form/CaptchaType.phpAdded return type declaration to getBlockPrefix()
src/Factory/FieldOptions.phpUpdated CloudflareTurnstile import path
src/Factory/FieldConstraints.phpChanged static:: to self:: for internal method calls, added explicit string cast
src/Factory/EmailFactory.phpUpdated property types, removed unused File import, added explicit string cast
src/Extension.phpAdded variadic parameter type, added PHPStan annotation
src/EventSubscriber/*Modernized constructors across all event subscribers, updated method signatures
src/Event/PostSubmitEventDispatcher.phpMade class readonly, modernized constructor with promoted properties
src/Event/PostSubmitEvent.phpModernized constructor with promoted properties, added explicit return types
src/Event/BoltFormsEvent.phpModernized constructor with promoted properties
src/CaptchaException.phpReplaced fully qualified Exception with imported Exception class
src/BoltFormsConfig.phpModernized constructor, improved extension retrieval with explicit typing
rector.phpAdded new Rector configuration file for automated refactoring
phpstan.dist.neonUpdated PHPStan configuration to level 8 with baseline support
phpstan-baseline.phpAdded PHPStan baseline for gradual type strictness adoption
ecs.phpUpdated ECS configuration to use modern fluent API
composer.jsonUpdated minimum PHP version to 8.2, upgraded dependencies
.github/workflows/code_analysis.yamlAdded new GitHub Actions workflow for code quality checks
.editorconfigAdded new EditorConfig file for consistent code style

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment threadsrc/Services/RecaptchaService.php
Comment threadsrc/EventSubscriber/Redirect.php
Comment threadsrc/EventSubscriber/ContentTypePersister.php Outdated
Comment threadsrc/EventSubscriber/ContentTypePersister.php Outdated
Comment threadsrc/Form/ContenttypeType.php

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 38 out of 39 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment threadsrc/EventSubscriber/Redirect.php
Comment threadsrc/Event/BoltFormsEvent.php
Comment threadsrc/Event/BoltFormsEvent.php Outdated
Comment threadsrc/EventSubscriber/FileUploadHandler.php Outdated
Comment threadsrc/EventSubscriber/HoneypotSubscriber.php Outdated
Comment threadsrc/EventSubscriber/SymfonyFormProxySubscriber.php Outdated
Comment threadsrc/FormRuntime.php Outdated
@bobvandevijver
bobvandevijver merged commit 0803109 into mainDec 20, 2025
10 checks passed
@bobvandevijver
bobvandevijver deleted the bolt6 branch December 20, 2025 10:20
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@bobvandevijver@tobias-93