aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/package
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-08-11 23:15:02 +0900
committernsfisis <nsfisis@gmail.com>2026-08-11 23:15:02 +0900
commit73ab00d3108933c952844b3820f44230c8203807 (patch)
tree0c599481939c2e970714426111851e0037fedd06 /crates/shirabe/src/package
parentc18e25b3384c7640b2bc4d77314fddcc90651d21 (diff)
downloadphp-shirabe-73ab00d3108933c952844b3820f44230c8203807.tar.gz
php-shirabe-73ab00d3108933c952844b3820f44230c8203807.tar.zst
php-shirabe-73ab00d3108933c952844b3820f44230c8203807.zip
chore(php-shim): drop the PHP_INT_* constants
PHP_INT_MAX/MIN/SIZE have exact Rust counterparts under the int -> i64 mapping, so the call sites use i64::MAX directly. PHP_INT_SIZE is queried from the PHP runtime where it is actually needed. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/package')
-rw-r--r--crates/shirabe/src/package/version/version_guesser.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/shirabe/src/package/version/version_guesser.rs b/crates/shirabe/src/package/version/version_guesser.rs
index ff7c6b9b..2fde58fb 100644
--- a/crates/shirabe/src/package/version/version_guesser.rs
+++ b/crates/shirabe/src/package/version/version_guesser.rs
@@ -14,9 +14,9 @@ use crate::util::sync_executor;
use indexmap::IndexMap;
use shirabe_pcre::{CaptureKey, Preg};
use shirabe_php_shim::{
- PHP_INT_MAX, PhpMixed, RuntimeException, array_keys, array_map, array_merge, empty,
- function_exists, implode, is_string, json_encode, php_regex, preg_quote, str_replace, strlen,
- strnatcasecmp, strpos, substr, trim, usort,
+ PhpMixed, RuntimeException, array_keys, array_map, array_merge, empty, function_exists,
+ implode, is_string, json_encode, php_regex, preg_quote, str_replace, strlen, strnatcasecmp,
+ strpos, substr, trim, usort,
};
/// Seam over the parts of [`VersionGuesser`] that consumers depend on, so they can be exercised
@@ -507,7 +507,7 @@ impl VersionGuesser {
if !has_branch_alias || has_self_version {
let branch =
Preg::replace(php_regex!(r"{^dev-}"), "", version.as_deref().unwrap_or(""));
- let mut length: i64 = PHP_INT_MAX;
+ let mut length = i64::MAX;
// return directly, if branch is configured to be non-feature branch
if !self.is_feature_branch(package_config, Some(&branch)) {