Skip to content

Releases: icehawk/forms

Version 2.0.0-beta3

03 Feb 13:08
v2.0.0-beta3
1fad3c8
Compare
Choose a tag to compare

CHANGELOG

All notable changes to this project will be documented in this file. This project adheres
to Semantic Versioning and Keep a CHANGELOG.

2.0.0 - YYYY-MM-DD

  • Switched from Vagrant to docker-compose development environment, see Contribution Guide
  • Add method FormIdInterface#equals( FormIdInterface $other ) : bool in order to compare form ID instances with each other

Backwards incompatible changes (BC breaks)

  • The library requires at least PHP version 8.0.0 or higher

  • The class IceHawk\Forms\Form has been declared final

  • The class IceHawk\Forms\Feedback has been moved to IceHawk\Forms\Feedbacks\Feedback

  • Common object constructors have been replaced by named constructors. All __construct methods have be
    declared final private.

  • Parameter and return type declarations have been added to all methods, if possible.

Old New
new Form( new FormId('myFormId') ) Form::new( FormId::new('myFormId') )
new Token() Token::new()
(new Token())->expiresIn( 2 ) Token::newWithExpiry(2)
new Feedback('Message') Feedback::new('key', 'Message', 'severity')
  • All interfaces have been renamed and aligned with the implementation were needed
Old New
IceHawk\Forms\Identifies [removed]
IceHawk\Forms\IdentifiesForm IceHawk\Forms\FormIdInteface
IceHawk\Forms\IdentifiesFormRequestSource IceHawk\Forms\TokenInterface
IceHawk\Forms\ProvidesFeedback IceHawk\Forms\FeedbackInterface
[new] IceHawk\Forms\FeedbackCollectionInterface
IceHawk\Forms\ProvidesFormData IceHawk\Forms\FormInterface
  • The \Stringable interface was explicitly added to

    • IceHawk\Forms\Interfaces\FormIdInterface
    • IceHawk\Forms\Interfaces\TokenInterface
  • The exception IceHawk\Forms\Exceptions\InvalidFormIdException has been added.

  • The suffix Exception has been added to all exception class names.

Old New
IceHawk\Forms\Exceptions\FormsException [removed]
[new] IceHawk\Forms\Exceptions\InvalidFormIdException
IceHawk\Forms\Exceptions\InvalidExpiryInterval IceHawk\Forms\Exceptions\InvalidExpiryIntervalException
IceHawk\Forms\Exceptions\InvalidTokenString IceHawk\Forms\Exceptions\InvalidTokenStringException
IceHawk\Forms\Exceptions\TokenHasExpired IceHawk\Forms\Exceptions\TokenHasExpiredException
IceHawk\Forms\Exceptions\TokenMismatch IceHawk\Forms\Exceptions\TokenMismatchException
  • The base exception IceHawk\Forms\Exceptions\FormsException has been removed.
    All exceptions extend apropriate SPL exceptions now.
Library exception extends SPL exception
IceHawk\Forms\Exceptions\InvalidFormIdException \InvalidArgumentException
IceHawk\Forms\Exceptions\InvalidExpiryIntervalException \InvalidArgumentException
IceHawk\Forms\Exceptions\InvalidTokenStringException \InvalidArgumentException
IceHawk\Forms\Exceptions\TokenHasExpiredException \RuntimeException
IceHawk\Forms\Exceptions\TokenMismatchException \RuntimeException
  • The value of a FormId instance can no longer be an empty string. This will throw
    an IceHawk\Forms\Exceptions\InvalidFormIdException now.

  • All form feedbacks are represented by a new collection class IceHawk\Forms\Feedbacks\Feedbacks. Therefor some
    feedback related methods have been moved from the Form class to the Feedback collection.

Old New
$form->hasFeedback( 'some-key' ) $form->getFeedbacks()->has( 'some-key' )
$form->getFeedback( 'some-key' ) : FeedbackInterface $form->getFeedbacks()->get( 'some-key' ) : FeedbackCollectionInterface
$form->getFeedbacks( ...some filter... ) : array $form->getFeedbacks()->filter(...some filter...): FeedbackCollectionInterface
  • The string key related to a feedback is now part of the feedback itself:
