Releases: ray-di/Ray.WebFormModule
1.0.1
Added
Ray\WebFormModule\WebFormModule— module class whose name matches the
package and namespace. Use this in new code.
Deprecated
Ray\WebFormModule\AuraInputModuleis now a thin subclass of
WebFormModulekept for backwards compatibility. Existing applications
that installnew AuraInputModule()continue to work without changes,
but should migrate tonew WebFormModule().
1.0.0
Changed
-
Minimum PHP version raised to
8.0. -
BC break: Migrated from Doctrine Annotations to PHP 8 Attributes. All
validation metadata (@FormValidation,@InputValidation,@VndError) is
now expressed with#[FormValidation],#[InputValidation],#[VndError]. -
BC break: CSRF protection for validation methods is now declared with
the separate#[CsrfProtection]attribute. The previousantiCsrf=true
boolean option on@FormValidationhas been removed. CSRF checks are now
opt-in: methods without#[CsrfProtection]perform no CSRF verification
even if the form has anAntiCsrfobject set.Before:
/** * @FormValidation(form="contactForm", antiCsrf=true) */ public function createAction() {}
After:
#[FormValidation(form: 'contactForm')] #[CsrfProtection] public function createAction() {}
-
BC break:
AuraInputInterceptor,InputValidationInterceptorand
VndErrorHandlerno longer accept aDoctrine\Common\Annotations\Reader
in their constructors. Validation attributes are read directly via
ReflectionMethod::getAttributes(). -
BC break:
FormInterface::input()andFormInterface::error()now declare
parameter and return types (string $input,: stringrespectively).
Implementations must update their signatures. -
BC break:
ValidationException::__construct()now declares parameter
types (string $message,int $code,Throwable|null $e,
FormValidationError|null $error). The$errorproperty is now typed as
FormValidationError|nullvia constructor property promotion. -
Added property type declarations and return types across the codebase to
align with PHP 8 typing. -
Bumped dependencies:
ray/di^2.16,ray/aop^2.14,
phpunit/phpunit^9.5.
Fixed
Exception\RuntimeExceptionnow correctly extends\RuntimeException
instead of\LogicException.AntiCsrf::isValid()uses strict comparison for the CSRF token.- Eliminated PHP 8.4 deprecation warnings for implicit nullable parameters in
ValidationException::__construct()andVndErrorHandler::makeVndError().
Added
- GitHub Actions workflows for tests and coding standards.
CHANGELOG.md.#[CsrfProtection]attribute for composing CSRF checks with form/input
validation attributes.
Removed
doctrine/annotationsdependency.- Travis CI configuration; replaced with GitHub Actions.
0.6.0
0.5.5
0.5.4
This release was failure.