From 73ab00d3108933c952844b3820f44230c8203807 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Tue, 11 Aug 2026 23:15:02 +0900 Subject: 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) --- crates/shirabe-class-map-generator/src/class_map_generator.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'crates/shirabe-class-map-generator/src/class_map_generator.rs') diff --git a/crates/shirabe-class-map-generator/src/class_map_generator.rs b/crates/shirabe-class-map-generator/src/class_map_generator.rs index 7262fd8a..0042a0a1 100644 --- a/crates/shirabe-class-map-generator/src/class_map_generator.rs +++ b/crates/shirabe-class-map-generator/src/class_map_generator.rs @@ -6,9 +6,9 @@ use crate::php_file_parser::PhpFileParser; use indexmap::indexmap; use shirabe_pcre::{CaptureKey, Preg}; use shirabe_php_shim::{ - InvalidArgumentException, LogicException, PATHINFO_EXTENSION, PHP_INT_MAX, RuntimeException, - explode, getcwd, implode, is_dir, is_file, pathinfo, php_regex, preg_quote, realpath, - str_replace, str_starts_with, stream_get_wrappers, strlen, strpos, strrpos, strtr, substr, + InvalidArgumentException, LogicException, PATHINFO_EXTENSION, RuntimeException, explode, + getcwd, implode, is_dir, is_file, pathinfo, php_regex, preg_quote, realpath, str_replace, + str_starts_with, stream_get_wrappers, strlen, strpos, strrpos, strtr, substr, }; use shirabe_symfony_finder::Finder; use std::path::PathBuf; @@ -247,7 +247,7 @@ impl ClassMapGenerator { let real_sub_path = substr( &real_sub_path_str, 0, - Some(dot_position.map(|p| p as i64).unwrap_or(PHP_INT_MAX)), + Some(dot_position.map(|p| p as i64).unwrap_or(i64::MAX)), ); for class in classes { -- cgit v1.3.1-4-g156e