mirror of
https://github.com/php-curl-class/php-curl-class.git
synced 2026-08-17 09:31:35 +00:00
634ee48552
* Enable color
* Increase PHPStan strictness
* Fix static analysis error
------ --------------------------------------------------
Line src/Curl/MultiCurl.php
------ --------------------------------------------------
593 Variable $interval_seconds might not be defined.
🪪 variable.undefined
------ --------------------------------------------------
* Increase PHPStan strictness
* Fix static analysis errors
------ -----------------------------------------------------------------
Line scripts/bump_major_version.php
------ -----------------------------------------------------------------
8 Binary operation "+=" between string and 1 results in an error.
🪪 assignOp.invalid
------ -----------------------------------------------------------------
------ -----------------------------------------------------------------
Line scripts/bump_minor_version.php
------ -----------------------------------------------------------------
8 Binary operation "+=" between string and 1 results in an error.
🪪 assignOp.invalid
------ -----------------------------------------------------------------
------ -----------------------------------------------------------------
Line scripts/bump_patch_version.php
------ -----------------------------------------------------------------
8 Binary operation "+=" between string and 1 results in an error.
🪪 assignOp.invalid
------ -----------------------------------------------------------------
* Fix static analysis errors
------ --------------------------------------------------------------------------------------------------------------------
Line src/Curl/CaseInsensitiveArray.php
------ --------------------------------------------------------------------------------------------------------------------
132 PHPDoc tag @param has invalid value (void): Unexpected token "\n * ", expected variable at offset 42 on line 4
🪪 phpDoc.parseError
145 PHPDoc tag @param has invalid value (void): Unexpected token "\n * ", expected variable at offset 44 on line 4
🪪 phpDoc.parseError
158 PHPDoc tag @param has invalid value (void): Unexpected token "\n * ", expected variable at offset 41 on line 4
🪪 phpDoc.parseError
171 PHPDoc tag @param has invalid value (void): Unexpected token "\n * ", expected variable at offset 40 on line 4
🪪 phpDoc.parseError
197 PHPDoc tag @param has invalid value (void): Unexpected token "\n * ", expected variable at offset 43 on line 4
🪪 phpDoc.parseError
------ --------------------------------------------------------------------------------------------------------------------
* Fix static analysis errors
------ -----------------------------------------------------------------------------------
Line src/Curl/MultiCurl.php
------ -----------------------------------------------------------------------------------
937 Comparison operation "<" between float and (array|float|int) results in an error.
🪪 smaller.invalid
941 Comparison operation "<" between float and (array|float|int) results in an error.
🪪 smaller.invalid
------ -----------------------------------------------------------------------------------
* Increase PHPStan strictness
* Fix static analysis errors
------ -------------------------------------------
Line src/Curl/Decoder.php
------ -------------------------------------------
22 Offset '0' does not exist on list<mixed>.
🪪 offsetAccess.notFound
41 Offset '0' does not exist on list<mixed>.
🪪 offsetAccess.notFound
------ -------------------------------------------
32 lines
961 B
PHP
Executable File
32 lines
961 B
PHP
Executable File
#!/usr/bin/env php
|
|
<?php
|
|
require __DIR__ . '/../src/Curl/BaseCurl.php';
|
|
require __DIR__ . '/../src/Curl/Curl.php';
|
|
|
|
$current_version = Curl\Curl::VERSION;
|
|
list($major, $minor, $patch) = explode('.', $current_version);
|
|
$new_version = implode('.', [$major, $minor, (string)((int)$patch + 1)]);
|
|
|
|
foreach (
|
|
[
|
|
[
|
|
__DIR__ . '/../src/Curl/Curl.php',
|
|
'/const VERSION = \'(?:\d+.\d+.\d+)\';/',
|
|
'const VERSION = \'' . $new_version . '\';',
|
|
],
|
|
] as $info
|
|
) {
|
|
list($filepath, $find, $replace) = $info;
|
|
$data = preg_replace($find, $replace, file_get_contents($filepath));
|
|
file_put_contents($filepath, $data);
|
|
}
|
|
|
|
$rightwards_arrow = json_decode('"\u2192"');
|
|
$message = 'Bump version: ' . $current_version . ' ' . $rightwards_arrow . ' ' . $new_version;
|
|
|
|
echo json_encode([
|
|
'message' => $message,
|
|
'old_version' => $current_version,
|
|
'new_version' => $new_version,
|
|
], JSON_PRETTY_PRINT) . "\n";
|