@@ -27,36 +27,29 @@ private function formatSize(float $size): string
27
27
28
28
private function checkPhp (HealthCollection $ collection ): void
29
29
{
30
- $ minPhpVersion = '8.1 .0 ' ;
30
+ $ minPhpVersion = '8.2 .0 ' ;
31
31
$ currentPhpVersion = \PHP_VERSION ;
32
- if (version_compare ('8.0.0 ' , $ currentPhpVersion , '> ' )) {
33
- $ collection ->add (
34
- SettingsResult::error (
35
- 'php-version ' ,
36
- 'PHP Version is outdated ' ,
37
- $ currentPhpVersion ,
38
- 'min ' . $ minPhpVersion
39
- )
40
- );
41
- } elseif (version_compare ('8.1.0 ' , $ currentPhpVersion , '> ' )) {
32
+ if (version_compare ($ minPhpVersion , $ currentPhpVersion , '> ' )) {
42
33
$ collection ->add (
43
34
SettingsResult::warning (
44
- 'php-version ' ,
45
- 'PHP Version is outdated ' ,
46
- $ currentPhpVersion ,
47
- 'min ' . $ minPhpVersion
48
- )
49
- );
50
- } else {
51
- $ collection ->add (
52
- SettingsResult::ok (
53
35
'php-version ' ,
54
36
'PHP Version ' ,
55
37
$ currentPhpVersion ,
56
38
'min ' . $ minPhpVersion
57
39
)
58
40
);
41
+
42
+ return ;
59
43
}
44
+
45
+ $ collection ->add (
46
+ SettingsResult::ok (
47
+ 'php-version ' ,
48
+ 'PHP Version ' ,
49
+ $ currentPhpVersion ,
50
+ 'min ' . $ minPhpVersion
51
+ )
52
+ );
60
53
}
61
54
62
55
private function checkMaxExecutionTime (HealthCollection $ collection ): void
@@ -67,7 +60,7 @@ private function checkMaxExecutionTime(HealthCollection $collection): void
67
60
$ collection ->add (
68
61
SettingsResult::error (
69
62
'php-max-execution ' ,
70
- 'Max-Execution-Time is too low ' ,
63
+ 'Max-Execution-Time ' ,
71
64
(string ) $ currentMaxExecutionTime ,
72
65
'min ' . $ minMaxExecutionTime
73
66
)
@@ -92,7 +85,7 @@ private function checkMemoryLimit(HealthCollection $collection): void
92
85
$ collection ->add (
93
86
SettingsResult::error (
94
87
'php-memory-limit ' ,
95
- 'Can not read Memory-Limit ' ,
88
+ 'Memory-Limit ' ,
96
89
'unknown ' ,
97
90
'min ' . $ this ->formatSize ($ minMemoryLimit )
98
91
)
@@ -106,7 +99,7 @@ private function checkMemoryLimit(HealthCollection $collection): void
106
99
$ collection ->add (
107
100
SettingsResult::error (
108
101
'php-memory-limit ' ,
109
- 'Memory-Limit is too low ' ,
102
+ 'Memory-Limit ' ,
110
103
$ this ->formatSize ($ currentMemoryLimit ),
111
104
'min ' . $ this ->formatSize ($ minMemoryLimit )
112
105
)
@@ -125,24 +118,28 @@ private function checkMemoryLimit(HealthCollection $collection): void
125
118
126
119
private function checkOpCacheActive (HealthCollection $ collection ): void
127
120
{
121
+ $ snippet = 'Zend Opcache ' ;
122
+
128
123
if (\extension_loaded ('Zend OPcache ' ) && \ini_get ('opcache.enable ' )) {
129
- $ collection ->add (SettingsResult::ok ('zend-opcache ' , ' Zend Opcache is active ' , 'active ' , 'active ' ));
124
+ $ collection ->add (SettingsResult::ok ('zend-opcache ' , $ snippet , 'active ' , 'active ' ));
130
125
131
126
return ;
132
127
}
133
128
134
- $ collection ->add (SettingsResult::warning ('zend-opcache ' , ' Zend Opcache is not active ' , 'not active ' , 'active ' ));
129
+ $ collection ->add (SettingsResult::warning ('zend-opcache ' , $ snippet , 'not active ' , 'active ' ));
135
130
}
136
131
137
132
private function checkPcreJitActive (HealthCollection $ collection ): void
138
133
{
134
+ $ snippet = 'PCRE-Jit ' ;
135
+
139
136
if (\ini_get ('pcre.jit ' )) {
140
- $ collection ->add (SettingsResult::ok ('pcre-jit ' , ' PCRE-Jit is active ' , 'active ' , 'active ' ));
137
+ $ collection ->add (SettingsResult::ok ('pcre-jit ' , $ snippet , 'active ' , 'active ' ));
141
138
142
139
return ;
143
140
}
144
141
145
- $ collection ->add (SettingsResult::warning ('pcre-jit ' , ' PCRE-Jit is not active ' , 'not active ' , 'active ' ));
142
+ $ collection ->add (SettingsResult::warning ('pcre-jit ' , $ snippet , 'not active ' , 'active ' ));
146
143
}
147
144
148
145
private function decodePhpSize (string $ val ): float
0 commit comments