From 183f4a52119e373b830e07874581ea9183f050a3 Mon Sep 17 00:00:00 2001 From: Michael Moravec Date: Sat, 3 Mar 2018 21:06:01 +0100 Subject: [PATCH] Drop tools/sandbox --- phpcs.xml.dist | 1 - tools/sandbox/Entities/Address.php | 56 ----------------- tools/sandbox/Entities/User.php | 57 ------------------ tools/sandbox/bootstrap.php | 62 ------------------- tools/sandbox/doctrine | 4 -- tools/sandbox/doctrine.php | 67 --------------------- tools/sandbox/index.php | 27 --------- tools/sandbox/xml/Entities.Address.dcm.xml | 15 ----- tools/sandbox/xml/Entities.User.dcm.xml | 17 ------ tools/sandbox/yaml/Entities.Address.dcm.yml | 16 ----- tools/sandbox/yaml/Entities.User.dcm.yml | 18 ------ 11 files changed, 340 deletions(-) delete mode 100644 tools/sandbox/Entities/Address.php delete mode 100644 tools/sandbox/Entities/User.php delete mode 100644 tools/sandbox/bootstrap.php delete mode 100755 tools/sandbox/doctrine delete mode 100644 tools/sandbox/doctrine.php delete mode 100644 tools/sandbox/index.php delete mode 100644 tools/sandbox/xml/Entities.Address.dcm.xml delete mode 100644 tools/sandbox/xml/Entities.User.dcm.xml delete mode 100644 tools/sandbox/yaml/Entities.Address.dcm.yml delete mode 100644 tools/sandbox/yaml/Entities.User.dcm.yml diff --git a/phpcs.xml.dist b/phpcs.xml.dist index 3db818331c8..8ac4b569de6 100644 --- a/phpcs.xml.dist +++ b/phpcs.xml.dist @@ -13,7 +13,6 @@ lib tests - tools */lib/Doctrine/ORM/Mapping/InverseJoinColumn.php */tests/Doctrine/Tests/Proxies/__CG__* diff --git a/tools/sandbox/Entities/Address.php b/tools/sandbox/Entities/Address.php deleted file mode 100644 index 7c81e1057ab..00000000000 --- a/tools/sandbox/Entities/Address.php +++ /dev/null @@ -1,56 +0,0 @@ -id; - } - - public function getStreet(): string - { - return $this->street; - } - - public function setStreet($street): void - { - $this->street = $street; - } - - public function getUser(): User - { - return $this->user; - } - - public function setUser(User $user): void - { - if ($this->user !== $user) { - $this->user = $user; - $user->setAddress($this); - } - } -} diff --git a/tools/sandbox/Entities/User.php b/tools/sandbox/Entities/User.php deleted file mode 100644 index c55e22eee4a..00000000000 --- a/tools/sandbox/Entities/User.php +++ /dev/null @@ -1,57 +0,0 @@ -id; - } - - public function getName(): string - { - return $this->name; - } - - public function setName($name): void - { - $this->name = $name; - } - - public function getAddress(): Address - { - return $this->address; - } - - public function setAddress(Address $address): void - { - if ($this->address !== $address) { - $this->address = $address; - $address->setUser($this); - } - } -} diff --git a/tools/sandbox/bootstrap.php b/tools/sandbox/bootstrap.php deleted file mode 100644 index a945fb705dd..00000000000 --- a/tools/sandbox/bootstrap.php +++ /dev/null @@ -1,62 +0,0 @@ -add('Entities', __DIR__); -$loader->add('Proxies', __DIR__); - -$debug = true; -$config = new Configuration(); - -// Set up Metadata Drivers -$driverImpl = $config->newDefaultAnnotationDriver([__DIR__ . '/Entities']); -$config->setMetadataDriverImpl($driverImpl); - -// Set up caches, depending on $debug variable. -// You can use another variable to define which one of the cache systems you gonna use. -$cache = $debug ? new Cache\ArrayCache() : new Cache\ApcCache(); -$config->setMetadataCacheImpl($cache); -$config->setQueryCacheImpl($cache); - -// Proxy configuration -$config->setProxyDir(__DIR__ . '/Proxies'); -$config->setProxyNamespace('Proxies'); - -// Database connection information -$connectionOptions = [ - 'driver' => 'pdo_sqlite', - 'path' => 'database.sqlite', -]; - -// Enable second-level cache -$cacheConfig = new CacheConfiguration(); -$cacheDriver = $debug ? new Cache\ArrayCache() : new Cache\ApcCache(); -$cacheLogger = new StatisticsCacheLogger(); -$factory = new DefaultCacheFactory($cacheConfig->getRegionsConfiguration(), $cacheDriver); - -if ($debug) { - $cacheConfig->setCacheLogger($cacheLogger); -} - -$cacheConfig->setCacheFactory($factory); -$config->setSecondLevelCacheEnabled(true); -$config->setSecondLevelCacheConfiguration($cacheConfig); - -return EntityManager::create($connectionOptions, $config); diff --git a/tools/sandbox/doctrine b/tools/sandbox/doctrine deleted file mode 100755 index 92f323f8c83..00000000000 --- a/tools/sandbox/doctrine +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env php -setCatchExceptions(true); - -$cli->setHelperSet(new Symfony\Component\Console\Helper\HelperSet( - [ - 'db' => new ConnectionHelper($em->getConnection()), - 'em' => new EntityManagerHelper($em), - ] -)); - -$cli->addCommands( - [ - // DBAL Commands - new RunSqlCommand(), - new ImportCommand(), - - // ORM Commands - new QueryRegionCommand(), - new EntityRegionCommand(), - new CollectionRegionCommand(), - new MetadataCommand(), - new ResultCommand(), - new QueryCommand(), - new CreateCommand(), - new UpdateCommand(), - new DropCommand(), - new EnsureProductionSettingsCommand(), - new ConvertDoctrine1SchemaCommand(), - new GenerateRepositoriesCommand(), - new GenerateEntitiesCommand(), - new GenerateProxiesCommand(), - new ConvertMappingCommand(), - new RunDqlCommand(), - new ValidateSchemaCommand(), - - ] -); -$cli->run(); diff --git a/tools/sandbox/index.php b/tools/sandbox/index.php deleted file mode 100644 index b3fc605dc2b..00000000000 --- a/tools/sandbox/index.php +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - diff --git a/tools/sandbox/xml/Entities.User.dcm.xml b/tools/sandbox/xml/Entities.User.dcm.xml deleted file mode 100644 index 4fe7e4c4af0..00000000000 --- a/tools/sandbox/xml/Entities.User.dcm.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - diff --git a/tools/sandbox/yaml/Entities.Address.dcm.yml b/tools/sandbox/yaml/Entities.Address.dcm.yml deleted file mode 100644 index 04d35078ae5..00000000000 --- a/tools/sandbox/yaml/Entities.Address.dcm.yml +++ /dev/null @@ -1,16 +0,0 @@ -Entities\Address: - type: entity - table: addresses - id: - id: - type: integer - generator: - strategy: AUTO - fields: - street: - type: string - length: 255 - oneToOne: - user: - targetEntity: User - mappedBy: address diff --git a/tools/sandbox/yaml/Entities.User.dcm.yml b/tools/sandbox/yaml/Entities.User.dcm.yml deleted file mode 100644 index a93d48f9f75..00000000000 --- a/tools/sandbox/yaml/Entities.User.dcm.yml +++ /dev/null @@ -1,18 +0,0 @@ -Entities\User: - type: entity - table: users - id: - id: - type: integer - generator: - strategy: AUTO - fields: - name: - type: string - length: 50 - oneToOne: - address: - targetEntity: Address - joinColumn: - name: address_id - referencedColumnName: id