File tree Expand file tree Collapse file tree 1 file changed +35
-15
lines changed
src/Validator/Constraints Expand file tree Collapse file tree 1 file changed +35
-15
lines changed Original file line number Diff line number Diff line change 22
33namespace Sherlockode \SyliusFAQPlugin \Validator \Constraints ;
44
5+ use Symfony \Component \HttpKernel \Kernel ;
56use Symfony \Component \Validator \Constraints \Length as BaseLength ;
67use Symfony \Component \Validator \Constraints \LengthValidator ;
78
@@ -13,6 +14,7 @@ public function __construct(
1314 int $ max = null ,
1415 string $ charset = null ,
1516 callable $ normalizer = null ,
17+ string $ countUnit = null ,
1618 string $ exactMessage = null ,
1719 string $ minMessage = null ,
1820 string $ maxMessage = null ,
@@ -27,21 +29,39 @@ public function __construct(
2729 return strip_tags (trim ($ str ));
2830 };
2931 }
30-
31- parent ::__construct (
32- $ exactly ,
33- $ min ,
34- $ max ,
35- $ charset ,
36- $ normalizer ,
37- $ exactMessage ,
38- $ minMessage ,
39- $ maxMessage ,
40- $ charsetMessage ,
41- $ groups ,
42- $ payload ,
43- $ options
44- );
32+
33+ if (Kernel::VERSION_ID >= 60300 ) {
34+ parent ::__construct (
35+ $ exactly ,
36+ $ min ,
37+ $ max ,
38+ $ charset ,
39+ $ normalizer ,
40+ $ countUnit ,
41+ $ exactMessage ,
42+ $ minMessage ,
43+ $ maxMessage ,
44+ $ charsetMessage ,
45+ $ groups ,
46+ $ payload ,
47+ $ options
48+ );
49+ } else {
50+ parent ::__construct (
51+ $ exactly ,
52+ $ min ,
53+ $ max ,
54+ $ charset ,
55+ $ normalizer ,
56+ $ exactMessage ,
57+ $ minMessage ,
58+ $ maxMessage ,
59+ $ charsetMessage ,
60+ $ groups ,
61+ $ payload ,
62+ $ options
63+ );
64+ }
4565 }
4666
4767 /**
You can’t perform that action at this time.
0 commit comments