1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-13 20:24:08 +02:00

Merge pull request #6838 from rxu/ticket/17535

[ticket/17535] Upgrade PHPUnit to version 10
This commit is contained in:
Marc Alexander
2025-07-30 13:48:49 +02:00
committed by GitHub
248 changed files with 1637 additions and 1555 deletions

View File

@@ -65,7 +65,7 @@
"laravel/homestead": "~14.4",
"misantron/dbunit": "~5.0",
"phing/phing": "~2.4",
"phpunit/phpunit": "^9.0",
"phpunit/phpunit": "^10.0",
"squizlabs/php_codesniffer": "~3.4",
"symfony/browser-kit": "^6.3",
"symfony/css-selector": "^6.3",

609
phpBB/composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -556,6 +556,7 @@ class compress_tar extends compress
{
var $isgz = false;
var $isbz = false;
var $file = '';
var $filename = '';
var $mode = '';
var $type = '';

View File

@@ -31,32 +31,32 @@ abstract class base implements \phpbb\cache\driver\driver_interface
try
{
$iterator = new \DirectoryIterator($this->cache_dir);
foreach ($iterator as $fileInfo)
{
if ($fileInfo->isDot())
{
continue;
}
$filename = $fileInfo->getFilename();
if ($fileInfo->isDir())
{
$this->remove_dir($fileInfo->getPathname());
}
else if (strpos($filename, 'container_') === 0 ||
strpos($filename, 'autoload_') === 0 ||
strpos($filename, 'url_matcher') === 0 ||
strpos($filename, 'url_generator') === 0 ||
strpos($filename, 'sql_') === 0 ||
strpos($filename, 'data_') === 0)
{
$this->remove_file($fileInfo->getPathname());
}
}
}
catch (\Exception $e)
{
return;
}
foreach ($iterator as $fileInfo)
{
if ($fileInfo->isDot())
{
continue;
}
$filename = $fileInfo->getFilename();
if ($fileInfo->isDir())
{
$this->remove_dir($fileInfo->getPathname());
}
else if (strpos($filename, 'container_') === 0 ||
strpos($filename, 'autoload_') === 0 ||
strpos($filename, 'url_matcher') === 0 ||
strpos($filename, 'url_generator') === 0 ||
strpos($filename, 'sql_') === 0 ||
strpos($filename, 'data_') === 0)
{
$this->remove_file($fileInfo->getPathname());
}
// Do not return, to purge vars cached in memory
}
unset($this->vars);

View File

@@ -45,6 +45,19 @@ abstract class memory extends \phpbb\cache\driver\base
}
}
/**
* {@inheritDoc}
*/
function purge()
{
parent::purge();
$this->is_modified = true;
// We save here to let the following cache hits succeed
$this->save();
}
/**
* {@inheritDoc}
*/

View File

@@ -141,7 +141,7 @@ class redis extends \phpbb\cache\driver\memory
*/
protected function _delete(string $var): bool
{
if ($this->redis->delete($var) > 0)
if ($this->redis->del($var) > 0)
{
return true;
}

View File

@@ -573,7 +573,7 @@ class container_builder
}
$config_data = $this->config_php_file->get_all();
if (!empty($config_data))
if (!empty($config_data) && !empty($config_data['dbms']))
{
if ($this->dbal_connection === null)
{
@@ -592,6 +592,10 @@ class container_builder
}
$this->container->set('dbal.conn.driver', $this->dbal_connection);
}
else
{
return;
}
}
/**

View File

@@ -70,11 +70,11 @@ class deactivated_super_global implements \ArrayAccess, \Countable, \IteratorAgg
/**
* Redirects isset to the correct request class call.
*
* @param string $offset The key of the super global being accessed.
* @param mixed $offset The key of the super global being accessed.
*
* @return bool Whether the key on the super global exists.
*/
public function offsetExists($offset): bool
public function offsetExists(mixed $offset): bool
{
return $this->request->is_set($offset, $this->super_global);
}
@@ -82,17 +82,17 @@ class deactivated_super_global implements \ArrayAccess, \Countable, \IteratorAgg
/**#@+
* Part of the \ArrayAccess implementation, will always result in a FATAL error.
*/
public function offsetGet($offset): void
#[\ReturnTypeWillChange] public function offsetGet($offset): void
{
$this->error();
}
public function offsetSet($offset, $value): void
#[\ReturnTypeWillChange] public function offsetSet($offset, $value): void
{
$this->error();
}
public function offsetUnset($offset): void
#[\ReturnTypeWillChange] public function offsetUnset($offset): void
{
$this->error();
}

View File

@@ -27,7 +27,7 @@ class user extends \phpbb\session
protected $language;
var $style = array();
var $date_format;
var $date_format = '';
/**
* DateTimeZone object holding the timezone of the user
@@ -627,12 +627,12 @@ class user extends \phpbb\session
* Format user date
*
* @param int $gmepoch unix timestamp
* @param string|false $format date format in date() notation. | used to indicate relative dates, for example |d m Y|, h:i is translated to Today, h:i.
* @param string $format date format in date() notation. | used to indicate relative dates, for example |d m Y|, h:i is translated to Today, h:i.
* @param bool $forcedate force non-relative date format.
*
* @return mixed translated date
*/
function format_date($gmepoch, $format = false, $forcedate = false)
function format_date($gmepoch, $format = '', $forcedate = false)
{
global $phpbb_dispatcher;
static $utc;