/**
  * @param string $currentCE
  * @param array $enterpriseVersions
  * @param string $maxVersion
  * @return array
  */
 public function filterEeVersions($currentCE, $enterpriseVersions, $maxVersion)
 {
     $eeVersions = [];
     foreach ($enterpriseVersions['available_versions'] as $version) {
         $requires = $this->composerInfo->getPackageRequirements('magento/product-enterprise-edition', $version);
         if (array_key_exists('magento/product-community-edition', $requires)) {
             /** @var \Composer\Package\Link $ceRequire */
             $ceRequire = $requires['magento/product-community-edition'];
             if (version_compare($ceRequire->getConstraint()->getPrettyString(), $currentCE, '>=')) {
                 $name = 'Version ' . $version . ' EE';
                 if ($maxVersion == $version) {
                     $name .= ' (latest)';
                 }
                 $eeVersions[] = ['id' => $version, 'name' => $name];
             }
         }
     }
     return $eeVersions;
 }