SomeSkippedPatch.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\TestSetupDeclarationModule5\Setup\Patch\Data;
  7. use Magento\Framework\App\ResourceConnection;
  8. use Magento\Framework\Setup\Patch\DataPatchInterface;
  9. use Magento\Framework\Setup\Patch\PatchRevertableInterface;
  10. use Magento\Framework\Setup\Patch\PatchVersionInterface;
  11. /**
  12. * Class SomePatch
  13. * @package Magento\TestSetupDeclarationModule3\Setup
  14. */
  15. class SomeSkippedPatch implements
  16. DataPatchInterface,
  17. PatchRevertableInterface,
  18. PatchVersionInterface
  19. {
  20. /**
  21. * @var ResourceConnection
  22. */
  23. private $resourceConnection;
  24. /**
  25. * IncrementalSomeIntegerPatch constructor.
  26. * @param ResourceConnection $resourceConnection
  27. */
  28. public function __construct(ResourceConnection $resourceConnection)
  29. {
  30. $this->resourceConnection = $resourceConnection;
  31. }
  32. /**
  33. * @return string
  34. */
  35. public static function getVersion()
  36. {
  37. return '1.0.2';
  38. }
  39. /**
  40. * @return array
  41. */
  42. public function getAliases()
  43. {
  44. return [];
  45. }
  46. /**
  47. * @inheritdoc
  48. */
  49. public function apply()
  50. {
  51. throw new \Exception('This patch should be skipped!');
  52. }
  53. public function revert()
  54. {
  55. }
  56. /**
  57. * @return array
  58. */
  59. public static function getDependencies()
  60. {
  61. return [];
  62. }
  63. }