Old New
$form->addFeedback('some-key', new Feedback('Message')) $form->addFeedbacks(Feedback::new('some-key', 'Message', 'severity'))
$form->addFeedbacks(['some-key' => new Feedback('Message'), ...]) $form->addFeedbacks(Feedback::new('some-key', 'Message', 'severity'), ...)
  • The method Form#addFeedbacks() now expects a variadic number of Feedback instances (at least one), instead of an
    assoc array with Feedback instances.
public function addFeedbacks(FeedbackInterface $feedback, FeedbackInterface ...$feedbacks) : void
  • It is possible to add more than one feedback for a specific key now.
use IceHawk\Forms\Feedbacks\Feedback;use IceHawk\Forms\Form;
use IceHawk\Forms\FormId;

$form = Form::new(FormId::new('myFormId'));
$form->addFeedbacks(
    Feedback::new('some-key', 'Message 1', 'low'),
    Feedback::new('some-key', 'Message 2', 'high'),
    Feedback::new('another-key', 'Message 3', 'normal'),
);

1.0.0 - 2016-10-07

  • First stable release

Version 2.0.0-beta2

28 Jan 12:36
a494ea5
Compare
Choose a tag to compare
Version 2.0.0-beta2 Pre-release
Pre-release

CHANGELOG

All notable changes to this project will be documented in this file. This project adheres
to Semantic Versioning and Keep a CHANGELOG.

2.0.0 - YYYY-MM-DD

Backwards incompatible changes (BC breaks)

  • The library requires at least PHP version 8.0.0 or higher

  • The class IceHawk\Forms\Form has been declared final

  • The class IceHawk\Forms\Feedback has been moved to IceHawk\Forms\Feedbacks\Feedback

  • Common object constructors have been replaced by named constructors. All __construct methods have be
    declared final private.

  • Parameter and return type declarations have been added to all methods, if possible.

Old New
new Form( new FormId('myFormId') ) Form::new( FormId::new('myFormId') )
new Token() Token::new()
(new Token())->expiresIn( 2 ) Token::newWithExpiry(2)
new Feedback('Message') Feedback::new('key', 'Message', 'severity')
  • All interfaces have been renamed and aligned with the implementation were needed
Old New
IceHawk\Forms\Identifies [removed]
IceHawk\Forms\IdentifiesForm IceHawk\Forms\FormIdInteface
IceHawk\Forms\IdentifiesFormRequestSource IceHawk\Forms\TokenInterface
IceHawk\Forms\ProvidesFeedback IceHawk\Forms\FeedbackInterface
[new] IceHawk\Forms\FeedbackCollectionInterface
IceHawk\Forms\ProvidesFormData IceHawk\Forms\FormInterface
  • The \Stringable interface was explicitly added to

    • IceHawk\Forms\Interfaces\FormIdInterface
    • IceHawk\Forms\Interfaces\TokenInterface
  • The exception IceHawk\Forms\Exceptions\InvalidFormIdException has been added.

  • The suffix Exception has been added to all exception class names.

Old New
IceHawk\Forms\Exceptions\FormsException [removed]
[new] IceHawk\Forms\Exceptions\InvalidFormIdException
IceHawk\Forms\Exceptions\InvalidExpiryInterval IceHawk\Forms\Exceptions\InvalidExpiryIntervalException
IceHawk\Forms\Exceptions\InvalidTokenString IceHawk\Forms\Exceptions\InvalidTokenStringException
IceHawk\Forms\Exceptions\TokenHasExpired IceHawk\Forms\Exceptions\TokenHasExpiredException
IceHawk\Forms\Exceptions\TokenMismatch IceHawk\Forms\Exceptions\TokenMismatchException
  • The base exception IceHawk\Forms\Exceptions\FormsException has been removed.
    All exceptions extend apropriate SPL exceptions now.
