-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8431b23
commit 1aad678
Showing
10 changed files
with
92 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?php declare(strict_types=1); | ||
|
||
namespace Yireo\DevHacks\Console\Command; | ||
|
||
use Symfony\Component\Console\Command\Command; | ||
use Symfony\Component\Console\Input\InputArgument; | ||
use Symfony\Component\Console\Input\InputInterface; | ||
use Symfony\Component\Console\Output\OutputInterface; | ||
|
||
class CopyHacks extends Command | ||
{ | ||
protected function configure() | ||
{ | ||
$this->setName('yireo_devhacks:copy_hacks') | ||
->setDescription('Copy some hacks'); | ||
} | ||
|
||
protected function execute(InputInterface $input, OutputInterface $output) | ||
{ | ||
$copyDir = dirname(__DIR__) . '/../Copy'; | ||
$copies = [ | ||
\Magento\Framework\Filesystem\Directory\PathValidator::class => 'PathValidator.php' | ||
]; | ||
|
||
foreach ($copies as $className => $copyFile) { | ||
$originalFile = (new \ReflectionClass($className))->getFileName(); | ||
if (!file_exists($originalFile)) { | ||
$output->writeln('<error>Original file does not exist: ' . $originalFile . '</error>'); | ||
continue; | ||
} | ||
|
||
$copyFile = $copyDir . '/' . $copyFile; | ||
if (!file_exists($copyFile)) { | ||
$output->writeln('<error>Hack file does not exist: ' . $copyFile . '</error>'); | ||
continue; | ||
} | ||
|
||
copy($copyFile, $originalFile); | ||
} | ||
} | ||
} |
4 changes: 1 addition & 3 deletions
4
Console/Command/IntegrationTesting/PhpUnitFile/ToggleTestsCleanup.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php declare(strict_types=1); | ||
|
||
namespace Magento\Framework\Filesystem\Directory; | ||
|
||
use Magento\Framework\Filesystem\DriverInterface; | ||
|
||
/** | ||
* @inheritDoc | ||
* | ||
* Validates paths using driver. | ||
*/ | ||
class PathValidator implements PathValidatorInterface | ||
{ | ||
/** | ||
* @param DriverInterface $driver | ||
*/ | ||
public function __construct(DriverInterface $driver) | ||
{ | ||
} | ||
|
||
/** | ||
* @inheritDoc | ||
*/ | ||
public function validate( | ||
string $directoryPath, | ||
string $path, | ||
?string $scheme = null, | ||
bool $absolutePath = false | ||
): void {} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php declare(strict_types=1); | ||
|
||
namespace Yireo\DevHacks\Override; | ||
|
||
use Magento\Framework\View\Element\Template\File\Validator; | ||
|
||
class TemplateFileValidator extends Validator | ||
{ | ||
public function isValid($filename) | ||
{ | ||
return true; | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters