Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PHP 8.4 support #1556

Merged
merged 2 commits into from
Jul 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php-versions: [ '7.4', '8.0', '8.1', '8.2', '8.3']
php-versions: [ '7.4', '8.0', '8.1', '8.2', '8.3', '8.4' ]
coverage: [ 'xdebug' ]
streaming: [ false ]
include:
Expand Down
2 changes: 1 addition & 1 deletion lib/CardDAV/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,7 @@ protected function negotiateVCard($input, &$mimeType = null)
*
* @return string
*/
protected function convertVCard($data, $target, array $propertiesFilter = null)
protected function convertVCard($data, $target, ?array $propertiesFilter = null)
{
if (is_resource($data)) {
$data = stream_get_contents($data);
Expand Down
2 changes: 1 addition & 1 deletion lib/CardDAV/Xml/Property/SupportedAddressData.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class SupportedAddressData implements XmlSerializable
/**
* Creates the property.
*/
public function __construct(array $supportedData = null)
public function __construct(?array $supportedData = null)
{
if (is_null($supportedData)) {
$supportedData = [
Expand Down
2 changes: 1 addition & 1 deletion lib/DAV/Auth/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class Plugin extends ServerPlugin
*
* @param Backend\BackendInterface $authBackend
*/
public function __construct(Backend\BackendInterface $authBackend = null)
public function __construct(?Backend\BackendInterface $authBackend = null)
{
if (!is_null($authBackend)) {
$this->addBackend($authBackend);
Expand Down
2 changes: 1 addition & 1 deletion lib/DAV/Exception/Locked.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class Locked extends DAV\Exception
*
* @param DAV\Locks\LockInfo $lock
*/
public function __construct(DAV\Locks\LockInfo $lock = null)
public function __construct(?DAV\Locks\LockInfo $lock = null)
{
parent::__construct();

Expand Down
4 changes: 2 additions & 2 deletions lib/DAV/Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ class Server implements LoggerAwareInterface, EmitterInterface
*
* @throws Exception
*/
public function __construct($treeOrNode = null, HTTP\Sapi $sapi = null)
public function __construct($treeOrNode = null, ?HTTP\Sapi $sapi = null)
{
if ($treeOrNode instanceof Tree) {
$this->tree = $treeOrNode;
Expand Down Expand Up @@ -882,7 +882,7 @@ public function getHTTPHeaders($path)
*
* @return \Traversable
*/
private function generatePathNodes(PropFind $propFind, array $yieldFirst = null)
private function generatePathNodes(PropFind $propFind, ?array $yieldFirst = null)
{
if (null !== $yieldFirst) {
yield $yieldFirst;
Expand Down
2 changes: 1 addition & 1 deletion tests/Sabre/CalDAV/SharedCalendarTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class SharedCalendarTest extends \PHPUnit\Framework\TestCase
{
protected $backend;

public function getInstance(array $props = null)
public function getInstance(?array $props = null)
{
if (is_null($props)) {
$props = [
Expand Down
2 changes: 1 addition & 1 deletion tests/Sabre/DAV/Mock/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class Collection extends DAV\Collection
* @param string $name
* @param Collection $parent
*/
public function __construct($name, array $children = [], Collection $parent = null)
public function __construct($name, array $children = [], ?Collection $parent = null)
{
$this->name = $name;
foreach ($children as $key => $value) {
Expand Down
2 changes: 1 addition & 1 deletion tests/Sabre/DAV/Mock/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class File extends DAV\File
* @param Collection $parent
* @param int $lastModified
*/
public function __construct($name, $contents, Collection $parent = null, $lastModified = -1)
public function __construct($name, $contents, ?Collection $parent = null, $lastModified = -1)
{
$this->name = $name;
$this->put($contents);
Expand Down
2 changes: 1 addition & 1 deletion tests/Sabre/DAVACL/PrincipalBackend/Mock.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class Mock extends AbstractBackend
public $groupMembers = [];
public $principals;

public function __construct(array $principals = null)
public function __construct(?array $principals = null)
{
$this->principals = $principals;

Expand Down