From 557831520d068a699a588271b0211072923941a2 Mon Sep 17 00:00:00 2001 From: SonataCI Date: Mon, 4 Nov 2019 02:07:17 +0100 Subject: [PATCH 1/5] DevKit updates --- .travis.yml | 12 +++++++----- .travis/install_test.sh | 6 ------ 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index 165563284..7ca20b160 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,6 +13,7 @@ php: - '7.1' - '7.2' - '7.3' + - '7.4snapshot' - nightly dist: xenial @@ -38,19 +39,20 @@ env: matrix: fast_finish: true include: - - php: '7.3' + - php: '7.4snapshot' env: TARGET=docs - - php: '7.3' + - php: '7.4snapshot' env: TARGET=lint - php: '7.1' env: COMPOSER_FLAGS="--prefer-lowest" - - php: '7.3' + - php: '7.4snapshot' env: SYMFONY=2.8.* - - php: '7.3' + - php: '7.4snapshot' env: SYMFONY='dev-master as 2.8.x-dev' - - php: '7.3' + - php: '7.4snapshot' env: SYMFONY_DEPRECATIONS_HELPER=0 allow_failures: + - php: 7.4snapshot - php: nightly - env: SYMFONY_DEPRECATIONS_HELPER=0 - env: SYMFONY='dev-master as 2.8.x-dev' diff --git a/.travis/install_test.sh b/.travis/install_test.sh index a03350093..c0794fd16 100755 --- a/.travis/install_test.sh +++ b/.travis/install_test.sh @@ -10,10 +10,4 @@ chmod u+x "${HOME}/bin/phpunit" wget https://github.com/satooshi/php-coveralls/releases/download/v1.0.1/coveralls.phar --output-document="${HOME}/bin/coveralls" chmod u+x "${HOME}/bin/coveralls" -# To be removed when these issues are resolved: -# https://github.com/composer/composer/issues/5355 -if [ "${COMPOSER_FLAGS}" = '--prefer-lowest' ]; then - composer update --prefer-dist --no-interaction --prefer-stable --quiet -fi - composer update --prefer-dist --no-interaction --prefer-stable ${COMPOSER_FLAGS} From 382b6b9d423a3a9e626da6efa97c6da9df49b2ad Mon Sep 17 00:00:00 2001 From: SonataCI Date: Tue, 5 Nov 2019 02:07:11 +0100 Subject: [PATCH 2/5] DevKit updates --- .php_cs.dist | 1 + 1 file changed, 1 insertion(+) diff --git a/.php_cs.dist b/.php_cs.dist index 9ab8b2e7e..063efb18c 100644 --- a/.php_cs.dist +++ b/.php_cs.dist @@ -37,6 +37,7 @@ $rules = [ '@PHP56Migration' => true, '@PHP56Migration:risky' => true, '@PHPUnit57Migration:risky' => true, + 'single_line_throw' => false, '@PHP70Migration' => true, '@PHP70Migration:risky' => true, '@PHPUnit60Migration:risky' => true, From 13ea24096a8b53c9518a0b081b62db5cfd6f58ba Mon Sep 17 00:00:00 2001 From: Sullivan SENECHAL Date: Tue, 5 Nov 2019 02:07:45 +0100 Subject: [PATCH 3/5] Applied fixes from FlintCI --- .../Compiler/GlobalVariableCompilerPass.php | 1 - .../DependencyInjection/SonataBasketExtension.php | 1 - src/Component/Basket/BaseBasketFactory.php | 1 - src/Component/Basket/BasketInterface.php | 3 --- src/Component/Delivery/ServiceDeliveryInterface.php | 1 - src/Component/Generator/ReferenceInterface.php | 4 ---- src/Component/Payment/BasePaypal.php | 4 ---- src/Component/Payment/Ogone/OgonePayment.php | 3 --- src/Component/Payment/PaymentHandlerInterface.php | 4 ---- src/Component/Payment/PaymentInterface.php | 2 -- src/Component/Payment/Pool.php | 1 - src/Component/Product/ProductCategoryManagerInterface.php | 1 - src/Component/Product/ProductFinderInterface.php | 3 --- src/Component/Product/ProductProviderInterface.php | 6 ------ src/Component/Transformer/BasketTransformer.php | 1 - src/Component/Transformer/InvoiceTransformer.php | 1 - .../DependencyInjection/SonataDeliveryExtension.php | 1 - src/PaymentBundle/Consumer/PaymentProcessOrderConsumer.php | 2 -- src/PaymentBundle/Entity/BaseTransaction.php | 1 - src/ProductBundle/Admin/ProductAdmin.php | 1 - src/ProductBundle/Controller/BaseProductController.php | 1 - src/ProductBundle/Controller/CollectionController.php | 1 - src/ProductBundle/Entity/ProductManager.php | 1 - src/ProductBundle/Model/BaseProductProvider.php | 6 ------ src/ProductBundle/Twig/Extension/ProductExtension.php | 4 ---- tests/Component/Basket/Payment.php | 6 ------ tests/Component/Payment/BasePaymentTest_Payment.php | 6 ------ 27 files changed, 67 deletions(-) diff --git a/src/BasketBundle/DependencyInjection/Compiler/GlobalVariableCompilerPass.php b/src/BasketBundle/DependencyInjection/Compiler/GlobalVariableCompilerPass.php index 9a77567f0..2f29e8140 100644 --- a/src/BasketBundle/DependencyInjection/Compiler/GlobalVariableCompilerPass.php +++ b/src/BasketBundle/DependencyInjection/Compiler/GlobalVariableCompilerPass.php @@ -22,7 +22,6 @@ class GlobalVariableCompilerPass implements CompilerPassInterface /** * You can modify the container here before it is dumped to PHP code. * - * * @api */ public function process(ContainerBuilder $container) diff --git a/src/BasketBundle/DependencyInjection/SonataBasketExtension.php b/src/BasketBundle/DependencyInjection/SonataBasketExtension.php index e40a6fbba..7ffd1c6f4 100644 --- a/src/BasketBundle/DependencyInjection/SonataBasketExtension.php +++ b/src/BasketBundle/DependencyInjection/SonataBasketExtension.php @@ -23,7 +23,6 @@ /** * BasketExtension. * - * * @author Thomas Rabaix */ class SonataBasketExtension extends Extension diff --git a/src/Component/Basket/BaseBasketFactory.php b/src/Component/Basket/BaseBasketFactory.php index 69dd80e82..1e5c1aad5 100644 --- a/src/Component/Basket/BaseBasketFactory.php +++ b/src/Component/Basket/BaseBasketFactory.php @@ -87,7 +87,6 @@ public function logout(Request $request, Response $response, TokenInterface $tok /** * Retrieved basket associated with $customer from session. * - * * @return BasketInterface|null */ protected function getFromSession(CustomerInterface $customer) diff --git a/src/Component/Basket/BasketInterface.php b/src/Component/Basket/BasketInterface.php index 8cad8c825..b06aaeae4 100644 --- a/src/Component/Basket/BasketInterface.php +++ b/src/Component/Basket/BasketInterface.php @@ -99,7 +99,6 @@ public function getBillingAddress(); /** * Check if the product can be added to the basket. * - * * @return bool */ public function isAddable(ProductInterface $product); @@ -142,7 +141,6 @@ public function hasBasketElements(); /** * return the BasketElement depends on the $product or the position from the element stacks. * - * * @return BasketElementInterface */ public function getElement(ProductInterface $product); @@ -232,7 +230,6 @@ public function getDeliveryVat(); /** * check if the basket contains $product. * - * * @return bool */ public function hasProduct(ProductInterface $product); diff --git a/src/Component/Delivery/ServiceDeliveryInterface.php b/src/Component/Delivery/ServiceDeliveryInterface.php index dfc38e045..2d943a4fe 100644 --- a/src/Component/Delivery/ServiceDeliveryInterface.php +++ b/src/Component/Delivery/ServiceDeliveryInterface.php @@ -63,7 +63,6 @@ public function getTotal(BasketInterface $basket, $vat = false); /** * Return the vat amount. * - * * @return float */ public function getVatAmount(BasketInterface $basket); diff --git a/src/Component/Generator/ReferenceInterface.php b/src/Component/Generator/ReferenceInterface.php index 9acf0b2ca..5f596f178 100644 --- a/src/Component/Generator/ReferenceInterface.php +++ b/src/Component/Generator/ReferenceInterface.php @@ -21,8 +21,6 @@ interface ReferenceInterface /** * Append a valid reference number to the invoice, the order must be persisted first. * - * - * * @throws \RuntimeException */ public function invoice(InvoiceInterface $invoice); @@ -30,8 +28,6 @@ public function invoice(InvoiceInterface $invoice); /** * Append a valid reference number to the order, the order must be persisted first. * - * - * * @throws \RuntimeException */ public function order(OrderInterface $order); diff --git a/src/Component/Payment/BasePaypal.php b/src/Component/Payment/BasePaypal.php index 0359ffec6..72a709197 100644 --- a/src/Component/Payment/BasePaypal.php +++ b/src/Component/Payment/BasePaypal.php @@ -65,7 +65,6 @@ public function __construct(RouterInterface $router, TranslatorInterface $transl /** * return true if the request contains a valid `check` parameter. * - * * @return bool */ public function isRequestValid(TransactionInterface $transaction) @@ -95,7 +94,6 @@ public function applyTransactionId(TransactionInterface $transaction) /** * return the order reference from the transaction object. * - * * @return string */ public function getOrderReference(TransactionInterface $transaction) @@ -193,7 +191,6 @@ public function checkPaypalFiles() /** * Encrypt paypal information using openssl with a buffer. * - * * @param $hash * * @throws \RuntimeException @@ -254,7 +251,6 @@ public function encryptViaBuffer($hash) /** * Encrypt paypal information using openssl with a temporary file. * - * * @param $hash * * @throws \RuntimeException diff --git a/src/Component/Payment/Ogone/OgonePayment.php b/src/Component/Payment/Ogone/OgonePayment.php index d2bef5ede..e44a3a8a1 100644 --- a/src/Component/Payment/Ogone/OgonePayment.php +++ b/src/Component/Payment/Ogone/OgonePayment.php @@ -189,7 +189,6 @@ public function applyTransactionId(TransactionInterface $transaction) /** * Tells if $order matches $params. * - * * @return bool */ protected function compareOrderToParams(OrderInterface $order, array $params) @@ -225,7 +224,6 @@ protected function getShaSign(array $params, $out = false) /** * Returns form parameters for sendbank. * - * * @return array */ protected function getFormParameters(OrderInterface $order) @@ -285,7 +283,6 @@ protected function generateAbsoluteUrlFromOption($optionKey, OrderInterface $ord /** * Gets formatted address lines from $order. * - * * @return string */ protected function getAddress(OrderInterface $order) diff --git a/src/Component/Payment/PaymentHandlerInterface.php b/src/Component/Payment/PaymentHandlerInterface.php index 3a32ba959..850408d52 100644 --- a/src/Component/Payment/PaymentHandlerInterface.php +++ b/src/Component/Payment/PaymentHandlerInterface.php @@ -21,7 +21,6 @@ interface PaymentHandlerInterface /** * Processes the request to generate the transaction related to the error and returns associated order. * - * * @throws \Doctrine\ORM\EntityNotFoundException * @throws InvalidTransactionException * @@ -32,7 +31,6 @@ public function handleError(Request $request, BasketInterface $basket); /** * Returns the order for given confirmation request and checks the validity. * - * * @throws \Doctrine\ORM\EntityNotFoundException * @throws InvalidTransactionException * @@ -43,7 +41,6 @@ public function handleConfirmation(Request $request); /** * Creates the order based on current basket & resets the basket. * - * * @return \Sonata\Component\Order\OrderInterface */ public function getSendbankOrder(BasketInterface $basket); @@ -51,7 +48,6 @@ public function getSendbankOrder(BasketInterface $basket); /** * Returns the callback response of current payment mean once everything validated. * - * * @return \Symfony\Component\HttpFoundation\Response */ public function getPaymentCallbackResponse(Request $request); diff --git a/src/Component/Payment/PaymentInterface.php b/src/Component/Payment/PaymentInterface.php index fd35c5b42..4b6678837 100644 --- a/src/Component/Payment/PaymentInterface.php +++ b/src/Component/Payment/PaymentInterface.php @@ -35,7 +35,6 @@ public function getCode(); * Send information to the bank, this method should handle * everything when called. * - * * @return \Symfony\Component\HttpFoundation\Response */ public function sendbank(OrderInterface $order); @@ -84,7 +83,6 @@ public function isRequestValid(TransactionInterface $transaction); /** * return true is the basket is valid for the current bank gateway. * - * * @return bool */ public function isBasketValid(BasketInterface $basket); diff --git a/src/Component/Payment/Pool.php b/src/Component/Payment/Pool.php index 9d034c8e2..2ace80953 100644 --- a/src/Component/Payment/Pool.php +++ b/src/Component/Payment/Pool.php @@ -26,7 +26,6 @@ class Pool /** * add a payment method into the pool. * - * * @throws \RuntimeException */ public function addMethod(PaymentInterface $instance) diff --git a/src/Component/Product/ProductCategoryManagerInterface.php b/src/Component/Product/ProductCategoryManagerInterface.php index 4581a35dc..5979b3f5e 100644 --- a/src/Component/Product/ProductCategoryManagerInterface.php +++ b/src/Component/Product/ProductCategoryManagerInterface.php @@ -42,7 +42,6 @@ public function getCategoryTree(); /** * Returns the number of products in $category (maxed by $limit). * - * * @return int */ public function getProductCount(CategoryInterface $category, $limit = 1000); diff --git a/src/Component/Product/ProductFinderInterface.php b/src/Component/Product/ProductFinderInterface.php index 467b302ab..fa5a58ade 100644 --- a/src/Component/Product/ProductFinderInterface.php +++ b/src/Component/Product/ProductFinderInterface.php @@ -21,7 +21,6 @@ interface ProductFinderInterface /** * Gets similar product as $product in a cross selling fashion. * - * * @return ProductInterface[] */ public function getCrossSellingSimilarProducts(ProductInterface $product); @@ -29,7 +28,6 @@ public function getCrossSellingSimilarProducts(ProductInterface $product); /** * Gets similar parent products as $product in a cross selling fashion. * - * * @return ProductInterface[] */ public function getCrossSellingSimilarParentProducts(ProductInterface $product); @@ -37,7 +35,6 @@ public function getCrossSellingSimilarParentProducts(ProductInterface $product); /** * Gets similar product as $product in an up selling fashion. * - * * @return ProductInterface[] */ public function getUpSellingSimilarProducts(ProductInterface $product); diff --git a/src/Component/Product/ProductProviderInterface.php b/src/Component/Product/ProductProviderInterface.php index 142e0a6a8..863d84c74 100644 --- a/src/Component/Product/ProductProviderInterface.php +++ b/src/Component/Product/ProductProviderInterface.php @@ -208,7 +208,6 @@ public function synchronizeVariationsPackages(ProductInterface $product, ArrayCo /** * Check if the product has variations. * - * * @return bool */ public function hasVariations(ProductInterface $product); @@ -216,7 +215,6 @@ public function hasVariations(ProductInterface $product); /** * Return true if Product has enabled variation(s). * - * * @return bool */ public function hasEnabledVariations(ProductInterface $product); @@ -224,7 +222,6 @@ public function hasEnabledVariations(ProductInterface $product); /** * Return the list of enabled product variations. * - * * @return ArrayCollection */ public function getEnabledVariations(ProductInterface $product); @@ -232,7 +229,6 @@ public function getEnabledVariations(ProductInterface $product); /** * Fetch the cheapest variation if provided/existing. * - * * @return ProductInterface|null */ public function getCheapestEnabledVariation(ProductInterface $product); @@ -256,7 +252,6 @@ public function getFilters(); /** * Gets the possible values for $fields (or variation fields if not set). * - * * @return array */ public function getVariationsChoices(ProductInterface $product, array $fields = []); @@ -264,7 +259,6 @@ public function getVariationsChoices(ProductInterface $product, array $fields = /** * Gets the properties values of $product amongst variation fields or $fields if set. * - * * @return array */ public function getVariatedProperties(ProductInterface $product, array $fields = []); diff --git a/src/Component/Transformer/BasketTransformer.php b/src/Component/Transformer/BasketTransformer.php index e967642a2..04b9e421f 100644 --- a/src/Component/Transformer/BasketTransformer.php +++ b/src/Component/Transformer/BasketTransformer.php @@ -65,7 +65,6 @@ public function __construct(OrderManagerInterface $orderManager, ProductPool $pr /** * transform a basket into order. * - * * @param \Sonata\Component\Basket\BasketInterface|null $basket * * @throws \RuntimeException diff --git a/src/Component/Transformer/InvoiceTransformer.php b/src/Component/Transformer/InvoiceTransformer.php index 564251721..24d93aca3 100644 --- a/src/Component/Transformer/InvoiceTransformer.php +++ b/src/Component/Transformer/InvoiceTransformer.php @@ -127,7 +127,6 @@ protected function addDelivery(InvoiceInterface $invoice, OrderInterface $order) /** * Creates an InvoiceElement based on an OrderElement. * - * * @return \Sonata\Component\Invoice\InvoiceElementInterface */ protected function createInvoiceElementFromOrderElement(OrderElementInterface $orderElement) diff --git a/src/DeliveryBundle/DependencyInjection/SonataDeliveryExtension.php b/src/DeliveryBundle/DependencyInjection/SonataDeliveryExtension.php index 701f677c3..c41e91e25 100644 --- a/src/DeliveryBundle/DependencyInjection/SonataDeliveryExtension.php +++ b/src/DeliveryBundle/DependencyInjection/SonataDeliveryExtension.php @@ -32,7 +32,6 @@ /** * DeliveryExtension. * - * * @author Thomas Rabaix */ class SonataDeliveryExtension extends Extension diff --git a/src/PaymentBundle/Consumer/PaymentProcessOrderConsumer.php b/src/PaymentBundle/Consumer/PaymentProcessOrderConsumer.php index f201b64bc..1b926de88 100644 --- a/src/PaymentBundle/Consumer/PaymentProcessOrderConsumer.php +++ b/src/PaymentBundle/Consumer/PaymentProcessOrderConsumer.php @@ -74,7 +74,6 @@ public function process(ConsumerEvent $event) /** * Get the related Order. * - * * @throws \RuntimeException * * @return OrderInterface @@ -95,7 +94,6 @@ protected function getOrder(ConsumerEvent $event) /** * Get the related Transaction. * - * * @throws \RuntimeException * * @return TransactionInterface diff --git a/src/PaymentBundle/Entity/BaseTransaction.php b/src/PaymentBundle/Entity/BaseTransaction.php index 577992d1d..f31a181e2 100644 --- a/src/PaymentBundle/Entity/BaseTransaction.php +++ b/src/PaymentBundle/Entity/BaseTransaction.php @@ -279,7 +279,6 @@ public function getInformation() /** * Cleans up $toDecode keys & values. * - * * @return array */ protected function cleanupEncoding(array $toDecode) diff --git a/src/ProductBundle/Admin/ProductAdmin.php b/src/ProductBundle/Admin/ProductAdmin.php index 58972ac2a..fae196cae 100644 --- a/src/ProductBundle/Admin/ProductAdmin.php +++ b/src/ProductBundle/Admin/ProductAdmin.php @@ -169,7 +169,6 @@ public function getProductPool() /** * Return the Product Provider. * - * * @return \Sonata\Component\Product\ProductProviderInterface */ public function getProductProvider(ProductInterface $product) diff --git a/src/ProductBundle/Controller/BaseProductController.php b/src/ProductBundle/Controller/BaseProductController.php index d5631c82a..df90bc591 100644 --- a/src/ProductBundle/Controller/BaseProductController.php +++ b/src/ProductBundle/Controller/BaseProductController.php @@ -66,7 +66,6 @@ public function viewAction($product) /** * Renders product properties. * - * * @return Response */ public function renderPropertiesAction(ProductInterface $product) diff --git a/src/ProductBundle/Controller/CollectionController.php b/src/ProductBundle/Controller/CollectionController.php index 87591e0d6..edf84f93f 100644 --- a/src/ProductBundle/Controller/CollectionController.php +++ b/src/ProductBundle/Controller/CollectionController.php @@ -38,7 +38,6 @@ public function indexAction() /** * Display one collection. * - * * @param $collectionId * @param $slug * diff --git a/src/ProductBundle/Entity/ProductManager.php b/src/ProductBundle/Entity/ProductManager.php index 69f26f501..cf385c900 100644 --- a/src/ProductBundle/Entity/ProductManager.php +++ b/src/ProductBundle/Entity/ProductManager.php @@ -49,7 +49,6 @@ public function findParentsInSameCollections($productCollections, $limit = null) /** * Returns partial product example (only to get its class) from $category. * - * * @return ProductInterface|null */ public function findProductForCategory(CategoryInterface $category) diff --git a/src/ProductBundle/Model/BaseProductProvider.php b/src/ProductBundle/Model/BaseProductProvider.php index 9f7303c0e..eb6117a89 100644 --- a/src/ProductBundle/Model/BaseProductProvider.php +++ b/src/ProductBundle/Model/BaseProductProvider.php @@ -863,7 +863,6 @@ public function validateFormBasketElement(ErrorElement $errorElement, BasketElem /** * Adds $basketElement related to $product to $basket. * - * * @throws \Sonata\Component\Basket\InvalidProductException * * @return bool|\Sonata\Component\Basket\BasketElementInterface @@ -902,8 +901,6 @@ public function basketAddProduct(BasketInterface $basket, ProductInterface $prod /** * Merge a product with another when the product is already present into the basket. * - * - * * @throws \RuntimeException * * @return bool|\Sonata\Component\Basket\BasketElementInterface @@ -986,7 +983,6 @@ public function calculatePrice(ProductInterface $product, CurrencyInterface $cur /** * Return true if the product can be added to the provided basket. * - * * @return bool */ public function isAddableToBasket(BasketInterface $basket, ProductInterface $product, array $options = []) @@ -997,7 +993,6 @@ public function isAddableToBasket(BasketInterface $basket, ProductInterface $pro /** * return a fresh product instance (so information are reloaded: enabled and stock ...). * - * * @return \Sonata\Component\Product\ProductInterface */ public function reloadProduct(ProductInterface $product) @@ -1102,7 +1097,6 @@ public function updateStock($product, ProductManagerInterface $productManager, $ /** * Checks $fields if specified, returns variation fields otherwise. * - * * @throws \RuntimeException * * @return array diff --git a/src/ProductBundle/Twig/Extension/ProductExtension.php b/src/ProductBundle/Twig/Extension/ProductExtension.php index 3ad023012..5264a448f 100644 --- a/src/ProductBundle/Twig/Extension/ProductExtension.php +++ b/src/ProductBundle/Twig/Extension/ProductExtension.php @@ -84,7 +84,6 @@ public function getProductProvider(ProductInterface $product) /** * Check if the product has variations. * - * * @return bool */ public function hasVariations(ProductInterface $product) @@ -95,7 +94,6 @@ public function hasVariations(ProductInterface $product) /** * Check if the product has enabled variations. * - * * @return bool */ public function hasEnabledVariations(ProductInterface $product) @@ -106,7 +104,6 @@ public function hasEnabledVariations(ProductInterface $product) /** * Return the cheapest variation of the product (or itself if none). * - * * @return ProductInterface */ public function getCheapestEnabledVariation(ProductInterface $product) @@ -121,7 +118,6 @@ public function getCheapestEnabledVariation(ProductInterface $product) /** * Return the cheapest variation price of the product (or itself if none). * - * * @return ProductInterface */ public function getCheapestEnabledVariationPrice(ProductInterface $product) diff --git a/tests/Component/Basket/Payment.php b/tests/Component/Basket/Payment.php index aa01cd575..d3d551cf3 100644 --- a/tests/Component/Basket/Payment.php +++ b/tests/Component/Basket/Payment.php @@ -57,7 +57,6 @@ public function encodeString($value) * Send information to the bank, this method should handle * everything when called. * - * * @return \Symfony\Component\HttpFoundation\Response */ public function callbank(OrderInterface $order) @@ -76,7 +75,6 @@ public function isCallbackValid(TransactionInterface $transaction) /** * Method called when an error occurs. * - * * @return \Symfony\Component\HttpFoundation\Response */ public function handleError(TransactionInterface $transaction) @@ -87,7 +85,6 @@ public function handleError(TransactionInterface $transaction) /** * Send post back confirmation to the bank when the bank callback the site. * - * * @return \Symfony\Component\HttpFoundation\Response, false otherwise */ public function sendConfirmationReceipt(TransactionInterface $transaction) @@ -100,7 +97,6 @@ public function sendConfirmationReceipt(TransactionInterface $transaction) * * WARNING : this methods does not check if the callback is valid * - * * @return bool true if all parameter are ok */ public function isRequestValid(TransactionInterface $transaction) @@ -111,7 +107,6 @@ public function isRequestValid(TransactionInterface $transaction) /** * return true is the basket is valid for the current bank gateway. * - * * @return bool */ public function isBasketValid(BasketInterface $basket) @@ -138,7 +133,6 @@ public function applyTransactionId(TransactionInterface $transaction) /** * return the order reference from the transaction. * - * * @return string */ public function getOrderReference(TransactionInterface $transaction) diff --git a/tests/Component/Payment/BasePaymentTest_Payment.php b/tests/Component/Payment/BasePaymentTest_Payment.php index a715e6617..8df0dbef0 100644 --- a/tests/Component/Payment/BasePaymentTest_Payment.php +++ b/tests/Component/Payment/BasePaymentTest_Payment.php @@ -25,7 +25,6 @@ class BasePaymentTest_Payment extends BasePayment * Send information to the bank, this method should handle * everything when called. * - * * @return \Symfony\Component\HttpFoundation\Response */ public function sendbank(OrderInterface $order) @@ -44,7 +43,6 @@ public function isCallbackValid(TransactionInterface $transaction) /** * Method called when an error occurs. * - * * @return \Symfony\Component\HttpFoundation\Response */ public function handleError(TransactionInterface $transaction) @@ -55,7 +53,6 @@ public function handleError(TransactionInterface $transaction) /** * Send post back confirmation to the bank when the bank callback the site. * - * * @return \Symfony\Component\HttpFoundation\Response, false otherwise */ public function sendConfirmationReceipt(TransactionInterface $transaction) @@ -68,7 +65,6 @@ public function sendConfirmationReceipt(TransactionInterface $transaction) * * WARNING : this methods does not check if the callback is valid * - * * @return bool true if all parameter are ok */ public function isRequestValid(TransactionInterface $transaction) @@ -79,7 +75,6 @@ public function isRequestValid(TransactionInterface $transaction) /** * return true is the basket is valid for the current bank gateway. * - * * @return bool */ public function isBasketValid(BasketInterface $basket) @@ -106,7 +101,6 @@ public function applyTransactionId(TransactionInterface $transaction) /** * return the order reference from the transaction. * - * * @return string */ public function getOrderReference(TransactionInterface $transaction) From e014f6d9f02a7da3aac3669ad92a5ae79fd5e95b Mon Sep 17 00:00:00 2001 From: SonataCI Date: Tue, 12 Nov 2019 02:07:22 +0100 Subject: [PATCH 4/5] DevKit updates --- .travis.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7ca20b160..cb8ac890d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -39,17 +39,17 @@ env: matrix: fast_finish: true include: - - php: '7.4snapshot' + - php: '7.3' env: TARGET=docs - - php: '7.4snapshot' + - php: '7.3' env: TARGET=lint - php: '7.1' env: COMPOSER_FLAGS="--prefer-lowest" - - php: '7.4snapshot' + - php: '7.3' env: SYMFONY=2.8.* - - php: '7.4snapshot' + - php: '7.3' env: SYMFONY='dev-master as 2.8.x-dev' - - php: '7.4snapshot' + - php: '7.3' env: SYMFONY_DEPRECATIONS_HELPER=0 allow_failures: - php: 7.4snapshot From db268b1170cc58c8d79f69810c014558e0bb9621 Mon Sep 17 00:00:00 2001 From: Tommy Quissens Date: Tue, 22 Jan 2019 16:05:19 +0100 Subject: [PATCH 5/5] removed use of deprecated trans function --- src/CustomerBundle/Admin/AddressAdmin.php | 8 +++---- src/CustomerBundle/Admin/CustomerAdmin.php | 6 ++--- src/InvoiceBundle/Admin/InvoiceAdmin.php | 6 ++--- src/OrderBundle/Admin/OrderAdmin.php | 22 +++++++++---------- src/OrderBundle/Admin/OrderElementAdmin.php | 2 +- src/ProductBundle/Admin/DeliveryAdmin.php | 2 +- src/ProductBundle/Admin/ProductAdmin.php | 10 ++++----- .../Admin/ProductCategoryAdmin.php | 2 +- .../Admin/ProductCollectionAdmin.php | 2 +- .../Admin/ProductVariationAdmin.php | 6 ++--- 10 files changed, 33 insertions(+), 33 deletions(-) diff --git a/src/CustomerBundle/Admin/AddressAdmin.php b/src/CustomerBundle/Admin/AddressAdmin.php index 369ad3bad..b98b60427 100644 --- a/src/CustomerBundle/Admin/AddressAdmin.php +++ b/src/CustomerBundle/Admin/AddressAdmin.php @@ -38,7 +38,7 @@ public function configure() public function configureFormFields(FormMapper $formMapper) { $formMapper - ->with($this->trans('address.form.group_contact_label', [], 'SonataCustomerBundle'), [ + ->with('address.form.group_contact_label', [ 'class' => 'col-md-7', ]) ->add('firstname') @@ -48,7 +48,7 @@ public function configureFormFields(FormMapper $formMapper) ; $formMapper - ->with($this->trans('address.form.group_advanced_label', [], 'SonataCustomerBundle'), [ + ->with('address.form.group_advanced_label', [ 'class' => 'col-md-5', ]) ->add('type', AddressTypeType::class, ['translation_domain' => 'SonataCustomerBundle']) @@ -57,14 +57,14 @@ public function configureFormFields(FormMapper $formMapper) ->end(); if (!$this->isChild()) { - $formMapper->with($this->trans('address.form.group_contact_label', [], 'SonataCustomerBundle')) + $formMapper->with('address.form.group_contact_label') ->add('customer', ModelListType::class) ->end() ; } $formMapper - ->with($this->trans('address.form.group_address_label', [], 'SonataCustomerBundle'), [ + ->with('address.form.group_address_label', [ 'class' => 'col-md-12', ]) ->add('address1') diff --git a/src/CustomerBundle/Admin/CustomerAdmin.php b/src/CustomerBundle/Admin/CustomerAdmin.php index 8f81260a5..c7e314512 100644 --- a/src/CustomerBundle/Admin/CustomerAdmin.php +++ b/src/CustomerBundle/Admin/CustomerAdmin.php @@ -126,17 +126,17 @@ protected function configureSideMenu(MenuItemInterface $menu, $action, AdminInte $id = $admin->getRequest()->get('id'); $menu->addChild( - $this->trans('customer.sidemenu.link_customer_edit', [], 'SonataCustomerBundle'), + 'customer.sidemenu.link_customer_edit', $admin->generateMenuUrl('edit', ['id' => $id]) ); $menu->addChild( - $this->trans('customer.sidemenu.link_address_list', [], 'SonataCustomerBundle'), + 'customer.sidemenu.link_address_list', $admin->generateMenuUrl('sonata.customer.admin.address.list', ['id' => $id]) ); $menu->addChild( - $this->trans('customer.sidemenu.link_order_list', [], 'SonataCustomerBundle'), + 'customer.sidemenu.link_order_list', $admin->generateMenuUrl('sonata.order.admin.order.list', ['id' => $id]) ); } diff --git a/src/InvoiceBundle/Admin/InvoiceAdmin.php b/src/InvoiceBundle/Admin/InvoiceAdmin.php index 6f0fcf801..ff46d3a76 100644 --- a/src/InvoiceBundle/Admin/InvoiceAdmin.php +++ b/src/InvoiceBundle/Admin/InvoiceAdmin.php @@ -51,21 +51,21 @@ public function configureFormFields(FormMapper $formMapper) { if (!$this->isChild()) { $formMapper - ->with($this->trans('invoice.form.group_main_label', [], $this->translationDomain)) + ->with('invoice.form.group_main_label') ->add('customer', ModelListType::class) ->end() ; } $formMapper - ->with($this->trans('invoice.form.group_main_label', [], $this->translationDomain)) + ->with('invoice.form.group_main_label') ->add('reference') ->add('currency', CurrencyFormType::class) ->add('status', InvoiceStatusType::class, ['translation_domain' => $this->translationDomain]) ->add('totalExcl') ->add('totalInc') ->end() - ->with($this->trans('invoice.form.group_billing_label', [], $this->translationDomain), ['collapsed' => true]) + ->with('invoice.form.group_billing_label', ['collapsed' => true]) ->add('name') ->add('phone') ->add('address1') diff --git a/src/OrderBundle/Admin/OrderAdmin.php b/src/OrderBundle/Admin/OrderAdmin.php index 45ecbf121..90db81fba 100644 --- a/src/OrderBundle/Admin/OrderAdmin.php +++ b/src/OrderBundle/Admin/OrderAdmin.php @@ -81,21 +81,21 @@ public function configureFormFields(FormMapper $formMapper) { // define group zoning $formMapper - ->with($this->trans('order.form.group_main_label'), ['class' => 'col-md-12'])->end() - ->with($this->trans('order.form.group_billing_label'), ['class' => 'col-md-6'])->end() - ->with($this->trans('order.form.group_shipping_label'), ['class' => 'col-md-6'])->end() + ->with('order.form.group_main_label', ['class' => 'col-md-12'])->end() + ->with('order.form.group_billing_label', ['class' => 'col-md-6'])->end() + ->with('order.form.group_shipping_label', ['class' => 'col-md-6'])->end() ; if (!$this->isChild()) { $formMapper - ->with($this->trans('order.form.group_main_label', [], 'SonataOrderBundle')) + ->with('order.form.group_main_label') ->add('customer', ModelListType::class) ->end() ; } $formMapper - ->with($this->trans('order.form.group_main_label', [], 'SonataOrderBundle')) + ->with('order.form.group_main_label') ->add('currency', CurrencyFormType::class) ->add('locale', LocaleType::class) ->add('status', OrderStatusType::class, ['translation_domain' => 'SonataOrderBundle']) @@ -103,7 +103,7 @@ public function configureFormFields(FormMapper $formMapper) ->add('deliveryStatus', ProductDeliveryStatusType::class, ['translation_domain' => 'SonataDeliveryBundle']) ->add('validatedAt', DatePickerType::class, ['dp_side_by_side' => true]) ->end() - ->with($this->trans('order.form.group_billing_label', [], 'SonataOrderBundle'), ['collapsed' => true]) + ->with('order.form.group_billing_label', ['collapsed' => true]) ->add('billingName') ->add('billingAddress1') ->add('billingAddress2') @@ -115,7 +115,7 @@ public function configureFormFields(FormMapper $formMapper) ->add('billingEmail') ->add('billingMobile') ->end() - ->with($this->trans('order.form.group_shipping_label', [], 'SonataOrderBundle'), ['collapsed' => true]) + ->with('order.form.group_shipping_label', ['collapsed' => true]) ->add('shippingName') ->add('shippingAddress1') ->add('shippingAddress2') @@ -202,12 +202,12 @@ protected function configureSideMenu(MenuItemInterface $menu, $action, AdminInte $id = $admin->getRequest()->get('id'); $menu->addChild( - $this->trans('sonata.order.sidemenu.link_order_edit', [], 'SonataOrderBundle'), + 'sonata.order.sidemenu.link_order_edit', ['uri' => $admin->generateUrl('edit', ['id' => $id])] ); $menu->addChild( - $this->trans('sonata.order.sidemenu.link_order_elements_list', [], 'SonataOrderBundle'), + 'sonata.order.sidemenu.link_order_elements_list', ['uri' => $admin->generateUrl('sonata.order.admin.order_element.list', ['id' => $id])] ); @@ -216,12 +216,12 @@ protected function configureSideMenu(MenuItemInterface $menu, $action, AdminInte if (null === $invoice) { $menu->addChild( - $this->trans('sonata.order.sidemenu.link_oRDER_TO_INVOICE_generate', [], 'SonataOrderBundle'), + 'sonata.order.sidemenu.link_oRDER_TO_INVOICE_generate', ['uri' => $admin->generateUrl('generateInvoice', ['id' => $id])] ); } else { $menu->addChild( - $this->trans('sonata.order.sidemenu.link_oRDER_TO_INVOICE_edit', [], 'SonataOrderBundle'), + 'sonata.order.sidemenu.link_oRDER_TO_INVOICE_edit', ['uri' => $this->getConfigurationPool()->getAdminByAdminCode('sonata.invoice.admin.invoice')->generateUrl('edit', ['id' => $invoice->getId()])] ); } diff --git a/src/OrderBundle/Admin/OrderElementAdmin.php b/src/OrderBundle/Admin/OrderElementAdmin.php index 72f8f2999..759ca8ccf 100644 --- a/src/OrderBundle/Admin/OrderElementAdmin.php +++ b/src/OrderBundle/Admin/OrderElementAdmin.php @@ -70,7 +70,7 @@ public function configureFormFields(FormMapper $formMapper) } $formMapper - ->with($this->trans('order_element.form.group_main_label', [], 'SonataOrderBundle')) + ->with('order_element.form.group_main_label') ->add('productType', ChoiceType::class, $productTypeOptions) ->add('quantity') ->add('price') diff --git a/src/ProductBundle/Admin/DeliveryAdmin.php b/src/ProductBundle/Admin/DeliveryAdmin.php index 88ecdf840..a1b8a2e51 100644 --- a/src/ProductBundle/Admin/DeliveryAdmin.php +++ b/src/ProductBundle/Admin/DeliveryAdmin.php @@ -85,7 +85,7 @@ protected function configureSideMenu(MenuItemInterface $menu, $action, AdminInte $id = $admin->getRequest()->get('id'); $menu->addChild( - $this->trans('product.sidemenu.link_product_edit', [], 'SonataProductBundle'), + 'product.sidemenu.link_product_edit', ['uri' => $admin->generateUrl('edit', ['id' => $id])] ); } diff --git a/src/ProductBundle/Admin/ProductAdmin.php b/src/ProductBundle/Admin/ProductAdmin.php index fae196cae..893f9cd19 100644 --- a/src/ProductBundle/Admin/ProductAdmin.php +++ b/src/ProductBundle/Admin/ProductAdmin.php @@ -229,28 +229,28 @@ protected function configureSideMenu(MenuItemInterface $menu, $action, AdminInte $product = $this->getObject($id); $menu->addChild( - $this->trans('product.sidemenu.link_product_edit', [], 'SonataProductBundle'), + 'product.sidemenu.link_product_edit', ['uri' => $admin->generateUrl('edit', ['id' => $id])] ); $menu->addChild( - $this->trans('product.sidemenu.view_categories', [], 'SonataProductBundle'), + 'product.sidemenu.view_categories', ['uri' => $admin->generateUrl('sonata.product.admin.product.category.list', ['id' => $id])] ); $menu->addChild( - $this->trans('product.sidemenu.view_collections', [], 'SonataProductBundle'), + 'product.sidemenu.view_collections', ['uri' => $admin->generateUrl('sonata.product.admin.product.collection.list', ['id' => $id])] ); $menu->addChild( - $this->trans('product.sidemenu.view_deliveries', [], 'SonataProductBundle'), + 'product.sidemenu.view_deliveries', ['uri' => $admin->generateUrl('sonata.product.admin.delivery.list', ['id' => $id])] ); if (!$product->isVariation() && 'sonata.product.admin.product' === $this->getCode()) { $menu->addChild( - $this->trans('product.sidemenu.view_variations'), + 'product.sidemenu.view_variations', ['uri' => $admin->generateUrl('sonata.product.admin.product.variation.list', ['id' => $id])] ); } diff --git a/src/ProductBundle/Admin/ProductCategoryAdmin.php b/src/ProductBundle/Admin/ProductCategoryAdmin.php index 4ea53b7b8..188b63dbb 100644 --- a/src/ProductBundle/Admin/ProductCategoryAdmin.php +++ b/src/ProductBundle/Admin/ProductCategoryAdmin.php @@ -92,7 +92,7 @@ protected function configureSideMenu(MenuItemInterface $menu, $action, AdminInte $id = $admin->getRequest()->get('id'); $menu->addChild( - $this->trans('product.sidemenu.link_product_edit', [], 'SonataProductBundle'), + 'product.sidemenu.link_product_edit', ['uri' => $admin->generateUrl('edit', ['id' => $id])] ); } diff --git a/src/ProductBundle/Admin/ProductCollectionAdmin.php b/src/ProductBundle/Admin/ProductCollectionAdmin.php index 0fa89d1ed..41595d4d9 100644 --- a/src/ProductBundle/Admin/ProductCollectionAdmin.php +++ b/src/ProductBundle/Admin/ProductCollectionAdmin.php @@ -91,7 +91,7 @@ protected function configureSideMenu(MenuItemInterface $menu, $action, AdminInte $id = $admin->getRequest()->get('id'); $menu->addChild( - $this->trans('product.sidemenu.link_product_edit', [], 'SonataProductBundle'), + 'product.sidemenu.link_product_edit', ['uri' => $admin->generateUrl('edit', ['id' => $id])] ); } diff --git a/src/ProductBundle/Admin/ProductVariationAdmin.php b/src/ProductBundle/Admin/ProductVariationAdmin.php index 519353bcb..e930a7138 100644 --- a/src/ProductBundle/Admin/ProductVariationAdmin.php +++ b/src/ProductBundle/Admin/ProductVariationAdmin.php @@ -103,18 +103,18 @@ protected function configureSideMenu(MenuItemInterface $menu, $action, AdminInte $product = $this->getObject($id); $menu->addChild( - $this->trans('product.sidemenu.link_product_edit', [], 'SonataProductBundle'), + 'product.sidemenu.link_product_edit', ['uri' => $admin->generateUrl('edit', ['id' => $id])] ); if (!$product->isVariation() && 'sonata.product.admin.product' === $this->getCode()) { $menu->addChild( - $this->trans('product.sidemenu.link_add_variation', [], 'SonataProductBundle'), + 'product.sidemenu.link_add_variation', ['uri' => $admin->generateUrl('sonata.product.admin.product.variation.create', ['id' => $id])] ); $menu->addChild( - $this->trans('product.sidemenu.view_variations'), + 'product.sidemenu.view_variations', ['uri' => $admin->generateUrl('sonata.product.admin.product.variation.list', ['id' => $id])] ); }