Skip to content

Commit 1bdf5dd

Browse files
authored
Add support for PHP 8.4 and update code accordingly (#28)
* Add support for PHP 8.4 and update code accordingly This commit updates the GitHub workflow to include PHP 8.4 in the matrix and modifies constructor signatures in `CanonicalRange.php` and `Range.php` to handle nullability better, aligning with new PHP 8.4 standards. Additionally, minor corrections are made in `README.md` and `.gitignore` to improve clarity and ignore the new PHPUnit cache files. * Update PHP-Laravel matrix in GitHub Actions workflow Added tests for Laravel 8 with PHP versions 8.2, 8.3, and 8.4. Removed tests for Laravel 11 with PHP versions 8.2, 8.3, and 8.4 to streamline testing focus. This ensures compatibility checks with relevant Laravel versions for current PHP environments. * Remove redundant PHP and Laravel version combinations This change eliminates unnecessary PHP 8.2, 8.3, and 8.4 configurations with Laravel 8.*, streamlining the CI workflow. By focusing on the essential version pairings, we maintain clarity and improve the maintainability of our build matrix.
1 parent 087f480 commit 1bdf5dd

File tree

6 files changed

+47
-6
lines changed

6 files changed

+47
-6
lines changed

.github/workflows/main.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
strategy:
3636
fail-fast: false
3737
matrix:
38-
php: [ 8.3, 8.2, 8.1, 8.0, 7.4 ]
38+
php: [ 8.4, 8.3, 8.2, 8.1, 8.0, 7.4 ]
3939
laravel: [ 11.*, 10.*, 9.*, 8.*, 7.* ]
4040
dependency-version: [ prefer-lowest, prefer-stable ]
4141
exclude:
@@ -47,12 +47,16 @@ jobs:
4747
dependency-version: prefer-lowest
4848
- php: 8.3
4949
dependency-version: prefer-lowest
50+
- php: 8.4
51+
dependency-version: prefer-lowest
5052
- php: 8.1
5153
laravel: 7.*
5254
- php: 8.2
5355
laravel: 7.*
5456
- php: 8.3
5557
laravel: 7.*
58+
- php: 8.4
59+
laravel: 7.*
5660
- php: 7.4
5761
laravel: 9.*
5862
- php: 7.4

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ vendor
33
coverage
44
.idea
55
/.phpunit.result.cache
6+
/.phpunit.cache
67
composer.lock

CHANGELOG.md

+37-1
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,47 @@ All notable changes to `postrges-range` will be documented in this file
44

55
## [Unreleased]
66

7+
## [1.2.3] - 2024-03-22
8+
9+
### Added
10+
11+
- Added support for PHP 8.4: [Implicitly nullable parameter declarations deprecated](https://php.watch/versions/8.4/implicitly-marking-parameter-type-nullable-deprecated) [@isalcedo](https://github.com/isalcedo)
12+
13+
## [1.2.2] - 2024-03-22
14+
15+
### Added
16+
17+
- Update laravel to v11 and other composer dependencies by [@Arthur-Sk](https://github.com/Arthur-Sk)
18+
19+
## [1.2.1] - 2023-02-16
20+
21+
### Added
22+
23+
- added support for laravel 10
24+
25+
## [1.2.0] - 2022-12-06
26+
27+
### Added
28+
29+
- added getters for boundaries by [@lunain84](https://github.com/lunain84)
30+
31+
## [1.1.3] - 2022-02-08
32+
33+
### Added
34+
35+
- support for laravel 9
36+
37+
## [1.1.2] - 2021-11-07
38+
39+
### Added
40+
41+
- updated github workflow strategy
42+
743
## [1.1.1] - 2020-12-07
844

945
### Added
1046

11-
- supprot for php 8
47+
- support for php 8
1248

1349
## [1.1.0] - 2020-09-26
1450

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@
88
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/belamov/postgres-range/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/belamov/postgres-range/?branch=master)
99
[![Total Downloads](https://img.shields.io/packagist/dt/belamov/postgres-range.svg?style=flat-square)](https://packagist.org/packages/belamov/postgres-range)
1010

11-
This package provides support of PostgreSQL's range types for Laravel 7+.
11+
This package provides support for PostgreSQL's range types for Laravel 7+.
1212

1313
Please check the [documentation](https://belamov.github.io/postgres-range)
1414

1515
### Changelog
1616

17-
Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.
17+
Please see [CHANGELOG](CHANGELOG.md) for more information about what has changed recently.
1818

1919
## Contributing
2020

src/Ranges/CanonicalRange.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*/
1010
abstract class CanonicalRange extends Range
1111
{
12-
public function __construct(string $from = null, string $to = null, $fromBound = '[', $toBound = ')')
12+
public function __construct(?string $from = null, ?string $to = null, string $fromBound = '[', string $toBound = ')')
1313
{
1414
parent::__construct($from, $to, $fromBound, $toBound);
1515
$this->canonicalizeBoundaries();

src/Ranges/Range.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ abstract class Range
99
protected ?string $from;
1010
protected ?string $to;
1111

12-
public function __construct(string $from = null, string $to = null, $fromBound = '[', $toBound = ')')
12+
public function __construct(?string $from = null, ?string $to = null, string $fromBound = '[', string $toBound = ')')
1313
{
1414
$this->from = $from;
1515
$this->to = $to;

0 commit comments

Comments
 (0)