Skip to content

Commit 9200491

Browse files
committed
Merge branch '7.0' into 7.1
* 7.0: [Doctrine] Update doctrine.rst
2 parents 9aa7d5b + 7700c58 commit 9200491

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

doctrine.rst

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -449,12 +449,8 @@ Consider the following controller code::
449449
public function createProduct(ValidatorInterface $validator): Response
450450
{
451451
$product = new Product();
452-
// This will trigger an error: the column isn't nullable in the database
453-
$product->setName(null);
454-
// This will trigger a type mismatch error: an integer is expected
455-
$product->setPrice('1999');
456452

457-
// ...
453+
// ... update the product data somehow (e.g. with a form) ...
458454

459455
$errors = $validator->validate($product);
460456
if (count($errors) > 0) {

0 commit comments

Comments
 (0)