File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -10,4 +10,20 @@ public function __construct(
1010 public string $ description ,
1111 public array $ options
1212 ) {}
13+
14+ public function __get (string $ name ): mixed
15+ {
16+ return match ($ name ) {
17+ 'status ' => $ this ->handleDeprecatedProperty ('status ' , 0 ),
18+ 'isDefault ' => $ this ->handleDeprecatedProperty ('isDefault ' , false ),
19+ default => throw new \InvalidArgumentException ("Property ' {$ name }' does not exist on Printer class " ),
20+ };
21+ }
22+
23+ private function handleDeprecatedProperty (string $ property , mixed $ defaultValue ): mixed
24+ {
25+ logger ()->warning ("Deprecated: Printer:: \${$ property } property has been removed in upstream Electron and will no longer be available " );
26+
27+ return $ defaultValue ;
28+ }
1329}
You can’t perform that action at this time.
0 commit comments