Commit 38614c8
committed
Make Page::reference nullable to route null through NotBlank validation
Symfony 8.2 improved how null-for-typed-string is handled during
deserialization: instead of a raw TypeError message, it now produces
a proper validation violation. Rather than rely on Symfony's internal
error message (which changed between 8.1 and 8.2), make the reference
column nullable at both the PHP and ORM level so null is accepted during
deserialization and our explicit NotBlank constraint fires consistently
across all Symfony versions.
The "incorrect data types" scenario (which tested the raw TypeError text)
is replaced by a null-reference example in the existing violations outline,
testing against our own "Please enter a reference." message.1 parent f9a2143 commit 38614c8
2 files changed
Lines changed: 3 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
| 105 | + | |
105 | 106 | | |
106 | 107 | | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | 108 | | |
121 | 109 | | |
122 | 110 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| |||
0 commit comments