Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump doctrine/orm from 2.12.3 to 2.14.1 #345

Open
wants to merge 47 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
12f9b0d
Bump infection/infection from 0.26.12 to 0.26.13
dependabot[bot] Jun 24, 2022
b466ddb
Merge pull request #248 from thecoolestguy/dependabot/composer/infect…
github-actions[bot] Jun 24, 2022
07272cb
Bump phpstan/phpstan from 1.7.15 to 1.8.0
dependabot[bot] Jun 29, 2022
9476c65
Merge pull request #249 from thecoolestguy/dependabot/composer/phpsta…
github-actions[bot] Jun 29, 2022
c27c53f
Bump eluceo/ical from 2.6.0 to 2.7.0
dependabot[bot] Jun 22, 2022
a15bc80
set published-ttl for the ics feed to 1 hour.
stopfstedt Jun 22, 2022
c5ffa4b
Update Dependencies
zorgbort Jun 27, 2022
f82dd98
Bump league/flysystem from 3.0.21 to 3.0.23
dependabot[bot] Jun 29, 2022
36cad1c
Bump league/flysystem-aws-s3-v3 from 3.0.21 to 3.0.22
dependabot[bot] Jun 29, 2022
8596589
Consolidate calls to the cache
jrjohnson Jun 22, 2022
560c777
Do ID check with cached values
jrjohnson Jun 22, 2022
af5f7f0
Check permissions on side loaded data
jrjohnson Jun 30, 2022
9d30aef
Bump phpstan/phpstan from 1.8.0 to 1.8.1
dependabot[bot] Jul 13, 2022
c430c0d
Merge pull request #259 from thecoolestguy/dependabot/composer/phpsta…
github-actions[bot] Jul 13, 2022
6c31a4d
Bump phpstan/phpstan-symfony from 1.2.5 to 1.2.6
dependabot[bot] Jul 19, 2022
0cb3e3e
Merge pull request #264 from thecoolestguy/dependabot/composer/phpsta…
github-actions[bot] Jul 19, 2022
ac33455
Bump phpstan/phpstan from 1.8.1 to 1.8.2
dependabot[bot] Jul 21, 2022
0f541a2
Bump phpstan/phpstan-symfony from 1.2.6 to 1.2.8
dependabot[bot] Jul 21, 2022
fc0ae6e
Merge pull request #266 from thecoolestguy/dependabot/composer/phpsta…
github-actions[bot] Jul 21, 2022
2715af7
Merge pull request #267 from thecoolestguy/dependabot/composer/phpsta…
github-actions[bot] Jul 21, 2022
58a4803
Bump phpstan/phpstan-symfony from 1.2.8 to 1.2.9
dependabot[bot] Aug 8, 2022
f158983
Merge pull request #273 from thecoolestguy/dependabot/composer/phpsta…
github-actions[bot] Aug 8, 2022
a970a71
Bump phpunit/phpunit from 9.5.21 to 9.5.22
dependabot[bot] Aug 22, 2022
53e0504
Merge pull request #278 from thecoolestguy/dependabot/composer/phpuni…
github-actions[bot] Aug 22, 2022
391f19b
Bump phpunit/phpunit from 9.5.22 to 9.5.23
dependabot[bot] Aug 23, 2022
f1f7be0
Merge pull request #280 from thecoolestguy/dependabot/composer/phpuni…
github-actions[bot] Aug 23, 2022
95bdd64
Bump phpstan/phpstan-symfony from 1.2.9 to 1.2.11
dependabot[bot] Aug 26, 2022
858f764
Merge pull request #282 from thecoolestguy/dependabot/composer/phpsta…
github-actions[bot] Aug 26, 2022
95acfc3
Bump phpstan/phpstan-symfony from 1.2.11 to 1.2.13
dependabot[bot] Aug 29, 2022
5505db9
Merge pull request #283 from thecoolestguy/dependabot/composer/phpsta…
github-actions[bot] Aug 29, 2022
cbe48ed
Bump phpunit/phpunit from 9.5.23 to 9.5.24
dependabot[bot] Aug 30, 2022
c0ec319
Merge pull request #285 from thecoolestguy/dependabot/composer/phpuni…
github-actions[bot] Aug 30, 2022
78a45c6
Bump infection/infection from 0.26.13 to 0.26.14
dependabot[bot] Sep 1, 2022
dc6e15b
Merge pull request #287 from thecoolestguy/dependabot/composer/infect…
github-actions[bot] Sep 1, 2022
e40435d
Bump phpstan/phpstan from 1.8.2 to 1.8.3
dependabot[bot] Sep 2, 2022
8a4ab25
Merge pull request #288 from thecoolestguy/dependabot/composer/phpsta…
github-actions[bot] Sep 2, 2022
ecdda84
Bump phpstan/phpstan from 1.8.3 to 1.8.4
dependabot[bot] Sep 5, 2022
9003440
Merge pull request #289 from thecoolestguy/dependabot/composer/phpsta…
github-actions[bot] Sep 5, 2022
67c55ef
added new composer
Dec 6, 2022
2122e2f
Bump phpstan/phpstan-symfony from 1.2.5 to 1.2.6
dependabot[bot] Jul 19, 2022
1845f70
Bump phpstan/phpstan from 1.8.1 to 1.8.2
dependabot[bot] Jul 21, 2022
fee2889
Bump phpstan/phpstan-symfony from 1.2.6 to 1.2.8
dependabot[bot] Jul 21, 2022
30d5bae
Bump phpstan/phpstan-symfony from 1.2.8 to 1.2.9
dependabot[bot] Aug 8, 2022
d9671d5
Bump phpunit/phpunit from 9.5.21 to 9.5.22
dependabot[bot] Aug 22, 2022
6f53a28
Bump phpunit/phpunit from 9.5.22 to 9.5.23
dependabot[bot] Aug 23, 2022
b0b3b5f
Bump infection/infection from 0.26.13 to 0.26.14
dependabot[bot] Sep 1, 2022
c92af13
Bump doctrine/orm from 2.12.3 to 2.14.1
dependabot[bot] Jan 17, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
964 changes: 457 additions & 507 deletions composer.lock

