File tree Expand file tree Collapse file tree
Components/Health/Checker/PerformanceChecker Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ <?php declare (strict_types=1 );
2+
3+ namespace Frosh \Tools \Components \Health \Checker \PerformanceChecker ;
4+
5+ use Frosh \Tools \Components \Health \Checker \CheckerInterface ;
6+ use Frosh \Tools \Components \Health \HealthCollection ;
7+ use Frosh \Tools \Components \Health \SettingsResult ;
8+
9+ class PublicFilesystemChecker implements CheckerInterface
10+ {
11+ private string $ fileSystemType ;
12+
13+ public function __construct (string $ fileSystemType )
14+ {
15+ $ this ->fileSystemType = $ fileSystemType ;
16+ }
17+
18+ public function collect (HealthCollection $ collection ): void
19+ {
20+ $ url = 'https://developer.shopware.com/docs/guides/hosting/infrastructure/filesystem#integrated-adapter-configurations ' ;
21+ if ($ this ->fileSystemType !== 'local ' ) {
22+ $ collection ->add (
23+ SettingsResult::ok ('frosh-tools.checker.publicFilesystemGood ' ,
24+ $ this ->fileSystemType ,
25+ 'not local ' ,
26+ $ url
27+ )
28+ );
29+
30+ return ;
31+ }
32+
33+ $ collection ->add (
34+ SettingsResult::warning ('frosh-tools.checker.publicFilesystemBad ' ,
35+ $ this ->fileSystemType ,
36+ 'not local ' ,
37+ $ url
38+ )
39+ );
40+ }
41+ }
Original file line number Diff line number Diff line change 109109 <tag name =" frosh_tools.performance_checker" />
110110 </service >
111111
112+ <service id =" Frosh\Tools\Components\Health\Checker\PerformanceChecker\PublicFilesystemChecker" >
113+ <argument >%shopware.filesystem.public.type%</argument >
114+ <tag name =" frosh_tools.performance_checker" />
115+ </service >
116+
112117 <service id =" Frosh\Tools\Components\Health\Checker\PerformanceChecker\EsChecker" >
113118 <argument type =" service" id =" Frosh\Tools\Components\Elasticsearch\ElasticsearchManager" />
114119 <tag name =" frosh_tools.performance_checker" />
You can’t perform that action at this time.
0 commit comments