Skip to content

Commit 7ee2c5f

Browse files
MAGETWO-90348: Removing suggested sample data versions and checking for git in sampledata:deploy
1 parent db4ca24 commit 7ee2c5f

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

app/code/Magento/SampleData/Console/Command/SampleDataDeployCommand.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,8 @@ protected function execute(InputInterface $input, OutputInterface $output)
8585
{
8686
$rootJson = json_decode($this->filesystem->getDirectoryRead(DirectoryList::ROOT)->readFile("composer.json"));
8787
if (!isset($rootJson->version)) {
88-
$output->writeln('<info>' .
89-
'Git installations must deploy sample data from GitHub; see github.com/magento/magento2-sample-data'
90-
. '</info>');
88+
// @codingStandardsIgnoreLine
89+
$output->writeln('<info>' . 'Git installations must deploy sample data from GitHub; see https://devdocs.magento.com/guides/v2.3/install-gde/install/sample-data-after-clone.html for more information.' . '</info>');
9190
return;
9291
}
9392
$this->updateMemoryLimit();

app/code/Magento/SampleData/Model/Dependency.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public function getSampleDataPackages()
8181
$suggests = array_merge($suggests, $this->getSuggestsFromModules());
8282
foreach ($suggests as $name => $version) {
8383
if (strpos($version, self::SAMPLE_DATA_SUGGEST) === 0) {
84-
$installExtensions[$name] = substr($version, strlen(self::SAMPLE_DATA_SUGGEST));
84+
$installExtensions[$name] = trim(substr($version, strlen(self::SAMPLE_DATA_SUGGEST)));
8585
}
8686
}
8787
return $installExtensions;

app/code/Magento/SampleData/Test/Unit/Model/DependencyTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,8 @@ public static function dataPackagesFromComposerSuggest()
152152
];
153153
},
154154
'suggestions' => [
155-
'magento/foo-sample-data' => Dependency::SAMPLE_DATA_SUGGEST . '100.0.0',
156-
'thirdparty/bar-sample-data' => Dependency::SAMPLE_DATA_SUGGEST . '1.2.3',
155+
'magento/foo-sample-data' => Dependency::SAMPLE_DATA_SUGGEST . ' 100.0.0',
156+
'thirdparty/bar-sample-data' => Dependency::SAMPLE_DATA_SUGGEST . ' 1.2.3',
157157
'thirdparty/something-else' => 'Just a suggested package',
158158
],
159159
'expectedPackages' => [

dev/tests/integration/testsuite/Magento/SampleData/_files/Modules/FirstModule/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "magento/module-first",
33
"description": "N/A",
44
"suggest": {
5-
"magento/module-first-sample-data": "Sample Data version:777.7.*"
5+
"magento/module-first-sample-data": "Sample Data version: 777.7.*"
66
},
77
"type": "magento2-module",
88
"config": {

0 commit comments

Comments
 (0)