-
-
Notifications
You must be signed in to change notification settings - Fork 648
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PHP global namespace again #5071
Conversation
mockey
commented
Apr 7, 2016
- add specific @:phpGlobal metadata to get around the issues with @:native
- remove the previous attempt of using @:native
- add @:phpConstant prefix from previous PR
- avoid undesired var renames with s_ident for externs in global php namespace
remove the previous attempt of using @:native add @:phpConstant prefix from previous PR
So now you can write: @:phpGlobal extern class Var {
@:native("isset")
static function isSet(val:Dynamic):Bool;
@:native("\\var_dump")
static function dump(val:Dynamic):Void;
}
@:phpGlobal
@:phpConstants
extern class MagicConstant {
@:native("__FUNCTION__")
static var FUNCTION:String;
}
@:phpGlobal
@:phpConstants("\\SOAP_SSL_METHOD_")
@:enum extern abstract SoapSslMethod(Int) {
var TLS;
var SSLv2;
var SSLv3;
var SSLv23;
} |
Thanks! Looks like you're shaping up to be the next Haxe/PHP maintainer! |
@Simn
Well, maybe :-)
Another thing: |
See http://ocaml-lib.sourceforge.net/doc/Option.html, however in this case it's probably easier to just catch
This is pretty good, I think: https://realworldocaml.org/v1/en/html/index.html |
@nadako: Cool, thanks a lot. |
Doesn't seem very important but wouldn't hurt either.
I don't remember what exactly the problem was, but I know there was a problem. You can try removing the PHP check here: https://github.com/HaxeFoundation/haxe/blob/development/src/optimization/analyzerTexpr.ml#L379 Maybe we can figure out the exact cases where it causes trouble and only exclude those, or something. |
Stupid github-question: Can i update this merged PR or do I have to create a new one?
I think it was some special evaaluation order edge case.
Thanks, will try. Maybe the unit tests will show something. |
It's gonna require a new one, but this change alone isn't worth a PR. Just add it to the next one you send. |