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
cast() for casting anything other than string, int, float, bool, array and object (and nullable versions of these, see Inline nullable checks when casting #131)
typeof() in the VirtualPropertyTypes augmentation
XP meta information for extended types such as array<int>, as seen in this failing test if XpMeta is removed:
util.Objects::stringOf() inside RewriteEnums used in PHP < 8.1
lang.VirtualProperty for being able to set readonly properties via reflection
XP Compiler supports casting to any type, including value types and those not present in the PHP type system (but supported by tools like PHPDoc, PHPStan and others), like array<string>:
// Syntax$input= (array<string>)$parameters->named('list');
// Rewritten to use the cast function from XP Core$input= cast($parameters->named('list'), 'string[]');
Extracting this functionality would create quite some overhead in the compiler and result in lots of duplicated code being generated.
This ticket tracks the dependencies on XP core:
cast()
for casting anything other than string, int, float, bool, array and object (and nullable versions of these, see Inline nullable checks when casting #131)typeof()
in the VirtualPropertyTypes augmentationarray<int>
, as seen in this failing test if XpMeta is removed:util.Objects::stringOf()
inside RewriteEnums used in PHP < 8.1lang.VirtualProperty
for being able to set readonly properties via reflectionis()
in the VirtualPropertyTypes augmentation.class.php
file extension -see Implement command line option to set file extension for compiled files #159The text was updated successfully, but these errors were encountered: