Skip to content

Commit 60d02d2

Browse files
committed
AC-13306::Adobe Commerce 2.4.8 core code is compatible with PHP 8.4
1 parent 6223252 commit 60d02d2

File tree

2 files changed

+27
-29
lines changed

2 files changed

+27
-29
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?php
2+
3+
namespace Magento\Framework\Validator;
4+
5+
/**
6+
* Factory class for creating instances of the Regex validator.
7+
*
8+
* Note: This class is included as a stub in static tests to ensure
9+
* compatibility with static analysis tools. When running static tests,
10+
* ensure the corresponding stub is properly placed in the test environment.
11+
*/
12+
class RegexFactory
13+
{
14+
/**
15+
* Create a new Regex validator instance.
16+
*
17+
* @param array $data Optional configuration data for the Regex validator.
18+
* @return Regex
19+
*
20+
* @note During static tests, this method may be tested using the stubbed
21+
* version of this class to avoid dependency injection-related issues.
22+
*/
23+
public function create(array $data = []): Regex
24+
{
25+
return new Regex($data);
26+
}
27+
}

dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,6 @@
2323
*/
2424
class LiveCodeTest extends \PHPUnit\Framework\TestCase
2525
{
26-
/**
27-
* @var \Magento\Framework\Shell
28-
*/
29-
protected $_shell;
30-
31-
/**
32-
* @var string
33-
*/
34-
protected $_command;
35-
3626
/**
3727
* @var string
3828
*/
@@ -43,25 +33,6 @@ class LiveCodeTest extends \PHPUnit\Framework\TestCase
4333
*/
4434
protected static $pathToSource = '';
4535

46-
/**
47-
* @var boolean
48-
*/
49-
protected static $executedCompilation = false;
50-
51-
/**
52-
* Setup compilation
53-
*
54-
* @return void
55-
*/
56-
protected function setUp(): void
57-
{
58-
$this->_shell = new \Magento\Framework\Shell(new \Magento\Framework\Shell\CommandRenderer());
59-
$basePath = BP;
60-
$basePath = str_replace('\\', '/', $basePath);
61-
62-
$this->_command = 'php ' . $basePath . '/bin/magento setup:di:compile';
63-
}
64-
6536
/**
6637
* Setup basics for all tests
6738
*

0 commit comments

Comments
 (0)