chore!: drop support for PHP 7.4

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
This commit is contained in:
Daniel Kesselberg 2022-12-30 15:30:56 +01:00
parent 1896313ce2
commit 040e66154b
No known key found for this signature in database
GPG Key ID: 36E3664E099D0614
53 changed files with 335 additions and 671 deletions

View File

@ -15,7 +15,7 @@ jobs:
- name: Set up php$
uses: shivammathur/setup-php@master
with:
php-version: 7.4
php-version: 8.0
tools: composer:v1
extensions: ctype,curl,dom,gd,iconv,intl,json,mbstring,openssl,posix,sqlite,xml,zip,gmp
coverage: none

View File

@ -6,7 +6,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ['7.4', '8.0', '8.1', '8.2']
php-versions: ['8.0', '8.1', '8.2']
nextcloud-versions: ['master', 'stable25']
name: php${{ matrix.php-versions }} on ${{ matrix.nextcloud-versions }} unit tests
env:
@ -43,6 +43,7 @@ jobs:
file: nextcloud/apps/calendar/clover.unit.xml
flags: php
fail_ci_if_error: true
verbose: true
summary:
runs-on: ubuntu-latest

View File

@ -34,7 +34,7 @@
<screenshot>https://raw.githubusercontent.com/nextcloud/calendar/main/screenshots/week_room_suggestion.png</screenshot>
<screenshot>https://raw.githubusercontent.com/nextcloud/calendar/main/screenshots/week_sidebar.png</screenshot>
<dependencies>
<php min-version="7.4" max-version="8.1" />
<php min-version="8.0" max-version="8.2" />
<nextcloud min-version="25" max-version="26" />
</dependencies>
<background-jobs>

View File

