Merge branch 'Xbird/FixDocker' into 'main'

Fix commands + return composer install in docker build

See merge request gamexperience/vision!45
This commit is contained in:
Xbird
2022-09-24 17:37:04 +00:00
5 changed files with 8 additions and 7 deletions

View File

@@ -23,7 +23,8 @@ RUN chown -R www-data:www-data /var/www
USER www-data USER www-data
RUN cd /var/www RUN cd /var/www && \
composer install
WORKDIR /var/www/ WORKDIR /var/www/
ENTRYPOINT ["bash", "./docker/docker.sh"] ENTRYPOINT ["bash", "./docker/docker.sh"]

View File

@@ -1,4 +1,3 @@
composer install
php bin/console doctrine:database:create php bin/console doctrine:database:create
php bin/console d:m:m --no-interaction php bin/console d:m:m --no-interaction
php bin/console cache:clear php bin/console cache:clear

View File

@@ -44,7 +44,7 @@ class AddRankCommand extends Command
/** /**
* @var GroupRepository $groupRepository * @var GroupRepository $groupRepository
*/ */
$groupRepository = $this->entityManager->getRepository("App:Group"); $groupRepository = $this->entityManager->getRepository(Group::class);
if ($groupid && null === $groupRepository->find($groupid)) { if ($groupid && null === $groupRepository->find($groupid)) {
$groupid = ''; $groupid = '';
@@ -64,7 +64,7 @@ class AddRankCommand extends Command
); );
} }
global $groupRepository; global $groupRepository;
if (null === $this->entityManager->getRepository("App:Group")->find($answer)) { if (null === $this->entityManager->getRepository(Group::class)->find($answer)) {
throw new \RuntimeException( throw new \RuntimeException(
'No group find for this id' 'No group find for this id'
); );

View File

@@ -3,6 +3,7 @@
namespace App\Command; namespace App\Command;
use App\Entity\User; use App\Entity\User;
use App\Entity\Group;
use Doctrine\ORM\Query; use Doctrine\ORM\Query;
use App\Repository\GroupRepository; use App\Repository\GroupRepository;
use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityManagerInterface;
@@ -103,7 +104,7 @@ class AddUserCommand extends Command
/** /**
* @var GroupRepository $groupRepository * @var GroupRepository $groupRepository
*/ */
$groupRepository = $this->entityManager->getRepository("App:Group"); $groupRepository = $this->entityManager->getRepository(Group::class);
if ($groupid && null === $groupRepository->find($groupid)) { if ($groupid && null === $groupRepository->find($groupid)) {
$groupid = ''; $groupid = '';
@@ -123,7 +124,7 @@ class AddUserCommand extends Command
); );
} }
global $groupRepository; global $groupRepository;
if (null === $this->entityManager->getRepository("App:Group")->find($answer)) { if (null === $this->entityManager->getRepository(Group::class)->find($answer)) {
throw new \RuntimeException( throw new \RuntimeException(
'No group find for this id' 'No group find for this id'
); );

View File

@@ -1,3 +1,3 @@
{ {
"version": "0.2.11" "version": "0.2.12"
} }