code: protected function processDiscriminatorMap(ClassMetadataInfo $metadata)
      {
          $newMap = [];
  
          foreach ($metadata->discriminatorMap as $mapId => $mappedEntityName) {
              $newKey = $this->doReplacement($mapId);
              $newMap[$newKey] = $mappedEntityName;
          }
  
          $metadata->discriminatorMap = $newMap;
      }
docs: Replace discriminator array key if needed.
  
  @param ClassMetadataInfo $metadata