Skip to content

Releases: ray-di/Ray.WebFormModule

1.0.1

18 May 15:42

Choose a tag to compare

Added

  • Ray\WebFormModule\WebFormModule — module class whose name matches the
    package and namespace. Use this in new code.

Deprecated

  • Ray\WebFormModule\AuraInputModule is now a thin subclass of
    WebFormModule kept for backwards compatibility. Existing applications
    that install new AuraInputModule() continue to work without changes,
    but should migrate to new WebFormModule().

1.0.0

18 May 07:46

Choose a tag to compare

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 previous antiCsrf=true
    boolean option on @FormValidation has been removed. CSRF checks are now
    opt-in: methods without #[CsrfProtection] perform no CSRF verification
    even if the form has an AntiCsrf object set.

    Before:

    /**
     * @FormValidation(form="contactForm", antiCsrf=true)
     */
    public function createAction() {}

    After:

    #[FormValidation(form: 'contactForm')]
    #[CsrfProtection]
    public function createAction() {}
  • BC break: AuraInputInterceptor, InputValidationInterceptor and
    VndErrorHandler no longer accept a Doctrine\Common\Annotations\Reader
    in their constructors. Validation attributes are read directly via
    ReflectionMethod::getAttributes().

  • BC break: FormInterface::input() and FormInterface::error() now declare
    parameter and return types (string $input, : string respectively).
    Implementations must update their signatures.

  • BC break: ValidationException::__construct() now declares parameter
    types (string $message, int $code, Throwable|null $e,
    FormValidationError|null $error). The $error property is now typed as
    FormValidationError|null via 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\RuntimeException now 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() and VndErrorHandler::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/annotations dependency.
  • Travis CI configuration; replaced with GitHub Actions.

0.6.0

27 May 17:35
4b6d33a

Choose a tag to compare

  • Drop php 5.x hhvm support
  • Add ToStringInterface

0.5.5

22 May 05:52

Choose a tag to compare

This release update ray/* version #20

0.5.4

22 May 04:42

Choose a tag to compare

@deprecated.

This release was failure.

0.5.3

25 Sep 11:17

Choose a tag to compare

0.5.3 Pre-release
Pre-release

This release is deprecated.

0.5.2

18 Sep 13:03

Choose a tag to compare

0.5.2 Pre-release
Pre-release

This release fix the issue for clone object initialization. #18

0.5.1

18 Sep 03:38

Choose a tag to compare

0.5.1 Pre-release
Pre-release

This release fix the issue for populating submit value. #17

0.5.0

16 Sep 03:14

Choose a tag to compare

0.5.0 Pre-release
Pre-release

This release add the feature of default ValidationFailed suffix. #16

0.4.0

15 Sep 23:20

Choose a tag to compare

0.4.0 Pre-release
Pre-release

This release support for @InputValidation annotation #15 and refactor #14.