Skip to content

Commit

Permalink
Upgrade dev tools; raise PHP requirement to 8.1.
Browse files Browse the repository at this point in the history
  • Loading branch information
demiankatz committed Mar 11, 2024
1 parent 63a5939 commit 1e7c6ec
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 27 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ jobs:
VUFIND_LOCAL_DIR: $GITHUB_WORKSPACE/local
strategy:
matrix:
php-version: ['8.0', '8.1', '8.2']
php-version: ['8.1', '8.2', '8.3']
include:
- php-version: 8.0
phing_tasks: "phpunitfast"
- php-version: 8.1
phing_tasks: "phpunitfast"
- php-version: 8.2
phing_tasks: "phpunitfast"
- php-version: 8.3
phing_tasks: "phpunitfast phpcs-console php-cs-fixer-dryrun phpstan-console"

steps:
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ All notable changes to this project will be documented in this file, in reverse

### Changed

- The minimum PHP version requirement has been raised to 8.0.
- The minimum PHP version requirement has been raised to 8.1.
- The str_starts_with and str_ends_with functions have been used instead of substr where possible.

### Deprecated
Expand Down
16 changes: 8 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,19 @@
},
"config": {
"platform": {
"php": "8.0"
"php": "8.1"
}
},
"require": {
"php": ">=8.0"
"php": ">=8.1"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "3.26.1",
"pear/http_request2": "2.5.1",
"phpmd/phpmd": "2.13.0",
"phpstan/phpstan": "1.10.34",
"phpunit/phpunit": "9.6.12",
"friendsofphp/php-cs-fixer": "3.51.0",
"pear/http_request2": "2.6.0",
"phpmd/phpmd": "2.15.0",
"phpstan/phpstan": "1.10.59",
"phpunit/phpunit": "10.5.11",
"phing/phing": "2.17.4",
"squizlabs/php_codesniffer": "3.7.2"
"squizlabs/php_codesniffer": "3.9.0"
}
}
6 changes: 3 additions & 3 deletions tests/ISBNTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public function testValidISBN10($raw, $isbn10, $isbn13)
*
* @return array
*/
public function validISBN10()
public static function validISBN10()
{
return [
'ISBN-10 plain' => ['0123456789', '0123456789', '9780123456786'],
Expand Down Expand Up @@ -123,7 +123,7 @@ public function testInvalidISBN($raw)
*
* @return array
*/
public function invalidISBN()
public static function invalidISBN()
{
return [
'empty' => [''],
Expand Down Expand Up @@ -157,7 +157,7 @@ public function testNormalizeISBN($raw, $isbn)
*
* @return array
*/
public function normalizeISBN()
public static function normalizeISBN()
{
return [
['', ''],
Expand Down
6 changes: 3 additions & 3 deletions tests/ISMNTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public function testValidISMN10($raw, $ismn10, $ismn13)
*
* @return array
*/
public function validISMN10()
public static function validISMN10()
{
return [
'ISMN-10 plain' => ['M230671187', 'M230671187', '9790230671187'],
Expand Down Expand Up @@ -122,7 +122,7 @@ public function testInvalidISMN($raw)
*
* @return array
*/
public function invalidISMN()
public static function invalidISMN()
{
return [
'empty' => [''],
Expand Down Expand Up @@ -156,7 +156,7 @@ public function testNormalizeISMN($raw, $ismn)
*
* @return array
*/
public function normalizeISMN()
public static function normalizeISMN()
{
return [
['', ''],
Expand Down
16 changes: 10 additions & 6 deletions tests/phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
<?xml version="1.0"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
<coverage includeUncoveredFiles="true">
<include>
<directory suffix=".php">../src/VuFindCode</directory>
</include>
</coverage>
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
backupGlobals="false"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
displayDetailsOnTestsThatTriggerWarnings="true">
<testsuites>
<testsuite name="AllUnitTests">
<directory>.</directory>
</testsuite>
</testsuites>
<source>
<include>
<directory suffix=".php">../src</directory>
</include>
</source>
</phpunit>
6 changes: 3 additions & 3 deletions tests/vufind.php-cs-fixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
->in(__DIR__ . '/../src');

$rules = [
'@PHP80Migration' => true,
'@PHPUnit84Migration:risky' => true,
'@PHP81Migration' => true,
'@PHPUnit100Migration:risky' => true,
'@PSR12' => true,
'align_multiline_comment' => true,
'binary_operator_spaces' => [
Expand Down Expand Up @@ -44,8 +44,8 @@
'no_php4_constructor' => true,
'no_singleline_whitespace_before_semicolons' => true,
'no_spaces_around_offset' => true,
'no_unneeded_braces' => true,
'no_unneeded_control_parentheses' => true,
'no_unneeded_curly_braces' => true,
'no_unneeded_final_method' => true,
'no_unreachable_default_argument_value' => true,
'no_unused_imports' => true,
Expand Down

0 comments on commit 1e7c6ec

Please sign in to comment.