Large diffs are not rendered by default.

24 changes: 14 additions & 10 deletions src/Classes/JsonApiData.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,24 @@

namespace App\Classes;

use App\RelationshipVoter\AbstractVoter;
use App\Service\EntityRepositoryLookup;
use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface;
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;

class JsonApiData
{
protected array $data = [];
protected array $includes = [];
protected array $sideLoadCandidates = [];
protected EntityRepositoryLookup $entityRepositoryLookup;
protected NormalizerInterface $normalizer;

public function __construct(
EntityRepositoryLookup $entityRepositoryLookup,
NormalizerInterface $normalizer,
protected EntityRepositoryLookup $entityRepositoryLookup,
protected NormalizerInterface $normalizer,
protected AuthorizationCheckerInterface $authorizationChecker,
array $data,
array $sideLoadFields
) {
$this->entityRepositoryLookup = $entityRepositoryLookup;
$this->normalizer = $normalizer;
foreach ($data as $item) {
$shapedItem = $this->shapeItem($item);
$this->data[] = $shapedItem;
Expand Down Expand Up @@ -157,16 +156,21 @@ protected function executeSideLoad(): void
if ($newIds !== []) {
$manager = $this->entityRepositoryLookup->getRepositoryForEndpoint($type);
$dtos = $manager->findDTOsBy(['id' => $newIds]);
foreach ($dtos as $dto) {
$filteredDtos = array_filter(
$dtos,
fn($object) => $this->authorizationChecker->isGranted(AbstractVoter::VIEW, $object)
);
foreach ($filteredDtos as $dto) {
$data = $this->normalizer->normalize($dto, 'json-api');
$shaped = $this->shapeItem($data);
$this->includes[] = $shaped;
}
}
foreach ($ids as $id) {
$item = $this->getIncluded((string) $id, $type);
foreach ($candidates[$id] as $sideLoadFields) {
$this->extractSideLoadData($item['relationships'], $sideLoadFields);
if ($item = $this->getIncluded((string) $id, $type)) {
foreach ($candidates[$id] as $sideLoadFields) {
$this->extractSideLoadData($item['relationships'], $sideLoadFields);
}
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/Controller/IcsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
use App\Repository\IlmSessionRepository;
use App\Repository\OfferingRepository;
use App\Repository\UserRepository;
use DateInterval;
use DateTime;
use DateTimeImmutable;
use Eluceo\iCal\Domain\ValueObject\Location;
use Exception;
use Eluceo\iCal\Domain\Entity\Calendar;
Expand Down Expand Up @@ -58,7 +58,7 @@ public function getICSFeed(Request $request, $key)

$calendar = new Calendar();
$calendar->setProductIdentifier('Ilios Calendar for ' . $user->getFirstAndLastName());
//$calendar->setPublishedTTL('P1H');
$calendar->setPublishedTTL(new DateInterval('PT1H'));

$from = new DateTime(self::LOOK_BACK);
$to = new DateTime(self::LOOK_FORWARD);
Expand Down
10 changes: 5 additions & 5 deletions src/EventListener/ClearCachedDto.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace App\EventListener;

use App\Service\DTOCacheTagger;
use App\Service\DTOCacheManager;
use Doctrine\ORM\Event\OnFlushEventArgs;
use Doctrine\ORM\PersistentCollection;
use Flagception\Manager\FeatureManagerInterface;
Expand Down Expand Up @@ -39,10 +39,10 @@ public function onFlush(OnFlushEventArgs $eventArgs)
foreach ($entities as $entity) {
$entityName = $entityManager->getMetadataFactory()->getMetadataFor($entity::class)->getName();
if ($action === 'create') {
$tags[] = DTOCacheTagger::getTag($entityName, false);
$tags[] = DTOCacheManager::getTag($entityName, false);
} else {
$id = (string) $entity;
$tags[] = DTOCacheTagger::getTag($entityName, $id);
$tags[] = DTOCacheManager::getTag($entityName, $id);
}
}
}
Expand All @@ -53,12 +53,12 @@ public function onFlush(OnFlushEventArgs $eventArgs)
foreach ($col->getDeleteDiff() as $entity) {
$entityName = $entityManager->getMetadataFactory()->getMetadataFor($entity::class)->getName();
$id = (string) $entity;
$tags[] = DTOCacheTagger::getTag($entityName, $id);
$tags[] = DTOCacheManager::getTag($entityName, $id);
}
foreach ($col->getInsertDiff() as $entity) {
$entityName = $entityManager->getMetadataFactory()->getMetadataFor($entity::class)->getName();
$id = (string) $entity;
$tags[] = DTOCacheTagger::getTag($entityName, $id);
$tags[] = DTOCacheManager::getTag($entityName, $id);
}
}

Expand Down
8 changes: 2 additions & 6 deletions src/Repository/AamcMethodRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,14 @@
namespace App\Repository;

use App\Entity\AamcMethod;
use App\Service\DTOCacheTagger;
use App\Service\DTOCacheManager;
use App\Traits\ImportableEntityRepository;
use App\Traits\ManagerRepository;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\ORM\QueryBuilder;
use Doctrine\ORM\AbstractQuery;
use App\Entity\DTO\AamcMethodDTO;
use Doctrine\Persistence\ManagerRegistry;
use Flagception\Manager\FeatureManagerInterface;
use Symfony\Contracts\Cache\CacheInterface;

use function array_values;

Expand All @@ -28,9 +26,7 @@ class AamcMethodRepository extends ServiceEntityRepository implements

public function __construct(
ManagerRegistry $registry,
protected CacheInterface $cache,
protected DTOCacheTagger $cacheTagger,
protected FeatureManagerInterface $featureManager,
protected DTOCacheManager $cacheManager,
) {
parent::__construct($registry, AamcMethod::class);
}
Expand Down
8 changes: 2 additions & 6 deletions src/Repository/AamcPcrsRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace App\Repository;

use App\Service\DTOCacheTagger;
use App\Service\DTOCacheManager;
use App\Traits\ImportableEntityRepository;
use App\Traits\ManagerRepository;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
Expand All @@ -13,8 +13,6 @@
use App\Entity\AamcPcrs;
use App\Entity\DTO\AamcPcrsDTO;
use Doctrine\Persistence\ManagerRegistry;
use Flagception\Manager\FeatureManagerInterface;
use Symfony\Contracts\Cache\CacheInterface;

class AamcPcrsRepository extends ServiceEntityRepository implements
DTORepositoryInterface,
Expand All @@ -26,9 +24,7 @@ class AamcPcrsRepository extends ServiceEntityRepository implements

public function __construct(
ManagerRegistry $registry,
protected CacheInterface $cache,
protected DTOCacheTagger $cacheTagger,
protected FeatureManagerInterface $featureManager,
protected DTOCacheManager $cacheManager,
) {
parent::__construct($registry, AamcPcrs::class);
}
Expand Down
8 changes: 2 additions & 6 deletions src/Repository/AamcResourceTypeRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,14 @@
namespace App\Repository;

use App\Entity\AamcResourceType;
use App\Service\DTOCacheTagger;
use App\Service\DTOCacheManager;
use App\Traits\ImportableEntityRepository;
use App\Traits\ManagerRepository;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\ORM\QueryBuilder;
use Doctrine\ORM\AbstractQuery;
use App\Entity\DTO\AamcResourceTypeDTO;
use Doctrine\Persistence\ManagerRegistry;
use Flagception\Manager\FeatureManagerInterface;
use Symfony\Contracts\Cache\CacheInterface;

use function array_values;

Expand All @@ -28,9 +26,7 @@ class AamcResourceTypeRepository extends ServiceEntityRepository implements

public function __construct(
ManagerRegistry $registry,
protected CacheInterface $cache,
protected DTOCacheTagger $cacheTagger,
protected FeatureManagerInterface $featureManager,
protected DTOCacheManager $cacheManager,
) {
parent::__construct($registry, AamcResourceType::class);
}
Expand Down
8 changes: 2 additions & 6 deletions src/Repository/AlertChangeTypeRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,14 @@
namespace App\Repository;

use App\Entity\AlertChangeType;
use App\Service\DTOCacheTagger;
use App\Service\DTOCacheManager;
use App\Traits\ImportableEntityRepository;
use App\Traits\ManagerRepository;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\ORM\QueryBuilder;
use Doctrine\ORM\AbstractQuery;
use App\Entity\DTO\AlertChangeTypeDTO;
use Doctrine\Persistence\ManagerRegistry;
use Flagception\Manager\FeatureManagerInterface;
use Symfony\Contracts\Cache\CacheInterface;

use function array_values;

Expand All @@ -28,9 +26,7 @@ class AlertChangeTypeRepository extends ServiceEntityRepository implements

public function __construct(
ManagerRegistry $registry,
protected CacheInterface $cache,
protected DTOCacheTagger $cacheTagger,
protected FeatureManagerInterface $featureManager,
protected DTOCacheManager $cacheManager,
) {
parent::__construct($registry, AlertChangeType::class);
}
Expand Down
8 changes: 2 additions & 6 deletions src/Repository/AlertRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,13 @@
namespace App\Repository;

use App\Entity\Alert;
use App\Service\DTOCacheTagger;
use App\Service\DTOCacheManager;
use App\Traits\ManagerRepository;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\ORM\QueryBuilder;
use Doctrine\ORM\AbstractQuery;
use App\Entity\DTO\AlertDTO;
use Doctrine\Persistence\ManagerRegistry;
use Flagception\Manager\FeatureManagerInterface;
use Symfony\Contracts\Cache\CacheInterface;

use function array_values;

Expand All @@ -23,9 +21,7 @@ class AlertRepository extends ServiceEntityRepository implements DTORepositoryIn

public function __construct(
ManagerRegistry $registry,
protected CacheInterface $cache,
protected DTOCacheTagger $cacheTagger,
protected FeatureManagerInterface $featureManager,
protected DTOCacheManager $cacheManager,
) {
parent::__construct($registry, Alert::class);
}
Expand Down
8 changes: 2 additions & 6 deletions src/Repository/ApplicationConfigRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace App\Repository;

use App\Service\DTOCacheTagger;
use App\Service\DTOCacheManager;
use App\Traits\ImportableEntityRepository;
use App\Traits\ManagerRepository;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
Expand All @@ -13,8 +13,6 @@
use App\Entity\ApplicationConfig;
use App\Entity\DTO\ApplicationConfigDTO;
use Doctrine\Persistence\ManagerRegistry;
use Flagception\Manager\FeatureManagerInterface;
use Symfony\Contracts\Cache\CacheInterface;

class ApplicationConfigRepository extends ServiceEntityRepository implements
DTORepositoryInterface,
Expand All @@ -27,9 +25,7 @@ class ApplicationConfigRepository extends ServiceEntityRepository implements
public function __construct(
ManagerRegistry $registry,
protected bool $cacheEnabled,
protected CacheInterface $cache,
protected DTOCacheTagger $cacheTagger,
protected FeatureManagerInterface $featureManager,
protected DTOCacheManager $cacheManager,
) {
parent::__construct($registry, ApplicationConfig::class);
}
Expand Down
8 changes: 2 additions & 6 deletions src/Repository/AssessmentOptionRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,14 @@
namespace App\Repository;

use App\Entity\AssessmentOption;
use App\Service\DTOCacheTagger;
use App\Service\DTOCacheManager;
use App\Traits\ImportableEntityRepository;
use App\Traits\ManagerRepository;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\ORM\QueryBuilder;
use Doctrine\ORM\AbstractQuery;
use App\Entity\DTO\AssessmentOptionDTO;
use Doctrine\Persistence\ManagerRegistry;
use Flagception\Manager\FeatureManagerInterface;
use Symfony\Contracts\Cache\CacheInterface;

use function array_values;

Expand All @@ -28,9 +26,7 @@ class AssessmentOptionRepository extends ServiceEntityRepository implements

public function __construct(
ManagerRegistry $registry,
protected CacheInterface $cache,
protected DTOCacheTagger $cacheTagger,
protected FeatureManagerInterface $featureManager,
protected DTOCacheManager $cacheManager,
) {
parent::__construct($registry, AssessmentOption::class);
}
Expand Down
8 changes: 2 additions & 6 deletions src/Repository/AuditLogRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,21 @@
namespace App\Repository;

use App\Entity\AuditLog;
use App\Service\DTOCacheTagger;
use App\Service\DTOCacheManager;
use App\Traits\ManagerRepository;
use DateTime;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\ORM\QueryBuilder;
use Doctrine\Persistence\ManagerRegistry;
use Exception;
use Flagception\Manager\FeatureManagerInterface;
use Symfony\Contracts\Cache\CacheInterface;

class AuditLogRepository extends ServiceEntityRepository implements DTORepositoryInterface, RepositoryInterface
{
use ManagerRepository;

public function __construct(
ManagerRegistry $registry,
protected CacheInterface $cache,
protected DTOCacheTagger $cacheTagger,
protected FeatureManagerInterface $featureManager,
protected DTOCacheManager $cacheManager,
) {
parent::__construct($registry, AuditLog::class);
}
Expand Down
8 changes: 2 additions & 6 deletions src/Repository/AuthenticationRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace App\Repository;

use App\Entity\Authentication;
use App\Service\DTOCacheTagger;
use App\Service\DTOCacheManager;
use App\Traits\ManagerRepository;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\ORM\NonUniqueResultException;
Expand All @@ -15,8 +15,6 @@
use App\Entity\AuthenticationInterface;
use App\Entity\DTO\AuthenticationDTO;
use Doctrine\Persistence\ManagerRegistry;
use Flagception\Manager\FeatureManagerInterface;
use Symfony\Contracts\Cache\CacheInterface;

use function is_array;

Expand All @@ -26,9 +24,7 @@ class AuthenticationRepository extends ServiceEntityRepository implements DTORep

public function __construct(
ManagerRegistry $registry,
protected CacheInterface $cache,
protected DTOCacheTagger $cacheTagger,
protected FeatureManagerInterface $featureManager,
protected DTOCacheManager $cacheManager,
) {
parent::__construct($registry, Authentication::class);
}
Expand Down
Loading