Library exception extends SPL exception
IceHawk\Forms\Exceptions\InvalidFormIdException \InvalidArgumentException
IceHawk\Forms\Exceptions\InvalidExpiryIntervalException \InvalidArgumentException
IceHawk\Forms\Exceptions\InvalidTokenStringException \InvalidArgumentException
IceHawk\Forms\Exceptions\TokenHasExpiredException \RuntimeException
IceHawk\Forms\Exceptions\TokenMismatchException \RuntimeException
  • The value of a FormId instance can no longer be an empty string. This will throw
    an IceHawk\Forms\Exceptions\InvalidFormIdException now.

  • All form feedbacks are represented by a new collection class IceHawk\Forms\Feedbacks\Feedbacks. Therefor some
    feedback related methods have been moved from the Form class to the Feedback collection.

Old New
$form->hasFeedback( 'some-key' ) $form->getFeedbacks()->has( 'some-key' )
$form->getFeedback( 'some-key' ) : FeedbackInterface $form->getFeedbacks()->get( 'some-key' ) : FeedbackCollectionInterface
$form->getFeedbacks( ...some filter... ) : array $form->getFeedbacks()->filter(...some filter...): FeedbackCollectionInterface
  • The string key related to a feedback is now part of the feedback itself:
Old New
$form->addFeedback('some-key', new Feedback('Message')) $form->addFeedbacks(Feedback::new('some-key', 'Message', 'severity'))
$form->addFeedbacks(['some-key' => new Feedback('Message'), ...]) $form->addFeedbacks(Feedback::new('some-key', 'Message', 'severity'), ...)
  • The method Form#addFeedbacks() now expects a variadic number of Feedback instances (at least one), instead of an
    assoc array with Feedback instances.
public function addFeedbacks(FeedbackInterface $feedback, FeedbackInterface ...$feedbacks) : void
  • It is possible to add more than one feedback for a specific key now.
use IceHawk\Forms\Feedbacks\Feedback;use IceHawk\Forms\Form;
use IceHawk\Forms\FormId;

$form = Form::new(FormId::new('myFormId'));
$form->addFeedbacks(
    Feedback::new('some-key', 'Message 1', 'low'),
    Feedback::new('some-key', 'Message 2', 'high'),
    Feedback::new('another-key', 'Message 3', 'normal'),
);

1.0.0 - 2016-10-07

  • First stable release

Version 2.0.0-beta1

27 Jan 16:06
c2c2e49
Compare
Choose a tag to compare
Version 2.0.0-beta1 Pre-release
Pre-release

CHANGELOG

All notable changes to this project will be documented in this file. This project adheres
to Semantic Versioning and Keep a CHANGELOG.

[2.0.0] - YYYY-MM-DD

Backwards incompatible changes (BC breaks)

  • The library requires at least PHP version 8.0.0 or higher

  • The class IceHawk\Forms\Form has been declared final

  • The class IceHawk\Forms\Feedback has been moved to IceHawk\Forms\Feedbacks\Feedback

  • Common object constructors have been replaced by named constructors. All __construct methods have be
    declared final private.

  • Parameter and return type declarations have been added to all methods, if possible.

Old New
new Form( new FormId('myFormId') ) Form::new( FormId::new('myFormId') )
new Token() Token::new()
(new Token())->expiresIn( 2 ) Token::newWithExpiry(2)
new Feedback('Message') Feedback::new('key', 'Message', 'severity')
  • All interfaces have been renamed and aligned with the implementation were needed
Old New
IceHawk\Forms\Identifies [removed]
IceHawk\Forms\IdentifiesForm IceHawk\Forms\FormIdInteface
IceHawk\Forms\IdentifiesFormRequestSource IceHawk\Forms\TokenInterface
IceHawk\Forms\ProvidesFeedback IceHawk\Forms\FeedbackInterface
[new] IceHawk\Forms\FeedbackCollectionInterface
IceHawk\Forms\ProvidesFormData IceHawk\Forms\FormInterface
  • The \Stringable interface was explicitly added to

    • IceHawk\Forms\Interfaces\FormIdInterface
    • IceHawk\Forms\Interfaces\TokenInterface
  • The exception IceHawk\Forms\Exceptions\InvalidFormIdException has been added.

  • The suffix Exception has been added to all exception class names.

