Skip to content

Conversation

@bobvandevijver
Copy link
Member

No description provided.

Copilot AI review requested due to automatic review settings December 18, 2025 22:15
Copy link

Copilot AI left a comment

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

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

Copy link

Copilot AI left a comment

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.

@bobvandevijver bobvandevijver merged commit 0803109 into main Dec 20, 2025
10 checks passed
@bobvandevijver bobvandevijver deleted the bolt6 branch December 20, 2025 10:20
Sign up for free to 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