From 148bba62b6ea8e4d2a8a34b7822e094357db607d Mon Sep 17 00:00:00 2001 From: Thomas Ferney Date: Tue, 19 May 2020 15:50:55 +0200 Subject: [PATCH 1/2] Fix route id typo --- docs/customization/controller.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/customization/controller.rst b/docs/customization/controller.rst index d5b2086419b..03977b6f527 100644 --- a/docs/customization/controller.rst +++ b/docs/customization/controller.rst @@ -203,7 +203,7 @@ If you still need the methods of the original ``HomepageController``, then copy .. code-block:: yaml - app_shop_custom_procuct: + app_shop_custom_product: path: /custom/product methods: [GET] defaults: From 3a23f93784d2b759d0e3af0ddb4117c0f813dfd4 Mon Sep 17 00:00:00 2001 From: mamazu <14860264+mamazu@users.noreply.github.com> Date: Thu, 21 May 2020 14:23:06 +0200 Subject: [PATCH 2/2] Making error messages in example factories more descriptive --- .../Bundle/CoreBundle/Fixture/Factory/AddressExampleFactory.php | 2 +- .../Bundle/CoreBundle/Fixture/Factory/ProductExampleFactory.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/AddressExampleFactory.php b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/AddressExampleFactory.php index 6eb09cb4932..9b2149b1ade 100644 --- a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/AddressExampleFactory.php +++ b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/AddressExampleFactory.php @@ -136,7 +136,7 @@ public function create(array $options = []): AddressInterface private function assertCountryCodeIsValid(string $code): void { $country = $this->countryRepository->findOneBy(['code' => $code]); - Assert::notNull($country); + Assert::notNull($country, sprintf('Trying to create address with invalid country code: "%s"', $code)); } /** diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ProductExampleFactory.php b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ProductExampleFactory.php index f4f7f6b43bb..f185f351a80 100644 --- a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ProductExampleFactory.php +++ b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ProductExampleFactory.php @@ -379,7 +379,7 @@ private function configureProductAttributeValue(string $code, string $localeCode /** @var ProductAttributeInterface|null $productAttribute */ $productAttribute = $this->productAttributeRepository->findOneBy(['code' => $code]); - Assert::notNull($productAttribute); + Assert::notNull($productAttribute, sprintf('Can not find product attribute with code: "%s"', $code)); /** @var ProductAttributeValueInterface $productAttributeValue */ $productAttributeValue = $this->productAttributeValueFactory->createNew();