getV1Schema(); $schemaV2 = $this->getV2Schema(); } /** * Retrieve the V2 schema * * @return array * @throws MappingException */ protected function getV2Schema(): array { $metadata = $this->entityManager->getMetadataFactory()->getAllMetadata(); $schema = []; foreach ($metadata as $entityMetadata) { $schema[$entityMetadata->getName()] = []; foreach ($entityMetadata->getFieldNames() as $field) { $schema[$entityMetadata->getName()][$field] = $entityMetadata->getTypeOfField($field); } foreach ($entityMetadata->getAssociationNames() as $association) { $schema[$entityMetadata->getName()][$association] = $entityMetadata->getAssociationMapping($association); } } return $schema; } /** * Retrieve the V1 schema * @return void */ protected function getV1Schema() { $response = $this->apiLegacyRequestService->get('/_internal/doctrine/schema'); $schema = json_decode($response->getContent(), true); dd($schema); return $schema; } /** * Get a list of differences between V1 and V2 doctrine schemas * @return void */ protected function getDiff() { } }