Skip to content
This repository has been archived by the owner on May 20, 2023. It is now read-only.

Commit

Permalink
Update to pthreads 5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dktapps committed Jan 23, 2023
1 parent 33ca8fa commit 0ecfea6
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 14 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@ jobs:
- uses: actions/checkout@v2

- name: Setup PHP
uses: pmmp/setup-php-action@87cc7c2f65e10e0e64be54a3e41a62a4c61bd1a9
uses: pmmp/setup-php-action@6dd74c145250109942b08fc63cd5118edd2fd256
with:
php-version: ${{ matrix.php }}
install-path: "./bin"
pm-version-major: "5"

- name: Cache Composer packages
id: composer-cache
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"license": "LGPL-3.0",
"require": {
"php": "^8.0",
"ext-pthreads": "~3.2.0 || ^4.0",
"ext-pthreads": "^5.0",
"pocketmine/log": "^0.4.0"
},
"require-dev": {
Expand Down
2 changes: 0 additions & 2 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,3 @@ parameters:
level: 9
paths:
- src
stubFiles:
- tests/phpstan/stubs/pthreads.stub
7 changes: 5 additions & 2 deletions src/AttachableThreadedLogger.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,14 @@

abstract class AttachableThreadedLogger extends \ThreadedLogger{

/** @var \Volatile|\ThreadedLoggerAttachment[] */
/**
* @var \ThreadedArray|\ThreadedLoggerAttachment[]
* @phpstan-var \ThreadedArray<int, \ThreadedLoggerAttachment>
*/
protected $attachments;

public function __construct(){
$this->attachments = new \Volatile();
$this->attachments = new \ThreadedArray();
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/ThreadedLogger.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
* GNU General Public License for more details.
*/

abstract class ThreadedLogger extends \Threaded implements Logger{
abstract class ThreadedLogger extends \ThreadedBase implements Logger{

}
2 changes: 1 addition & 1 deletion src/ThreadedLoggerAttachment.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* GNU General Public License for more details.
*/

abstract class ThreadedLoggerAttachment extends \Volatile{
abstract class ThreadedLoggerAttachment extends \ThreadedBase{

/**
* @param mixed $level
Expand Down
6 changes: 0 additions & 6 deletions tests/phpstan/stubs/pthreads.stub

This file was deleted.

0 comments on commit 0ecfea6

Please sign in to comment.