File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010 fail-fast : false
1111 matrix :
1212 include :
13- - operating-system : ' ubuntu-latest'
14- php-version : ' 7.4'
15- job-description : ' Ubuntu; PHP 7.4; latest-deps'
16-
17- - operating-system : ' ubuntu-latest'
18- php-version : ' 7.4'
19- composer-flags : ' --prefer-lowest'
20- job-description : ' Ubuntu; PHP 7.4; lowest-deps'
21-
2213 - operating-system : ' ubuntu-latest'
2314 php-version : ' 8.0'
2415 job-description : ' Ubuntu; PHP 8.0; latest-deps'
Original file line number Diff line number Diff line change 77return (new PhpCsFixer \Config ())
88 ->setRules ([
99 '@Symfony ' => true ,
10- '@PHP74Migration ' => true ,
10+ '@PHP80Migration ' => true ,
1111
1212 'combine_consecutive_issets ' => true ,
1313 'combine_consecutive_unsets ' => true ,
Original file line number Diff line number Diff line change 1818
1919### Requirements:
2020
21- - PHP >= 7.4
21+ - PHP >= 8.0
2222- allow [ proc_open] ( https://www.php.net/proc_open ) function
2323- for Windows: 7-zip >= 7.30 (https://www.7-zip.org/ )
2424- for Linux/MacOs: p7zip >= 9.38 (https://github.com/p7zip-project/p7zip ). UPD: original 7-zip supports linux since 21.01 version?
Original file line number Diff line number Diff line change 1010 }
1111 ],
1212 "require" : {
13- "php" : " >=7.4 " ,
14- "symfony/process" : " ^4.4||^ 5.0||^6.0"
13+ "php" : " >=8.0 " ,
14+ "symfony/process" : " ^5.0||^6.0"
1515 },
1616 "require-dev" : {
1717 "phpunit/phpunit" : " ^9.5.28" ,
Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ class Archive7z
8989 *
9090 * @throws Exception
9191 */
92- public function __construct (string $ filename , ? string $ binary7z = null , ?float $ timeout = 60.0 )
92+ public function __construct (string $ filename , string $ binary7z = null , ?float $ timeout = 60.0 )
9393 {
9494 $ this ->filename = $ filename ;
9595 $ this ->timeout = $ timeout ;
@@ -317,7 +317,7 @@ public function getEntry(string $path): ?Entry
317317 *
318318 * @return Entry[]
319319 */
320- public function getEntries (? string $ pathMask = null , ? int $ limit = null ): array
320+ public function getEntries (string $ pathMask = null , int $ limit = null ): array
321321 {
322322 $ process = $ this ->makeProcess ('l ' , \array_merge (
323323 ['-slt ' ],
@@ -427,7 +427,7 @@ public function isValid(): bool
427427
428428 $ this ->execute ($ process );
429429
430- return false !== \strpos ($ process ->getOutput (), 'Everything is Ok ' );
430+ return \str_contains ($ process ->getOutput (), 'Everything is Ok ' );
431431 }
432432
433433 /**
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ protected static function getAutoBinary7z(): ?string
4444 /**
4545 * @throws Exception
4646 */
47- protected static function makeBinary7z (? string $ binary7z = null ): string
47+ protected static function makeBinary7z (string $ binary7z = null ): string
4848 {
4949 if (null === $ binary7z ) {
5050 $ binary7z = static ::getAutoBinary7z ();
Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ public function parseHeader(): array
8585 /**
8686 * @return array<int, array<string, string|string[]>>
8787 */
88- public function parseEntries (? int $ limit = null ): array
88+ public function parseEntries (int $ limit = null ): array
8989 {
9090 $ isHead = true ;
9191 $ list = [];
@@ -126,7 +126,7 @@ public function parseEntries(?int $limit = null): array
126126 */
127127 protected function parseEntry (string $ line ): ?array
128128 {
129- if (0 === \strpos ($ line , 'Warnings: ' ) || 0 === \strpos ($ line , 'Errors: ' )) {
129+ if (\str_starts_with ($ line , 'Warnings: ' ) || \str_starts_with ($ line , 'Errors: ' )) {
130130 return null ;
131131 }
132132
@@ -140,15 +140,15 @@ protected function parseEntry(string $line): ?array
140140 */
141141 protected function parseHeaderLine (string $ line ): ?array
142142 {
143- if (0 === \strpos ($ line , 'ERROR: ' ) || 0 === \strpos ($ line , 'Open WARNING: ' )) {
143+ if (\str_starts_with ($ line , 'ERROR: ' ) || \str_starts_with ($ line , 'Open WARNING: ' )) {
144144 return null ;
145145 }
146146
147147 /*
148148WARNINGS:
149149There are data after the end of archive
150150 */
151- if (0 === \strpos ($ line , 'WARNINGS: ' ) || false === \strpos ($ line , ' = ' )) {
151+ if (\str_starts_with ($ line , 'WARNINGS: ' ) || ! \str_contains ($ line , ' = ' )) {
152152 return null ;
153153 }
154154
Original file line number Diff line number Diff line change 55/**
66 * @see https://documentation.help/7-Zip/method.htm#Solid
77 */
8- class SolidMode /* implements \Stringable */
8+ class SolidMode implements \Stringable
99{
1010 public const ON = 'on ' ;
1111 public const OFF = 'off ' ;
You can’t perform that action at this time.
0 commit comments