diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5b95feb23..1532c5f1e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,9 +6,11 @@ variables: COMPOSER_HOME: $CI_PROJECT_DIR/.composer NO_PROXY: "gitlab.vtk.be" - build: stage: build + before_script: + - export PATH="/usr/bin/php7.4:$PATH" + - php -v script: - composer update --no-dev - composer install --no-dev @@ -28,9 +30,12 @@ build: .deploy: &deploy stage: deploy before_script: + - export PATH="/usr/bin/php7.4:$PATH" + - php -v - eval $(ssh-agent -s) - ssh-add <(echo $SSH_PRIVATE_KEY | base64 -d) script: + - export SENTRY_LOG_LEVEL=debug - scp -o StrictHostKeyChecking=no litus.tar.gz root@$SSH_HOSTNAME:/tmp - ssh -o StrictHostKeyChecking=no root@$SSH_HOSTNAME /usr/local/sbin/deploy.sh only: @@ -54,4 +59,3 @@ deploy_liv: environment: name: liv url: https://vtk.be - diff --git a/module/ShopBundle/Controller/ShopController.php b/module/ShopBundle/Controller/ShopController.php index c6b98d63f..4def14116 100644 --- a/module/ShopBundle/Controller/ShopController.php +++ b/module/ShopBundle/Controller/ShopController.php @@ -31,7 +31,7 @@ public function reserveproductsAction() ); } - if(!$this->saleSessionIsOpen()){ + if (!$this->saleSessionIsOpen()){ $this->flashMessenger()->error( 'Error', 'No session was found!' @@ -555,12 +555,16 @@ private function getStockEntries($salesSession) ); } - private function saleSessionIsOpen(){ + private function saleSessionIsOpen() + { $salesSessionId = $this->getSalesSessionEntity()->getId(); $openSaleSessions = $this->getSalesSessions(); - $openSaleSessionsIds = array_map(function($session) { - return $session->getId(); - }, $openSaleSessions); + $openSaleSessionsIds = array_map( + function ($session) { + return $session->getId(); + }, + $openSaleSessions + ); return in_array($salesSessionId, $openSaleSessionsIds); }