You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixed false-positive possible-wrong-parameter warning when a string, bool, array, or callable argument was passed to a method parameter typed mixed#2512
Fixed use statements registering aliases for non-existent classes silently #2435
Fixed Unknown type: closure (and other AST-type-name) errors when a var declaration was given #2522
Fixed segfault when for k, v in iterator(x) was given a non-Iterator operand (e.g. stdClass, plain array, scalar). #820
Fixed --vernum CLI option silently falling through to the help screen instead of printing the numeric version. #2454
Fixed silent generation of uncompilable C when a local var was re-declared with the same name as a method parameter. #2009
Fixed string locals that were initialized to the empty string (string s = ""; or let s = "";) ending up as null at runtime when subsequent code paths did not reassign them. #2393
Fixed new static() falling back to early binding. #2324
Fixed ParseException::__construct() triggering a fatal PHP 8.4 deprecation (Implicitly marking parameter $previous as nullable) when a .zep file had a syntax error — the deprecation suppressed the actual parse-error message. Parameter is now declared as Exception | Throwable | null.
Fixed isset() returning true for object properties and array offsets whose value is null. Previously the isset() operator emitted zephir_isset_property* / zephir_array_isset* kernel helpers that only performed key/property existence checks — equivalent to property_exists() / array_key_exists() — so isset(obj->p) where obj->p === null, isset(arr["k"]) where arr["k"] === null, and isset(obj->declaredButNeverAssigned) all returned true instead of PHP's false. The codegen now emits new zephir_isset_property_value* / zephir_array_isset_value* helpers that also reject IS_NULL; for objects this delegates to the has_property handler with ZEND_PROPERTY_ISSET (same path the engine uses for the ZEND_ISSET_ISEMPTY_PROP_OBJ opcode), so __isset magic and inaccessible/private property scoping behave correctly. The existing key-only helpers stay available for internal callers that genuinely want existence semantics (e.g. array_key_exists). #2385
Forcing Exception on Failure of Compile Step
This discussion was created from the release 0.21.0.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Added
<self>method return-type annotation being emitted as a namespaced literal class name in arginfo #2505Fixed
Foo $x = null) that PHP 8.4 deprecates #2426possible-wrong-parameterwarning when astring,bool,array, orcallableargument was passed to a method parameter typedmixed#2512usestatements registering aliases for non-existent classes silently #2435Unknown type: closure(and other AST-type-name) errors when avardeclaration was given #2522for k, v in iterator(x)was given a non-Iterator operand (e.g.stdClass, plain array, scalar). #820--vernumCLI option silently falling through to the help screen instead of printing the numeric version. #2454varwas re-declared with the same name as a method parameter. #2009stringlocals that were initialized to the empty string (string s = "";orlet s = "";) ending up asnullat runtime when subsequent code paths did not reassign them. #2393new static()falling back to early binding. #2324ParseException::__construct()triggering a fatal PHP 8.4 deprecation (Implicitly marking parameter $previous as nullable) when a.zepfile had a syntax error — the deprecation suppressed the actual parse-error message. Parameter is now declared asException | Throwable | null.isset()returningtruefor object properties and array offsets whose value isnull. Previously theisset()operator emittedzephir_isset_property*/zephir_array_isset*kernel helpers that only performed key/property existence checks — equivalent toproperty_exists()/array_key_exists()— soisset(obj->p)whereobj->p === null,isset(arr["k"])wherearr["k"] === null, andisset(obj->declaredButNeverAssigned)all returnedtrueinstead of PHP'sfalse. The codegen now emits newzephir_isset_property_value*/zephir_array_isset_value*helpers that also rejectIS_NULL; for objects this delegates to thehas_propertyhandler withZEND_PROPERTY_ISSET(same path the engine uses for theZEND_ISSET_ISEMPTY_PROP_OBJopcode), so__issetmagic and inaccessible/private property scoping behave correctly. The existing key-only helpers stay available for internal callers that genuinely want existence semantics (e.g.array_key_exists). #2385This discussion was created from the release 0.21.0.
Beta Was this translation helpful? Give feedback.
All reactions