Skip to content
Merged
Changes from all commits
Commits
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
57 changes: 0 additions & 57 deletions src/App/src/ConfigProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

use Doctrine\ORM\EntityManager;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\Mapping\EntityListenerResolver as EntityListenerResolverInterface;
use Doctrine\Persistence\Mapping\Driver\MappingDriver;
use Doctrine\Persistence\Mapping\Driver\MappingDriverChain;
use Dot\Cache\Adapter\ArrayAdapter;
use Dot\Cache\Adapter\FilesystemAdapter;
Expand All @@ -16,68 +14,14 @@
use Mezzio\Application;
use Ramsey\Uuid\Doctrine\UuidType;
use Roave\PsrContainerDoctrine\EntityManagerFactory;
use Symfony\Component\Cache\Adapter\AdapterInterface;

use function getcwd;

/**
* @phpstan-type ConfigType array{
* dependencies: DependenciesType,
* doctrine: DoctrineConfigType,
* resultCacheLifetime: int,
* }
* @phpstan-type DoctrineConfigType array{
* cache: array{
* array: array{
* class: class-string<AdapterInterface>,
* },
* filesystem: array{
* class: class-string<AdapterInterface>,
* directory: non-empty-string,
* namespace: non-empty-string,
* },
* },
* configuration: array{
* orm_default: array{
* entity_listener_resolver: class-string<EntityListenerResolverInterface>,
* result_cache: non-empty-string,
* metadata_cache: non-empty-string,
* query_cache: non-empty-string,
* hydration_cache: non-empty-string,
* typed_field_mapper: non-empty-string|null,
* second_level_cache: array{
* enabled: bool,
* default_lifetime: int,
* default_lock_lifetime: int,
* file_lock_region_directory: string,
* regions: string[],
* },
* },
* },
* driver: array{
* orm_default: array{
* class: class-string<MappingDriver>,
* },
* },
* migrations: array{
* migrations_paths: array<non-empty-string, non-empty-string>,
* all_or_nothing: bool,
* check_database_platform: bool,
* },
* types: array<non-empty-string, class-string>,
* }
* @phpstan-type DependenciesType array{
* factories: array<class-string|non-empty-string, class-string|non-empty-string>,
* aliases: array<class-string|non-empty-string, class-string|non-empty-string>,
* }
*/

class ConfigProvider
{
/**
@return array{
* dependencies: array<mixed>,
* doctrine: array<mixed>,
* templates: array<mixed>,
* }
*/
Expand Down Expand Up @@ -152,7 +96,6 @@ private function getDoctrineConfig(): array
],
'configuration' => [
'orm_default' => [
'entity_listener_resolver' => EntityListenerResolverInterface::class,
'result_cache' => 'filesystem',
'metadata_cache' => 'filesystem',
'query_cache' => 'filesystem',
Expand Down