Skip to content

Commit

Permalink
Drop support for PHP < 7.3
Browse files Browse the repository at this point in the history
Ref #119
  • Loading branch information
rlanvin committed Jun 23, 2024
1 parent cb5c6f4 commit b4337c8
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 13 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3']
php: ['7.3', '7.4', '8.0', '8.1', '8.2', '8.3']
name: PHP ${{ matrix.php }}
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Install PHP
uses: shivammathur/setup-php@v2
Expand All @@ -26,7 +26,7 @@ jobs:
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: vendor
key: ${{ matrix.php }}-composer
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"homepage": "https://github.com/rlanvin/php-rrule",
"license": "MIT",
"require": {
"php": ">=5.6.0"
"php": ">=7.3"
},
"suggest": {
"ext-intl": "Intl extension is needed for humanReadable()"
Expand All @@ -22,7 +22,7 @@
}
},
"require-dev": {
"phpunit/phpunit": "^5.7|^6.5|^8.0",
"phpunit/phpunit": "^8.0",
"phpmd/phpmd" : "@stable"
}
}
1 change: 0 additions & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false"
bootstrap="./tests/bootstrap.php"
>
<testsuites>
Expand Down
6 changes: 3 additions & 3 deletions tests/RRuleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2257,7 +2257,7 @@ public function testQuirkyRfcStringsParser($str,$occurrences)
$rule = @ new RRule($str);

if ($occurrences) {
$this->assertEquals($occurrences, $rule->getOccurrences(), '', 1);
$this->assertEquals($occurrences, $rule->getOccurrences());
}
}

Expand Down Expand Up @@ -2803,10 +2803,10 @@ public function testGetRule()
'DTSTART' => '2016-01-01'
);
$rrule = new RRule($array);
$this->assertInternalType('array', $rrule->getRule());
$this->assertIsArray($rrule->getRule());
$rule = $rrule->getRule();
$this->assertEquals('YEARLY', $rule['FREQ']);
$this->assertInternalType('string', $rule['DTSTART']);
$this->assertIsString($rule['DTSTART']);

$rrule = new RRule("DTSTART;TZID=America/New_York:19970901T090000\nRRULE:FREQ=HOURLY;UNTIL=19971224T000000Z;WKST=SU;BYDAY=MO,WE,FR;BYMONTH=1;BYHOUR=1");
$rule = $rrule->getRule();
Expand Down
8 changes: 4 additions & 4 deletions tests/RSetTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -591,13 +591,13 @@ public function testGetter()
'DTSTART' => date_create('1997-09-02 09:00')
));

$this->assertInternalType('array', $rset->getRRules());
$this->assertIsArray($rset->getRRules());
$this->assertCount(2, $rset->getRRules());
$this->assertInternalType('array', $rset->getExRules());
$this->assertIsArray($rset->getExRules());
$this->assertCount(1, $rset->getExRules());
$this->assertInternalType('array', $rset->getDates());
$this->assertIsArray($rset->getDates());
$this->assertCount(3, $rset->getDates());
$this->assertInternalType('array', $rset->getExDates());
$this->assertIsArray($rset->getExDates());
$this->assertCount(0, $rset->getExDates());
}

Expand Down

0 comments on commit b4337c8

Please sign in to comment.