Skip to content

Commit 5170655

Browse files
Prepare release 3 (#95)
* chore: update gitignore * fix: drop support for EOL 7.3, 7.4 * fix: add return types * fix: Deprecated: Creation of dynamic property... * fix: Deprecated: Creation of dynamic property... * chore: remove print
1 parent 92be767 commit 5170655

File tree

7 files changed

+23
-15
lines changed

7 files changed

+23
-15
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @JimmyPettersson85 @xernobyl @yaziine

.github/workflows/ci.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
strategy:
1414
matrix:
15-
php_version: ['7.3' ,'7.4', '8.1']
15+
php_version: ['8.0', '8.1', '8.2']
1616
fail-fast: false
1717
steps:
1818
- uses: actions/checkout@v2
@@ -27,4 +27,4 @@ jobs:
2727
run: composer install
2828

2929
- name: Run tests
30-
run: ./vendor/bin/phpunit
30+
run: ./vendor/bin/phpunit

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@
22
/composer.lock
33
.phpunit.result.cache
44
.vscode
5-
.devcontainer
5+
.devcontainer
6+
Dockerfile
7+
Makefile

composer.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@
1111
}
1212
],
1313
"require": {
14-
"php": ">=7.3",
15-
"illuminate/support": ">=4.2",
16-
"illuminate/database": ">=4.2",
17-
"get-stream/stream": "^5.0.0"
14+
"php": ">=8.0",
15+
"illuminate/support": ">=9.0",
16+
"illuminate/database": ">=9.0",
17+
"get-stream/stream": "^7.0.1"
1818
},
1919
"require-dev": {
20-
"phpunit/phpunit": "^9.5",
21-
"mockery/mockery": "^1.4"
20+
"phpunit/phpunit": "^9.6",
21+
"mockery/mockery": "^1.5"
2222
},
2323
"autoload": {
2424
"psr-0": {

src/GetStream/StreamLaravel/EnrichedActivity.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function enriched()
3232
}
3333

3434
// Array implementation methods
35-
public function offsetSet($offset, $value)
35+
public function offsetSet($offset, $value): void
3636
{
3737
if (is_null($offset)) {
3838
$this->activityData[] = $value;
@@ -41,23 +41,23 @@ public function offsetSet($offset, $value)
4141
}
4242
}
4343

44-
public function offsetExists($offset)
44+
public function offsetExists($offset): bool
4545
{
4646
return isset($this->activityData[$offset]);
4747
}
4848

49-
public function offsetUnset($offset)
49+
public function offsetUnset($offset): void
5050
{
5151
unset($this->activityData[$offset]);
5252
}
5353

54-
public function offsetGet($offset)
54+
public function offsetGet($offset): mixed
5555
{
5656
return isset($this->activityData[$offset]) ? $this->activityData[$offset] : null;
5757
}
5858

5959
// Support iteration over private activityData array
60-
public function getIterator()
60+
public function getIterator(): \Traversable
6161
{
6262
return new ArrayIterator($this->activityData);
6363
}

tests/ActivityTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ public function activityNotify()
3030

3131
class ActivityTest extends TestCase
3232
{
33+
34+
private $instance = null;
35+
3336
public function setUp(): void
3437
{
3538
parent::setUp();
@@ -47,10 +50,10 @@ public function testCreateActivity()
4750
$this->assertSame($activity['object'], '_Activity:42');
4851
$this->assertSame($activity['foreign_id'], '_Activity:42');
4952
}
53+
5054
public function testToField()
5155
{
5256
$activity = $this->instance->createActivity();
53-
print_r($activity['to']);
5457
$this->assertSame($activity['to'], array('feed:1'));
5558
}
5659
}

tests/ManagerTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
class ManagerTest extends TestCase
88
{
9+
private $manager = null;
10+
911
public function setUp(): void
1012
{
1113
parent::setUp();

0 commit comments

Comments
 (0)