Skip to content

Commit e85da89

Browse files
committed
ACPT-1696: Fix SVC test failures on Application-Server branch
1 parent 60865b6 commit e85da89

File tree

6 files changed

+20
-20
lines changed

6 files changed

+20
-20
lines changed

app/code/Magento/ApplicationPerformanceMonitor/Profiler/Metric.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,21 @@
1414
class Metric
1515
{
1616
/**
17-
* @param int $type
17+
* @param string $type
1818
* @param string $name
1919
* @param mixed $value
2020
* @param bool $verbose
2121
*/
2222
public function __construct(
23-
private readonly MetricType $type,
23+
private readonly string $type,
2424
private readonly string $name,
2525
private readonly mixed $value,
2626
private readonly bool $verbose,
2727
) {
2828
}
2929

3030
/**
31-
* @return MetricType
31+
* @return string
3232
*/
3333
public function getType()
3434
{

app/code/Magento/ApplicationPerformanceMonitor/Profiler/MetricType.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
/**
1111
* Enum for which type of metric
1212
*/
13-
enum MetricType
13+
class MetricType
1414
{
15-
case Other;
16-
case SecondsElapsedFloat;
17-
case UnixTimestampFloat;
18-
case MemorySizeInt;
15+
public const Other = "Other";
16+
public const SecondsElapsedFloat = "SecondsElapsedFloat";
17+
public const UnixTimestampFloat = "UnixTimestampFloat";
18+
public const MemorySizeInt = "MemorySizeInt";
1919
}

lib/internal/Magento/Framework/TestFramework/ApplicationStateComparator/Collector.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public function __construct(
4848
*/
4949
private function copyArray(
5050
array $array,
51-
CompareType $compareType,
51+
string $compareType,
5252
int $recursionLevel,
5353
int $arrayRecursionLevel = 100
5454
) : array {
@@ -86,10 +86,10 @@ function ($element) use (
8686
/**
8787
* Gets shared objects from ObjectManager using reflection and copies properties that are objects
8888
*
89-
* @param ShouldResetState $shouldResetState
89+
* @param string $shouldResetState
9090
* @return CollectedObject[]
9191
*/
92-
public function getSharedObjects(ShouldResetState $shouldResetState): array
92+
public function getSharedObjects(string $shouldResetState): array
9393
{
9494
if ($this->objectManager instanceof ObjectManagerInterface) {
9595
$sharedInstances = $this->objectManager->getSharedInstances();
@@ -159,7 +159,7 @@ public function getPropertiesConstructedAndCurrent(): array
159159
*/
160160
public function getPropertiesFromObject(
161161
object $object,
162-
CompareType $compareType,
162+
string $compareType,
163163
int $recursionLevel = 0,
164164
): CollectedObject {
165165
$className = get_class($object);

lib/internal/Magento/Framework/TestFramework/ApplicationStateComparator/CompareType.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
/**
1111
* What type of comparison
1212
*/
13-
enum CompareType
13+
class CompareType
1414
{
15-
case CompareBetweenRequests;
16-
case CompareConstructedAgainstCurrent;
15+
public const CompareBetweenRequests = "CompareBetweenRequests";
16+
public const CompareConstructedAgainstCurrent = "CompareConstructedAgainstCurrent";
1717
}

lib/internal/Magento/Framework/TestFramework/ApplicationStateComparator/ShouldResetState.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77

88
namespace Magento\Framework\TestFramework\ApplicationStateComparator;
99

10-
enum ShouldResetState
10+
class ShouldResetState
1111
{
12-
case DoResetState;
13-
case DoNotResetState;
12+
public const DoResetState = "DoResetState";
13+
public const DoNotResetState = "DoNotResetState";
1414
}

lib/internal/Magento/Framework/TestFramework/ApplicationStateComparator/SkipListAndFilterList.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ public function filterProperties(array $properties, array $propertiesToFilterLis
4343
* Gets skipList, loading it if needed
4444
*
4545
* @param string $operationName
46-
* @param CompareType $compareType
46+
* @param string $compareType
4747
* @return array
4848
*/
49-
public function getSkipList(string $operationName, CompareType $compareType): array
49+
public function getSkipList(string $operationName, string $compareType): array
5050
{
5151
if ($this->skipList === null) {
5252
$skipListList = [];

0 commit comments

Comments
 (0)