diff --git a/app/commands/DoctrineFixtures.php b/app/commands/DoctrineFixtures.php index c5c994bd2..7ae069472 100644 --- a/app/commands/DoctrineFixtures.php +++ b/app/commands/DoctrineFixtures.php @@ -8,7 +8,6 @@ use Doctrine\ORM\Id\AssignedGenerator; use Nette\Utils\Finder; use Nette\Utils\FileInfo; -use SplFileInfo; use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputArgument; diff --git a/app/model/repository/ShadowAssignmentPointsRepository.php b/app/model/repository/ShadowAssignmentPointsRepository.php index 1f4403c22..9b9442880 100644 --- a/app/model/repository/ShadowAssignmentPointsRepository.php +++ b/app/model/repository/ShadowAssignmentPointsRepository.php @@ -26,6 +26,10 @@ public function __construct(EntityManagerInterface $em) */ public function findPointsForAssignments(array $shadowAssignments, User $awardee): array { + if (!$shadowAssignments) { + return []; // we should not ask a query with empty IN () + } + $pointsList = $this->findBy( [ "awardee" => $awardee, diff --git a/composer.json b/composer.json index 07d10e98a..bb2927968 100644 --- a/composer.json +++ b/composer.json @@ -58,7 +58,6 @@ "nettrine/extensions-atlantic18": "^0.6.0", "nettrine/migrations": "^0.10", "nettrine/orm": "^0.9", - "mrdm-nl/ldap": "^1.1", "ramsey/uuid-doctrine": "^2.0", "symfony/process": "^7.3", "tracy/tracy": "^2.11", diff --git a/composer.lock b/composer.lock index da28cd525..02c83ce70 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "2d0456d40067884acbf20b7c367a11b1", + "content-hash": "6e2b08b6c12f1fbefba20b031acf8664", "packages": [ { "name": "bjeavons/zxcvbn-php", @@ -2953,54 +2953,6 @@ "abandoned": true, "time": "2018-11-01T09:47:34+00:00" }, - { - "name": "mrdm-nl/ldap", - "version": "1.1.1", - "target-dir": "Toyota/Component/Ldap", - "source": { - "type": "git", - "url": "https://github.com/mrdm-nl/ldap.git", - "reference": "b1ad191098c92b12b68f89c42cb624db19294e11" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/mrdm-nl/ldap/zipball/b1ad191098c92b12b68f89c42cb624db19294e11", - "reference": "b1ad191098c92b12b68f89c42cb624db19294e11", - "shasum": "" - }, - "require": { - "ext-ldap": "*", - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": ">=3.7.13" - }, - "type": "library", - "autoload": { - "psr-0": { - "Toyota\\Component\\Ldap\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Cyril Cottet", - "email": "cyril.cottet@gmail.com" - } - ], - "description": "LDAP made easy & practical to use in PHP", - "homepage": "https://github.com/mrdm-nl/ldap", - "keywords": [ - "ldap" - ], - "support": { - "source": "https://github.com/mrdm-nl/ldap/tree/1.1.1" - }, - "time": "2013-12-23T16:31:55+00:00" - }, { "name": "myclabs/deep-copy", "version": "1.13.4",