Skip to content

Commit e17f509

Browse files
authoredJun 1, 2022
Merge pull request #327 from norkunas/fix-deprecation
Fix Symfony 6.1 deprecation for Address validator constraint
2 parents 133ec10 + 163cfe3 commit e17f509

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed
 

‎CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,16 @@
22

33
The changelog describes what have been "Added", "Changed", "Removed" or "Fixed" between versions.
44

5+
## Version 5.16.3
6+
7+
### Changed
8+
9+
- Deprecate `Address::$errorNames` in favour of `Address::ERROR_NAMES`.
10+
511
## Version 5.16.2
612

13+
### Fixed
14+
715
- Fix deprecations with Symfony 6.1
816

917
## Version 5.16.1

‎Validator/Constraint/Address.php

+11-2
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,20 @@ class Address extends Constraint
2525
{
2626
public const INVALID_ADDRESS_ERROR = '2243aa07-2ea7-4eb7-962c-6a9586593f2c';
2727

28-
/** @var string[] */
29-
protected static $errorNames = [
28+
/**
29+
* @var string[]
30+
*/
31+
protected const ERROR_NAMES = [
3032
self::INVALID_ADDRESS_ERROR => 'INVALID_ADDRESS_ERROR',
3133
];
3234

35+
/**
36+
* @var string[]
37+
*
38+
* @deprecated since BazingaGeocoderBundle 5.16, use const ERROR_NAMES instead
39+
*/
40+
protected static $errorNames = self::ERROR_NAMES;
41+
3342
/**
3443
* @var string
3544
*/

0 commit comments

Comments
 (0)
Please sign in to comment.