Skip to content

Commit

Permalink
drop support for PHP < 7.4, fix PHP 8.4 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
xabbuh committed May 2, 2024
1 parent 83ee6f3 commit 8b743b3
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [ '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3' ]
php: [ '7.4', '8.0', '8.1', '8.2', '8.3', '8.4' ]
operating-system: [ ubuntu-latest ]
composer_flags: [ '' ]
include:
- php: '5.5'
- php: '7.4'
composer_flags: '--prefer-lowest'
operating-system: ubuntu-latest
- php: '7.0'
- php: '8.0'
composer_flags: '--prefer-lowest'
operating-system: ubuntu-latest
- php: '8.1'
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
}
],
"require": {
"php": "^5.5 || ^7.0 || ^8.0",
"php": "^7.4 || ^8.0",
"ext-dom": "*",
"ext-libxml": "*",
"symfony/css-selector": "^2.7 || ^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0"
Expand Down
4 changes: 2 additions & 2 deletions src/Css/Property/Processor.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ private function cleanup($string)
*
* @return Property|null
*/
public function convertToObject($property, Specificity $specificity = null)
public function convertToObject($property, ?Specificity $specificity = null)
{
if (strpos($property, ':') === false) {
return null;
Expand All @@ -91,7 +91,7 @@ public function convertToObject($property, Specificity $specificity = null)
*
* @return Property[]
*/
public function convertArrayToObjects(array $properties, Specificity $specificity = null)
public function convertArrayToObjects(array $properties, ?Specificity $specificity = null)
{
$objects = array();

Expand Down
2 changes: 1 addition & 1 deletion src/Css/Property/Property.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ final class Property
* @param string $value
* @param Specificity|null $specificity
*/
public function __construct($name, $value, Specificity $specificity = null)
public function __construct($name, $value, ?Specificity $specificity = null)
{
$this->name = $name;
$this->value = $value;
Expand Down

0 comments on commit 8b743b3

Please sign in to comment.