File tree Expand file tree Collapse file tree 12 files changed +57
-27
lines changed Expand file tree Collapse file tree 12 files changed +57
-27
lines changed Original file line number Diff line number Diff line change 2
2
3
3
All notable changes to this project will be documented in this file.
4
4
5
+ ## [ 2.2.0] - 2021-02-05
6
+ ### Changed
7
+ - Added support for ` symfony/process:^5.0 `
8
+ - Updated ` phpunit/phpunit `
9
+ - Removed ` version ` from composer.json
10
+ - Switched to ` psalm ` for static analysis
11
+
5
12
## [ 2.1.1] - 2020-04-03
6
13
### Fix
7
14
- Catch Exception when trying to count reserved jobs
Original file line number Diff line number Diff line change 2
2
"name" : " ostark/craft-async-queue" ,
3
3
"description" : " A queue handler that moves queue execution to a non-blocking background process" ,
4
4
"type" : " craft-plugin" ,
5
- "version" : " 2.1.1" ,
6
5
"keywords" : [
7
6
" craft" ,
8
7
" cms" ,
22
21
}
23
22
],
24
23
"require" : {
24
+ "php" : " >=7.1" ,
25
25
"craftcms/cms" : " ^3.0.0" ,
26
26
"symfony/process" : " ^4.2|^5.0"
27
27
},
38
38
"changelogUrl" : " https://raw.githubusercontent.com/ostark/craft-async-queue/master/CHANGELOG.md"
39
39
},
40
40
"require-dev" : {
41
- "phpstan/phpstan " : " ^0.11.1 " ,
42
- "phpunit/phpunit " : " ^6.0 "
41
+ "phpunit/phpunit " : " ^7.0 " ,
42
+ "vimeo/psalm " : " ^4.4 "
43
43
},
44
44
"scripts" : {
45
- "ps" : " vendor/bin/phpstan analyse src --level=3 -c phpstan.neon" ,
46
- "stan" : " @ps" ,
45
+ "ps" : " vendor/bin/phpstan.phar analyse src --level=3 -c phpstan.neon" ,
47
46
"tests" : " vendor/bin/phpunit -v"
48
47
}
49
48
}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" ?>
2
+ <psalm
3
+ errorLevel =" 4"
4
+ resolveFromConfigFile =" true"
5
+ autoloader =" tests/bootstrap.php"
6
+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
7
+ xmlns =" https://getpsalm.org/schema/config"
8
+ xsi : schemaLocation =" https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
9
+ >
10
+ <projectFiles >
11
+ <directory name =" src" />
12
+ <ignoreFiles >
13
+ <directory name =" vendor" />
14
+ </ignoreFiles >
15
+ </projectFiles >
16
+ <issueHandlers >
17
+ <InvalidNullableReturnType >
18
+ <errorLevel type =" suppress" >
19
+ <file name =" ./src/Plugin.php" />
20
+ </errorLevel >
21
+ </InvalidNullableReturnType >
22
+ <NullableReturnStatement >
23
+ <errorLevel type =" suppress" >
24
+ <file name =" ./src/Plugin.php" />
25
+ </errorLevel >
26
+ </NullableReturnStatement >
27
+ </issueHandlers >
28
+ </psalm >
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ class LogicException extends \LogicException implements ProcessException
6
6
{
7
7
protected $ process ;
8
8
9
- public function setProcess (Process $ process )
9
+ public function setProcess (Process $ process ): void
10
10
{
11
11
$ this ->process = $ process ;
12
12
}
Original file line number Diff line number Diff line change 4
4
5
5
interface ProcessException
6
6
{
7
- public function setProcess (Process $ process );
7
+ public function setProcess (Process $ process ): void ;
8
8
9
9
public function getProcess (): Process ;
10
10
Original file line number Diff line number Diff line change 4
4
5
5
class RuntimeException extends \RuntimeException implements ProcessException
6
6
{
7
+
8
+ /**
9
+ * @var Process
10
+ */
7
11
protected $ process ;
8
12
9
- public function setProcess (Process $ process )
13
+ public function setProcess (Process $ process ): void
10
14
{
11
15
$ this ->process = $ process ;
12
16
}
Original file line number Diff line number Diff line change @@ -64,11 +64,7 @@ public function __invoke(PushEvent $event)
64
64
}
65
65
66
66
67
- /**
68
- * @param \yii\queue\PushEvent $event
69
- * @param bool $handled
70
- */
71
- protected function logPushEvent (PushEvent $ event , $ handled = false )
67
+ protected function logPushEvent (PushEvent $ event , bool $ handled = false ): void
72
68
{
73
69
if (!YII_DEBUG ) {
74
70
return ;
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ class Plugin extends BasePlugin
30
30
/**
31
31
* Init plugin
32
32
*/
33
- public function init ()
33
+ public function init (): void
34
34
{
35
35
parent ::init ();
36
36
Original file line number Diff line number Diff line change @@ -49,13 +49,13 @@ public function canIUse(string $context = null): bool
49
49
return ($ currentUsage < $ this ->maxItems ) ? true : false ;
50
50
}
51
51
52
- public function increment ()
52
+ public function increment (): void
53
53
{
54
54
$ this ->internalCount ++;
55
55
}
56
56
57
57
58
- protected function logAttempt (int $ currentUsage , string $ context = null )
58
+ protected function logAttempt (int $ currentUsage , string $ context = null ): void
59
59
{
60
60
61
61
\Craft::debug (
You can’t perform that action at this time.
0 commit comments