Old New
IceHawk\Forms\Exceptions\FormsException [removed]
[new] IceHawk\Forms\Exceptions\InvalidFormIdException
IceHawk\Forms\Exceptions\InvalidExpiryInterval IceHawk\Forms\Exceptions\InvalidExpiryIntervalException
IceHawk\Forms\Exceptions\InvalidTokenString IceHawk\Forms\Exceptions\InvalidTokenStringException
IceHawk\Forms\Exceptions\TokenHasExpired IceHawk\Forms\Exceptions\TokenHasExpiredException
IceHawk\Forms\Exceptions\TokenMismatch IceHawk\Forms\Exceptions\TokenMismatchException
  • The base exception IceHawk\Forms\Exceptions\FormsException has been removed.
    All exceptions extend apropriate SPL exceptions now.
Library exception extends SPL exception
IceHawk\Forms\Exceptions\InvalidFormIdException \InvalidArgumentException
IceHawk\Forms\Exceptions\InvalidExpiryIntervalException \InvalidArgumentException
IceHawk\Forms\Exceptions\InvalidTokenStringException \InvalidArgumentException
IceHawk\Forms\Exceptions\TokenHasExpiredException \RuntimeException
IceHawk\Forms\Exceptions\TokenMismatchException \RuntimeException
  • The value of a FormId instance can no longer be an empty string. This will throw
    an IceHawk\Forms\Exceptions\InvalidFormIdException now.

  • All form feedbacks are represented by a new collection class IceHawk\Forms\Feedbacks\Feedbacks. Therefor some
    feedback related methods have been moved from the Form class to the Feedback collection.

Old New
$form->hasFeedback( 'some-key' ) $form->getFeedbacks()->has( 'some-key' )
$form->getFeedback( 'some-key' ) : FeedbackInterface $form->getFeedbacks()->get( 'some-key' ) : FeedbackCollectionInterface
$form->getFeedbacks( ...some filter... ) : array $form->getFeedbacks()->filter(...some filter...): FeedbackCollectionInterface
  • The string key related to a feedback is now part of the feedback itself:
Old New
$form->addFeedback('some-key', new Feedback('Message')) $form->addFeedbacks(Feedback::new('some-key', 'Message', 'severity'))
$form->addFeedbacks(['some-key' => new Feedback('Message'), ...]) $form->addFeedbacks(Feedback::new('some-key', 'Message', 'severity'), ...)
  • The method Form#addFeedbacks() now expects a variadic number of Feedback instances (at least one), instead of an
    assoc array with Feedback instances.
public function addFeedbacks(FeedbackInterface $feedback, FeedbackInterface ...$feedbacks) : void
  • It is possible to add more than one feedback for a specific key now.
use IceHawk\Forms\Feedbacks\Feedback;use IceHawk\Forms\Form;
use IceHawk\Forms\FormId;

$form = Form::new(FormId::new('myFormId'));
$form->addFeedbacks(
    Feedback::new('some-key', 'Message 1', 'low'),
    Feedback::new('some-key', 'Message 2', 'high'),
    Feedback::new('another-key', 'Message 3', 'normal'),
);

1.0.0 - 2016-10-07

  • First stable release

1.0 Major release

06 Oct 22:43
v1.0.0
Compare
Choose a tag to compare

First stable release

1.0 Release Candidate 3

21 Aug 14:13
v1.0.0-rc3
Compare
Choose a tag to compare
Pre-release
v1.0.0-rc3

Release Candidate 3 of v1.0.0

1.0 Release Candidate 2

20 Aug 18:54
v1.0.0-rc2
Compare
Choose a tag to compare
Pre-release
v1.0.0-rc2

Release Condidate 2 of v1.0.0

1.0 Release candidate 1

09 Jul 14:24
v1.0.0-rc1
Compare
Choose a tag to compare
Pre-release
v1.0.0-rc1

1.0 Release candidate 1