@@ -268,6 +268,7 @@ enum ApiVersion {
268268 Php82 = 2022_08_29 ,
269269 Php83 = 2023_08_31 ,
270270 Php84 = 2024_09_24 ,
271+ Php85 = 2025_09_25 ,
271272}
272273
273274impl ApiVersion {
@@ -285,7 +286,7 @@ impl ApiVersion {
285286
286287 /// Returns the maximum API version supported by ext-php-rs.
287288 pub const fn max ( ) -> Self {
288- ApiVersion :: Php84
289+ ApiVersion :: Php85
289290 }
290291
291292 pub fn versions ( ) -> Vec < Self > {
@@ -295,6 +296,7 @@ impl ApiVersion {
295296 ApiVersion :: Php82 ,
296297 ApiVersion :: Php83 ,
297298 ApiVersion :: Php84 ,
299+ ApiVersion :: Php85 ,
298300 ]
299301 }
300302
@@ -313,6 +315,7 @@ impl ApiVersion {
313315 ApiVersion :: Php82 => "php82" ,
314316 ApiVersion :: Php83 => "php83" ,
315317 ApiVersion :: Php84 => "php84" ,
318+ ApiVersion :: Php85 => "php85" ,
316319 }
317320 }
318321
@@ -323,6 +326,7 @@ impl ApiVersion {
323326 ApiVersion :: Php82 => "EXT_PHP_RS_PHP_82" ,
324327 ApiVersion :: Php83 => "EXT_PHP_RS_PHP_83" ,
325328 ApiVersion :: Php84 => "EXT_PHP_RS_PHP_84" ,
329+ ApiVersion :: Php85 => "EXT_PHP_RS_PHP_85" ,
326330 }
327331 }
328332}
@@ -344,7 +348,10 @@ impl TryFrom<u32> for ApiVersion {
344348 x if ( ( ApiVersion :: Php83 as u32 ) ..( ApiVersion :: Php84 as u32 ) ) . contains ( & x) => {
345349 Ok ( ApiVersion :: Php83 )
346350 }
347- x if ( ApiVersion :: Php84 as u32 ) == x => Ok ( ApiVersion :: Php84 ) ,
351+ x if ( ( ApiVersion :: Php84 as u32 ) ..( ApiVersion :: Php85 as u32 ) ) . contains ( & x) => {
352+ Ok ( ApiVersion :: Php84 )
353+ }
354+ x if ( ApiVersion :: Php85 as u32 ) == x => Ok ( ApiVersion :: Php85 ) ,
348355 version => Err ( anyhow ! (
349356 "The current version of PHP is not supported. Current PHP API version: {}, requires a version between {} and {}" ,
350357 version,
@@ -371,7 +378,7 @@ fn check_php_version(info: &PHPInfo) -> Result<()> {
371378 // The PHP version cfg flags should also stack - if you compile on PHP 8.2 you
372379 // should get both the `php81` and `php82` flags.
373380 println ! (
374- "cargo::rustc-check-cfg=cfg(php80, php81, php82, php83, php84, php_zts, php_debug, docs)"
381+ "cargo::rustc-check-cfg=cfg(php80, php81, php82, php83, php84, php85, php_zts, php_debug, docs)"
375382 ) ;
376383
377384 if version == ApiVersion :: Php80 {
@@ -416,6 +423,7 @@ fn main() -> Result<()> {
416423 println ! ( "cargo:rustc-cfg=php82" ) ;
417424 println ! ( "cargo:rustc-cfg=php83" ) ;
418425 println ! ( "cargo:rustc-cfg=php84" ) ;
426+ println ! ( "cargo:rustc-cfg=php85" ) ;
419427 std:: fs:: copy ( "docsrs_bindings.rs" , out_path)
420428 . expect ( "failed to copy docs.rs stub bindings to out directory" ) ;
421429 return Ok ( ( ) ) ;
0 commit comments