Skip to content

Commit

Permalink
Deprecate addValidationErrors
Browse files Browse the repository at this point in the history
  • Loading branch information
lcharette committed Jan 19, 2024
1 parent b1d64a1 commit 57f778f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ Complete refactoring of Fortress. Mostly enforcing strict types, updating PHPDoc
### Alert
- Messages are now translated at read time ([#1156](https://github.com/userfrosting/UserFrosting/pull/1156), [#811](https://github.com/userfrosting/UserFrosting/issues/811)). Messages will be translated when using `messages` and `getAndClearMessages`. `addMessage` now accept the optional placeholders, which will be stored with the alert message. `addMessageTranslated` is **deprecated**.
- Translator is not optional anymore. `setTranslator` method has been removed.
- `addValidationErrors` is deprecated (N.B.: It can't accept the new `\UserFrosting\Fortress\Validator\ServerSideValidatorInterface`)

## [5.0.0](https://github.com/userfrosting/framework/compare/4.6.1...5.0.0)
With version 5, this repo can be used as a bare bone Slim & Symfony Console application. It include the necessary routing class, [PHP-DI](https://php-di.org) as the Dependency Injection Container, a PSR EventDispatcher, etc. SprinkleManager has also been moved from Core/System Sprinkle and completely rewritten.
Expand Down
2 changes: 2 additions & 0 deletions src/Alert/AlertStream.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ public function messages(): array
* Add error messages from a ServerSideValidator object to the message stream.
*
* @param ServerSideValidator $validator
*
* @deprecated 5.1 This should be manually done in code.
*/
public function addValidationErrors(ServerSideValidator $validator): void
{
Expand Down
1 change: 1 addition & 0 deletions tests/Alert/CacheAlertStreamTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ public function testGetAndClearMessages(): void

/**
* @depends testAddMessage
* @deprecated 5.1
*/
public function testAddValidationErrors(): void
{
Expand Down
1 change: 1 addition & 0 deletions tests/Alert/SessionAlertStreamTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ public function testGetAndClearMessages(): void

/**
* @depends testAddMessage
* @deprecated 5.1
*/
public function testAddValidationErrors(): void
{
Expand Down

0 comments on commit 57f778f

Please sign in to comment.