Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ fn check_php_version(info: &PHPInfo) -> Result<()> {
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) {
if version >= PHP_81_API_VER {
println!("cargo:rustc-cfg=php81");
}

Expand Down Expand Up @@ -285,6 +285,7 @@ fn main() -> Result<()> {
if env::var("DOCS_RS").is_ok() {
println!("cargo:warning=docs.rs detected - using stub bindings");
println!("cargo:rustc-cfg=php_debug");
println!("cargo:rustc-cfg=php81");
println!("cargo:rustc-cfg=php82");
std::fs::copy("docsrs_bindings.rs", out_path)
.expect("failed to copy docs.rs stub bindings to out directory");
Expand Down
2 changes: 1 addition & 1 deletion src/builders/class.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ impl ClassBuilder {
// disable serialization if the class has an associated object
if self.object_override.is_some() {
cfg_if::cfg_if! {
if #[cfg(any(php81, php82))] {
if #[cfg(php81)] {
class.ce_flags |= ClassFlags::NotSerializable.bits();
} else {
class.serialize = Some(crate::ffi::zend_class_serialize_deny);
Expand Down
2 changes: 1 addition & 1 deletion src/flags.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ bitflags! {
const UnresolvedVariance = ZEND_ACC_UNRESOLVED_VARIANCE;
const NearlyLinked = ZEND_ACC_NEARLY_LINKED;

#[cfg(any(php81,php82))]
#[cfg(php81)]
const NotSerializable = crate::ffi::ZEND_ACC_NOT_SERIALIZABLE;
}
}
Expand Down