Skip to content

Commit 8279965

Browse files
committed
AC-14807::Backport Verbose Mode in setup:db:status CLI command
1 parent df8fcf6 commit 8279965

File tree

6 files changed

+42
-15
lines changed

6 files changed

+42
-15
lines changed

lib/internal/Magento/Framework/Setup/Declaration/Schema/UpToDateDeclarativeSchema.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,12 @@
1010

1111
use Magento\Framework\Setup\Declaration\Schema\Diff\SchemaDiff;
1212
use Magento\Framework\Setup\UpToDateValidatorInterface;
13+
use Magento\Framework\Setup\DetailProviderInterface;
1314

1415
/**
1516
* Allows to validate if schema is up to date or not
1617
*/
17-
class UpToDateDeclarativeSchema implements UpToDateValidatorInterface
18+
class UpToDateDeclarativeSchema implements UpToDateValidatorInterface, DetailProviderInterface
1819
{
1920
/**
2021
* @var SchemaConfigInterface
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?php
2+
/**
3+
* Copyright 2025 Adobe
4+
* All Rights Reserved.
5+
*/
6+
declare(strict_types=1);
7+
8+
namespace Magento\Framework\Setup;
9+
10+
/**
11+
* Allows to check whether specific component of database is up to date.
12+
*
13+
* New way of interaction with database implies that there can be components like:
14+
* - Declarative Schema
15+
* - Data Patches
16+
* - Schema Patches
17+
* - In Future (maybe): triggers, stored procedures, etc
18+
*
19+
* Old way implies, that each module has 2 components: data and schema
20+
*
21+
* @api
22+
*/
23+
interface DetailProviderInterface
24+
{
25+
/**
26+
* Retrieve detailed information about validator state and differences found
27+
*
28+
* @return array
29+
*/
30+
public function getDetails() : array;
31+
}

lib/internal/Magento/Framework/Setup/OldDbValidator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* Used in order to support backward compatibility of modules that are installed
1717
* in old way (with Install/Upgrade Schema/Data scripts)
1818
*/
19-
class OldDbValidator implements UpToDateValidatorInterface
19+
class OldDbValidator implements UpToDateValidatorInterface, DetailProviderInterface
2020
{
2121
/**
2222
* @var DbVersionInfo

lib/internal/Magento/Framework/Setup/Patch/UpToDateData.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,12 @@
1010

1111
use Magento\Framework\Module\ModuleList;
1212
use Magento\Framework\Setup\UpToDateValidatorInterface;
13+
use Magento\Framework\Setup\DetailProviderInterface;
1314

1415
/**
1516
* Allows to validate if data patches is up to date or not
1617
*/
17-
class UpToDateData implements UpToDateValidatorInterface
18+
class UpToDateData implements UpToDateValidatorInterface, DetailProviderInterface
1819
{
1920
/**
2021
* @var PatchHistory

lib/internal/Magento/Framework/Setup/Patch/UpToDateSchema.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,12 @@
99

1010
use Magento\Framework\Module\ModuleList;
1111
use Magento\Framework\Setup\UpToDateValidatorInterface;
12+
use Magento\Framework\Setup\DetailProviderInterface;
1213

1314
/**
1415
* Allows to validate if data patches is up to date or not
1516
*/
16-
class UpToDateSchema implements UpToDateValidatorInterface
17+
class UpToDateSchema implements UpToDateValidatorInterface, DetailProviderInterface
1718
{
1819
/**
1920
* @var PatchHistory

lib/internal/Magento/Framework/Setup/UpToDateValidatorInterface.php

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
/**
3-
* Copyright 2018 Adobe
4-
* All Rights Reserved.
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
55
*/
66
declare(strict_types=1);
77

@@ -27,19 +27,12 @@ interface UpToDateValidatorInterface
2727
*
2828
* @return string
2929
*/
30-
public function getNotUpToDateMessage() : string;
30+
public function getNotUpToDateMessage() : string ;
3131

3232
/**
3333
* Validate component whether it is up to date or not
3434
*
3535
* @return bool
3636
*/
37-
public function isUpToDate() : bool;
38-
39-
/**
40-
* Retrieve detailed information about validator state and differences found
41-
*
42-
* @return array
43-
*/
44-
public function getDetails() : array;
37+
public function isUpToDate() : bool ;
4538
}

0 commit comments

Comments
 (0)