@ -1,12 +1,12 @@
{
"config": {
"platform": {
"php": "7.4"
"php": "8.0"
},
"sort-packages": true
},
"require": {
"php": ">=7.4 <=8.1"
"php": ">=8.0 <=8.2"
},
"require-dev": {
"christophwurst/nextcloud_testing": "0.12.4",

946
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -34,7 +34,6 @@ use OCP\User\Events\UserDeletedEvent;
use function method_exists;
class Application extends App implements IBootstrap {
/** @var string */
public const APP_ID = 'calendar';

View File

@ -42,7 +42,6 @@ use function array_merge;
use function array_values;
class AppointmentConfigController extends Controller {
/** @var AppointmentConfigService */
private $appointmentConfigService;

View File

@ -40,7 +40,6 @@ use OCP\IUserManager;
use RuntimeException;
class AppointmentController extends Controller {
/** @var IUserManager */
private $userManager;

View File

@ -47,7 +47,6 @@ use OCP\Mail\IMailer;
use Psr\Log\LoggerInterface;
class BookingController extends Controller {
/** @var BookingService */
private $bookingService;

View File

@ -40,7 +40,6 @@ use OCP\IRequest;
* @package OCA\Calendar\Controller
*/
class ContactController extends Controller {
/** @var IManager */
private $contactsManager;

View File

@ -44,7 +44,6 @@ use OCP\Mail\IMessage;
* @package OCA\Calendar\Controller
*/
class EmailController extends Controller {
/** @var IConfig */
private $config;

View File

@ -40,7 +40,6 @@ use OCP\IURLGenerator;
* @package OCA\Calendar\Controller
*/
class PublicViewController extends Controller {
/**
* @var IConfig
*/

View File

@ -35,7 +35,6 @@ use OCP\IRequest;
* @package OCA\Calendar\Controller
*/
class SettingsController extends Controller {
/** @var IConfig */
private $config;

View File

@ -38,7 +38,6 @@ use OCP\IRequest;
use function in_array;
class ViewController extends Controller {
/** @var IConfig */
private $config;

View File

@ -73,7 +73,6 @@ use function json_encode;
* @method void setFutureLimit(?int $limit)
*/
class AppointmentConfig extends Entity implements JsonSerializable {
/** @var string */
protected $token;

View File

@ -55,7 +55,6 @@ use ReturnTypeWillChange;
* @method void setConfirmed(bool $confirm)
*/
class Booking extends Entity implements JsonSerializable {
/** @var int */
protected $apptConfigId;

View File

@ -29,7 +29,6 @@ use Exception;
use Throwable;
class ClientException extends Exception {
/** @var int|null */
private $httpCode;

View File

@ -27,7 +27,6 @@ use Exception;
use Throwable;
class ServiceException extends Exception {
/** @var int|null */
private $httpCode;

View File

@ -33,7 +33,6 @@ use OCP\User\Events\UserDeletedEvent;
use Psr\Log\LoggerInterface;
class UserDeletedListener implements IEventListener {
/** @var AppointmentConfigService */
private $appointmentConfigService;

View File

@ -31,7 +31,6 @@ use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
class Version2040Date20210908101001 extends SimpleMigrationStep {
/**
* @param IOutput $output
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`

View File

@ -31,8 +31,6 @@ use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
class Version3000Date20211109132439 extends SimpleMigrationStep {
/**
* @param IOutput $output
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`

View File

@ -31,7 +31,6 @@ use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
class Version3010Date20220111090252 extends SimpleMigrationStep {
/**
* @param IOutput $output
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`

View File

@ -36,7 +36,6 @@ use OCP\Profile\ILinkAction;
use function count;
class AppointmentsAction implements ILinkAction {
/** @var IL10N */
private $l10n;

View File

@ -39,7 +39,6 @@ use OCP\IUser;
use OCP\Security\ISecureRandom;
class AppointmentConfigService {
/** @var AppointmentConfigMapper */
private $mapper;

View File

@ -36,7 +36,6 @@ use function max;
use function min;
class AvailabilityGenerator {
/** @var ITimeFactory */
private $timeFactory;

View File

@ -41,7 +41,6 @@ use Sabre\VObject\Component\VCalendar;
use function abs;
class BookingCalendarWriter {
/** @var IConfig */
private $config;

View File

@ -45,7 +45,6 @@ use Psr\Log\LoggerInterface;
use function count;
class BookingService {
/** @var int the expiry of a booking confirmation */
public const EXPIRY = 86400;

View File

@ -33,7 +33,6 @@ use function array_values;
use function count;
class DailyLimitFilter {
/** @var IManager */
private $calendarManger;

View File

@ -33,7 +33,6 @@ use Psr\Log\LoggerInterface;
use function array_filter;
class EventConflictFilter {
/** @var IManager */
private $calendarManager;
private $logger;

View File

@ -33,7 +33,6 @@ use JsonSerializable;
* @psalm-immutable
*/
class Interval implements JsonSerializable {
/** @var int */
private $start;

View File

@ -42,7 +42,6 @@ use Psr\Log\LoggerInterface;
use function implode;
class MailService {
/** @var IUserManager */
private $userManager;
/** @var IMailer */

View File

@ -28,7 +28,6 @@ namespace OCA\Calendar\Service\Appointments;
use OCA\Calendar\Db\AppointmentConfig;
class SlotExtrapolator {
/**
* @param AppointmentConfig $config
* @param Interval[] $availabilityIntervals

View File

@ -29,7 +29,6 @@ use OCP\IUserSession;
use ReturnTypeWillChange;
class JSDataService implements \JsonSerializable {
/** @var IConfig */
private $config;

View File

@ -34,7 +34,6 @@ use PHPUnit\Framework\MockObject\MockObject;
use Psr\Log\LoggerInterface;
class CleanupOutdatedBookingJobTest extends TestCase {
/** @var CleanUpOutdatedBookingsJob */
private $job;

View File

@ -38,7 +38,6 @@ use PHPUnit\Framework\MockObject\MockObject;
use Psr\Log\LoggerInterface;
class AppointmentConfigControllerTest extends TestCase {
/** @var IRequest|MockObject */
private $request;

View File

@ -38,7 +38,6 @@ use OCP\IUserManager;
use PHPUnit\Framework\MockObject\MockObject;
class AppointmentControllerTest extends TestCase {
/** @var string */
protected $appName;

View File

@ -38,7 +38,6 @@ use OCP\IUserManager;
use PHPUnit\Framework\MockObject\MockObject;
class AppointmentControllerVisitorTest extends TestCase {
/** @var string */
protected $appName;

View File

@ -48,7 +48,6 @@ use Psr\Log\LoggerInterface;
use Safe\DateTimeImmutable;
class BookingControllerTest extends TestCase {
/** @var string */
protected $appName;

View File

@ -30,7 +30,6 @@ use ChristophWurst\Nextcloud\Testing\TestCase;
use PHPUnit\Framework\MockObject\MockObject;
class ContactControllerTest extends TestCase {
/** @var string */
protected $appName;

View File

@ -38,7 +38,6 @@ use ChristophWurst\Nextcloud\Testing\TestCase;
use PHPUnit\Framework\MockObject\MockObject;
class EmailControllerTest extends TestCase {
/** @var string */
private $appName;

View File

@ -34,7 +34,6 @@ use ChristophWurst\Nextcloud\Testing\TestCase;
use PHPUnit\Framework\MockObject\MockObject;
class PublicViewControllerTest extends TestCase {
/** @var string */
private $appName;

View File

@ -29,7 +29,6 @@ use ChristophWurst\Nextcloud\Testing\TestCase;
use PHPUnit\Framework\MockObject\MockObject;
class SettingsControllerTest extends TestCase {
/** @var string */
private $appName;

View File

@ -37,7 +37,6 @@ use ChristophWurst\Nextcloud\Testing\TestCase;
use PHPUnit\Framework\MockObject\MockObject;
class ViewControllerTest extends TestCase {
/** @var string */
private $appName;

View File

@ -38,7 +38,6 @@ use Safe\DateTimeImmutable;
use Test\TestCase;
class CalendarWidgetTest extends TestCase {
/** @var IL10N|MockObject */
private $l10n;

View File

@ -32,7 +32,6 @@ use OCP\IUser;
use OCP\User\Events\UserDeletedEvent;
class UserDeletedListenerTest extends TestCase {
/** @var \ChristophWurst\Nextcloud\Testing\ServiceMockObject */
private $serviceMock;

View File

@ -31,7 +31,6 @@ use OCA\Calendar\Service\Appointments\AppointmentConfigService;
use OCP\IUser;
class AppointmentConfigServiceTest extends TestCase {
/** @var ServiceMockObject */
private $serviceMock;

View File

@ -36,7 +36,6 @@ use OCP\Calendar\ICalendarQuery;
use PHPUnit\Framework\MockObject\MockObject;
class AvailabilityGeneratorTest extends TestCase {
/** @var ITimeFactory|MockObject */
private $timeFactory;

View File

@ -49,7 +49,6 @@ use Psr\Log\LoggerInterface;
use Safe\DateTimeImmutable;
class BookingServiceTest extends TestCase {
/** @var AvailabilityGenerator|MockObject */
private $availabilityGenerator;

View File

@ -37,7 +37,6 @@ use PHPUnit\Framework\MockObject\MockObject;
* @requires OCP\Calendar\ICalendarQuery::newQuery
*/
class DailyLimitFilterTest extends TestCase {
/** @var IManager|MockObject */
private $manager;

View File

@ -35,7 +35,6 @@ use PHPUnit\Framework\MockObject\MockObject;
use Psr\Log\LoggerInterface;
class EventConflictFilterTest extends TestCase {
/** @var IManager|MockObject */
private $calendarManager;

View File

@ -46,7 +46,6 @@ use PHPUnit\Framework\MockObject\MockObject;
use Psr\Log\LoggerInterface;
class MailServiceTest extends TestCase {
/** @var mixed|IUserManager|MockObject */
private $userManager;

View File

@ -32,7 +32,6 @@ use OCA\Calendar\Service\Appointments\SlotExtrapolator;
use OCP\Calendar\ICalendarQuery;
class SlotExtrapolatorTest extends TestCase {
/** @var SlotExtrapolator */
private $extrapolator;

View File

@ -31,7 +31,6 @@ use OCP\IUserSession;
use PHPUnit\Framework\MockObject\MockObject;
class JsDataServiceTest extends TestCase {
/** @var IConfig|MockObject */
private $config;