Skip to content

Commit e1a2bfa

Browse files
committed
feat: php7 support dropped
- reafactored for php8.0 - php 8.2 support added
1 parent 9f3e701 commit e1a2bfa

File tree

10 files changed

+245
-611
lines changed

10 files changed

+245
-611
lines changed

.scrutinizer.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ build:
1111
docker: true
1212
redis: false
1313
php:
14-
version: 7.4
14+
version: 8.0
1515
pecl_extensions:
1616
- igbinary
1717
- redis

.travis.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ sudo: false
33
services:
44
- docker
55
php:
6-
- 7.4
76
- 8.0
7+
- 8.1
8+
- nightly
89
before_install:
910
- pecl install -f redis <<< ''
1011
before_script:
@@ -17,7 +18,7 @@ script:
1718
- composer run phpcs
1819
- composer run psalm
1920
after_script:
20-
- if [ $TRAVIS_PHP_VERSION = '7.4' ]; then php vendor/bin/php-coveralls; fi
21+
- if [ $TRAVIS_PHP_VERSION = '8.1' ]; then php vendor/bin/php-coveralls; fi
2122
after_success:
2223
- travis_retry php vendor/bin/php-coveralls -v
2324
- vendor/bin/test-reporter

codeception.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ paths:
1515
output: tests/_output
1616
support: tests/_support
1717
data: tests
18+
extensions:
19+
enabled:
20+
- Codeception\Extension\DotReporter
1821
coverage:
1922
enabled: true
2023
include:

composer.json

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,21 @@
1111
],
1212
"minimum-stability": "stable",
1313
"require": {
14-
"php": "^7.4|^8.0",
15-
"mkorkmaz/redislabs-common": "^0.2.2",
14+
"php": "^8.0",
15+
"mkorkmaz/redislabs-common": "^1.1",
1616
"sevenecks/tableify": "^0.0.5"
1717
},
1818
"require-dev": {
1919
"roave/security-advisories": "dev-master",
20-
"codeception/codeception": "^4.2.1",
21-
"php-coveralls/php-coveralls": "^v2.5.2",
20+
"codeception/codeception": "^5.0.5",
21+
"php-coveralls/php-coveralls": "^v2.5.3",
2222
"squizlabs/php_codesniffer": "^3.7.1",
23-
"predis/predis": "^v1.1.10",
23+
"predis/predis": "^v2.0.3",
2424
"ext-redis": "*",
25-
"codeception/module-asserts": "^1.3.1",
25+
"codeception/module-asserts": "^3.0.0",
2626
"malukenho/mcbumpface": "^1.1.5",
2727
"damianopetrungaro/php-commitizen": "^0.2.0",
28-
"vimeo/psalm": "^4.24.0"
28+
"vimeo/psalm": "^5.1.0"
2929
},
3030
"suggest": {
3131
"predis/predis": "If your application depends on predis.",
@@ -46,5 +46,10 @@
4646
"psalm": "vendor/bin/psalm",
4747
"phpcs": "vendor/bin/phpcs --standard=PSR12 src tests",
4848
"phpcbf": "vendor/bin/phpcbf --standard=PSR12 src tests"
49+
},
50+
"config": {
51+
"allow-plugins": {
52+
"malukenho/mcbumpface": true
53+
}
4954
}
5055
}

src/RedisGraph/Edge.php

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,13 @@
66

77
final class Edge
88
{
9-
private string $type;
10-
private Node $sourceNode;
11-
private Node $destinationNode;
12-
private ?string $relation;
13-
private ?iterable $properties = [];
14-
159
public function __construct(
16-
string $type,
17-
Node $sourceNode,
18-
?string $relation,
19-
Node $destinationNode,
20-
?iterable $properties = []
10+
private string $type,
11+
private Node $sourceNode,
12+
private ?string $relation,
13+
private Node $destinationNode,
14+
private ?iterable $properties = []
2115
) {
22-
$this->type = $type;
23-
$this->sourceNode = $sourceNode;
24-
$this->destinationNode = $destinationNode;
25-
$this->relation = $relation;
26-
$this->properties = $properties;
2716
}
2817

2918
public static function create(Node $sourceNode, string $relation, Node $destinationNode): self

src/RedisGraph/GraphConstructor.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,11 @@
88

99
class GraphConstructor
1010
{
11-
private string $name;
1211
private array $nodes = [];
1312
private array $edges = [];
1413

15-
public function __construct(string $name)
14+
public function __construct(private string $name)
1615
{
17-
$this->name = $name;
1816
}
1917

2018
public function addNode(Node $node): void

src/RedisGraph/Node.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,11 @@
66

77
final class Node
88
{
9-
private ?string $label;
10-
private ?iterable $properties;
119
private string $alias;
1210

13-
public function __construct(?string $label = null, ?iterable $properties = null)
11+
public function __construct(private ?string $label = null, private ?iterable $properties = null)
1412
{
15-
$this->label = $label;
1613
$this->alias = randomString();
17-
$this->properties = $properties;
1814
}
1915

2016
public static function create(): self

src/RedisGraph/Query.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,8 @@
88

99
final class Query implements QueryInterface
1010
{
11-
private string $name;
12-
private string $queryString;
13-
14-
public function __construct(string $name, string $queryString)
11+
public function __construct(private string $name, private string $queryString)
1512
{
16-
$this->name = $name;
17-
$this->queryString = $queryString;
1813
}
1914

2015
public function getName(): string

src/RedisGraph/Result.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,10 @@
88

99
class Result
1010
{
11-
private ?array $resultSet;
1211
private array $statistics;
13-
private ?array $labels;
1412

15-
public function __construct(?array $labels, ?array $resultSet, Statistics $statistics)
13+
public function __construct(private ?array $labels, private ?array $resultSet, Statistics $statistics)
1614
{
17-
$this->labels = $labels;
18-
$this->resultSet = $resultSet;
1915
$this->statistics = $statistics->getResultStatistics();
2016
}
2117

0 commit comments

Comments
 (0)