Skip to content

Commit c0cac20

Browse files
authored
Merge pull request #57 from brosenberger/issue55
solves #55
2 parents 831aefc + 0137d62 commit c0cac20

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

Model/Enterprise/VersionFeaturesFactory.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ class VersionFeaturesFactory
1414

1515
const EDITION_ENTERPRISE = 'Enterprise';
1616
const EDITION_COMMUNITY = 'Community';
17+
const EDITION_B2B = 'B2B';
1718
/**
1819
* @var ObjectManagerInterface
1920
*/
@@ -47,7 +48,8 @@ public function create($featureName)
4748
$features = $this->getFeatures();
4849
$feature = $features[$featureName];
4950

50-
if ( ! version_compare($this->productMetadata->getVersion(), $feature['minVersion'],'>=')) {
51+
if ( ($this->productMetadata->getEdition() != self::EDITION_B2B && ! version_compare($this->productMetadata->getVersion(), $feature['minVersion'],'>=')) ||
52+
($this->productMetadata->getEdition() == self::EDITION_B2B && ! version_compare($this->productMetadata->getVersion(), $feature['minB2bVersion'], '>='))) {
5153
return null;
5254
}
5355
if ($feature['minEdition'] == self::EDITION_ENTERPRISE && $this->productMetadata->getEdition() == self::EDITION_COMMUNITY) {
@@ -65,6 +67,7 @@ public function getFeatures()
6567
return array(
6668
"CategoryImportVersion" => array(
6769
"minVersion" => "2.1.1",
70+
"minB2bVersion" => "1.0.0-rc",
6871
"minEdition" => self::EDITION_ENTERPRISE,
6972
"className" => 'FireGento\FastSimpleImport\Model\Enterprise\CategoryImportVersion'
7073
)

0 commit comments

Comments
 (0)