Skip to content

Commit 29248f7

Browse files
Add support for PHP 8.5
1 parent 3739381 commit 29248f7

8 files changed

Lines changed: 20 additions & 62 deletions

File tree

.cs.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
'array_syntax' => ['syntax' => 'short'],
2020
'cast_spaces' => ['space' => 'none'],
2121
'concat_space' => ['spacing' => 'one'],
22-
'compact_nullable_typehint' => true,
22+
'compact_nullable_type_declaration' => true,
2323
'declare_equal_normalize' => ['space' => 'single'],
2424
'general_phpdoc_annotation_remove' => [
2525
'annotations' => [
@@ -36,7 +36,11 @@
3636
'phpdoc_order' => true, // psr-5
3737
'phpdoc_no_useless_inheritdoc' => false,
3838
'protected_to_private' => false,
39-
'yoda_style' => false,
39+
'yoda_style' => [
40+
'equal' => false,
41+
'identical' => false,
42+
'less_and_greater' => false
43+
],
4044
'method_argument_space' => ['on_multiline' => 'ensure_fully_multiline'],
4145
'ordered_imports' => [
4246
'sort_algorithm' => 'alpha',

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
strategy:
99
matrix:
1010
operating-system: [ ubuntu-latest ]
11-
php-versions: [ '8.1', '8.2' ]
11+
php-versions: [ '8.2', '8.3', '8.4', '8.5' ]
1212
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}
1313

1414
steps:

.scrutinizer.yml

Lines changed: 0 additions & 41 deletions
This file was deleted.

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# The MIT License (MIT)
22

3-
Copyright (c) 2023 odan
3+
Copyright (c) 2026 odan
44

55
> Permission is hereby granted, free of charge, to any person obtaining a copy
66
> of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
[![Latest Version on Packagist](https://img.shields.io/github/release/selective-php/base32.svg)](https://packagist.org/packages/selective/base32)
44
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg)](LICENSE.md)
55
[![Build Status](https://github.com/selective-php/base32/workflows/build/badge.svg)](https://github.com/selective-php/base32/actions)
6-
[![Coverage Status](https://scrutinizer-ci.com/g/selective-php/base32/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/selective-php/base32/code-structure)
7-
[![Quality Score](https://scrutinizer-ci.com/g/selective-php/base32/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/selective-php/base32/?branch=master)
86
[![Total Downloads](https://img.shields.io/packagist/dt/selective/base32.svg)](https://packagist.org/packages/selective/base32/stats)
97

108
Base32 string encoder based on [RFC 4648](https://tools.ietf.org/html/rfc4648#section-6).
@@ -19,7 +17,7 @@ $ composer require selective/base32
1917

2018
## Requirements
2119

22-
* PHP 8.1+
20+
* PHP 8.2 - 8.5
2321

2422
## Usage
2523

composer.json

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
],
1313
"homepage": "https://github.com/selective-php/base32",
1414
"require": {
15-
"php": "^8.1"
15+
"php": "~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0"
1616
},
1717
"require-dev": {
1818
"friendsofphp/php-cs-fixer": "^3",
19-
"phpstan/phpstan": "^1",
20-
"phpunit/phpunit": "^10",
19+
"phpstan/phpstan": "^2",
20+
"phpunit/phpunit": "^11",
2121
"squizlabs/php_codesniffer": "^3"
2222
},
2323
"autoload": {
@@ -35,12 +35,10 @@
3535
},
3636
"scripts": {
3737
"cs:check": [
38-
"@putenv PHP_CS_FIXER_IGNORE_ENV=1",
39-
"php-cs-fixer fix --dry-run --format=txt --verbose --diff --config=.cs.php --ansi"
38+
"php-cs-fixer fix --dry-run --format=txt --verbose --diff --config=.cs.php --ansi --allow-unsupported-php-version=yes"
4039
],
4140
"cs:fix": [
42-
"@putenv PHP_CS_FIXER_IGNORE_ENV=1",
43-
"php-cs-fixer fix --config=.cs.php --ansi --verbose"
41+
"php-cs-fixer fix --config=.cs.php --ansi --verbose --allow-unsupported-php-version=yes"
4442
],
4543
"sniffer:check": "phpcs --standard=phpcs.xml",
4644
"sniffer:fix": "phpcbf --standard=phpcs.xml",

phpunit.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
bootstrap="vendor/autoload.php"
44
colors="true"
55
backupGlobals="false"
6-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.3/phpunit.xsd"
6+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.5/phpunit.xsd"
77
cacheDirectory=".phpunit.cache"
88
backupStaticProperties="false">
99
<coverage/>

tests/Base32Test.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,22 @@
22

33
namespace Selective\Base32\Test;
44

5+
use PHPUnit\Framework\Attributes\CoversClass;
6+
use PHPUnit\Framework\Attributes\CoversMethod;
57
use PHPUnit\Framework\TestCase;
68
use Selective\Base32\Base32;
79

810
/**
911
* Test.
10-
*
11-
* @coversDefaultClass \Selective\Base32\Base32
1212
*/
13+
#[CoversClass(Base32::class)]
14+
#[CoversMethod(Base32::class, 'encode')]
15+
#[CoversMethod(Base32::class, 'decode')]
1316
class Base32Test extends TestCase
1417
{
1518
/**
1619
* Test.
1720
*
18-
* @covers ::encode
19-
*
2021
* @return void
2122
*/
2223
public function testEncode()
@@ -39,8 +40,6 @@ public function testEncode()
3940
/**
4041
* Test.
4142
*
42-
* @covers ::decode
43-
*
4443
* @return void
4544
*/
4645
public function testDecode()

0 commit comments

Comments
 (0)