-
Notifications
You must be signed in to change notification settings - Fork 27
Upgrade for Bolt 6 #126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade for Bolt 6 #126
Conversation
There was a problem hiding this 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.
326993c to
15d94b1
Compare
There was a problem hiding this 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.
901a549 to
b56d634
Compare
No description provided.