diff --git a/README.md b/README.md index edc274aa3c..677a0a804d 100644 --- a/README.md +++ b/README.md @@ -22,9 +22,9 @@ Export a simple function `function hello_world(string $name): string` to PHP: use ext_php_rs::prelude::*; /// Gives you a nice greeting! -/// +/// /// @param string $name Your name. -/// +/// /// @return string Nice greeting! #[php_function] pub fn hello_world(name: String) -> String { @@ -114,8 +114,12 @@ best resource at the moment. This can be viewed at [docs.rs]. ## Requirements - Linux, macOS or Windows-based operating system. -- PHP 8.0 or later. +- PHP 8.1 or later. - No support is planned for earlier versions of PHP. + - PHP versions, that no longer receive security updates, will no longer be + supported. They might still work, but no guarantees are made. + - See for information on PHP + supported versions and their end of life dates. - Rust. - Currently, we maintain no guarantee of a MSRV, however lib.rs suggests Rust 1.57 at the time of writing. diff --git a/build.rs b/build.rs index 5232564972..89e40ff7f0 100644 --- a/build.rs +++ b/build.rs @@ -237,6 +237,10 @@ fn check_php_version(info: &PHPInfo) -> Result<()> { ); println!("cargo:rustc-cfg=php80"); + if (MIN_PHP_API_VER..PHP_81_API_VER).contains(&version) { + println!("cargo:warning=PHP version 8.0 is EOL and will no longer be supported in a future release. Please upgrade to a supported version of PHP. See https://www.php.net/supported-versions.php for information on version support timelines."); + } + if (PHP_81_API_VER..PHP_82_API_VER).contains(&version) { println!("cargo:rustc-cfg=php81"); }