UpToDateValidatorInterface.php 873 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. declare(strict_types=1);
  7. namespace Magento\Framework\Setup;
  8. /**
  9. * Allows to check whether specific component of database is up to date.
  10. *
  11. * New way of interaction with database implies that there can be components like:
  12. * - Declarative Schema
  13. * - Data Patches
  14. * - Schema Patches
  15. * - In Future (maybe): triggers, stored procedures, etc
  16. *
  17. * Old way implies, that each module has 2 components: data and schema
  18. */
  19. interface UpToDateValidatorInterface
  20. {
  21. /**
  22. * Retrieve message, that uncover outdated component
  23. *
  24. * @return string
  25. */
  26. public function getNotUpToDateMessage() : string ;
  27. /**
  28. * Validate component whether it is up to date or not
  29. *
  30. * @return bool
  31. */
  32. public function isUpToDate() : bool ;
  33. }