Skip to content
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

Remove old PHP target #6612

Merged
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
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ matrix:
#########
- os: linux
env:
- TEST=macro,neko,js,php,php7,flash9,as3,java,cs,python,hl,lua
- TEST=macro,neko,js,php,flash9,as3,java,cs,python,hl,lua
- DEPLOY_API_DOCS=1
- DEPLOY_NIGHTLIES=1
# - SAUCE=1
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ environment:
secure: ewwkKcjnSKl/Vtrz1SXmI6XKk1ENmJDyzm5YaR2wi03foRhTke29TvymB21rDTSl
matrix:
- ARCH: 64
TEST: "neko,python,cs,java,php7,php,macro"
TEST: "neko,python,cs,java,php,macro"
DEPLOY_NIGHTLIES: 1
- ARCH: 64
TEST: "cpp"
Expand Down
1 change: 1 addition & 0 deletions extra/CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

all : moved haxe.unit to hx3compat
all : moved haxe.web.Request to hx3compat
php : dropped php5 support; minimum supported php version is 7.0 now

Bugfixes:

Expand Down
7 changes: 1 addition & 6 deletions extra/ImportAll.hx
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,8 @@ class ImportAll {
haxe.macro.Compiler.define("doc_gen");
}
switch( pack ) {
case "php7":
if( !Context.defined("php7") ) return;
case "php":
if( !Context.defined("php") || Context.defined("php7") ) return;
if( !Context.defined("php") ) return;
case "neko":
if( !Context.defined("neko") ) return;
case "js":
Expand Down Expand Up @@ -87,9 +85,6 @@ class ImportAll {
case "haxe.remoting.SyncSocketConnection": if( !(Context.defined("neko") || Context.defined("php") || Context.defined("cpp")) ) continue;
case "sys.db.Sqlite" | "sys.db.Mysql" | "cs.db.AdoNet": continue;
}
if( Context.defined("php7") && cl.indexOf("php7.") == 0 ) {
cl = "php." + cl.substr("php7.".length);
}
Context.getModule(cl);
} else if( sys.FileSystem.isDirectory(p + "/" + file) )
run(full);
Expand Down
6 changes: 0 additions & 6 deletions extra/all.hxml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,6 @@

--next

-D php7
-php all_php7
-xml php7.xml

--next

-php all_php
-xml php.xml

Expand Down
14 changes: 2 additions & 12 deletions src/compiler/main.ml
Original file line number Diff line number Diff line change
Expand Up @@ -242,14 +242,7 @@ module Initialize = struct
add_std "lua";
"lua"
| Php ->
if Common.is_php7 com then
begin
com.package_rules <- PMap.add "php" (Directory "php7") com.package_rules;
com.package_rules <- PMap.add "php7" Forbidden com.package_rules;
add_std "php7"
end
else
add_std "php";
add_std "php";
"php"
| Cpp ->
Common.define_value com Define.HxcppApiLevel "332";
Expand Down Expand Up @@ -321,10 +314,7 @@ let generate tctx ext xml_out interp swf_header =
| Lua ->
Genlua.generate,"lua"
| Php ->
if Common.is_php7 com then
Genphp7.generate,"php"
else
Genphp.generate,"php"
Genphp7.generate,"php"
| Cpp ->
Gencpp.generate,"cpp"
| Cs ->
Expand Down
23 changes: 7 additions & 16 deletions src/context/common.ml
Original file line number Diff line number Diff line change
Expand Up @@ -324,8 +324,6 @@ let get_signature com =
com.defines_signature <- Some s;
s

let is_php7 com = com.platform = Php && PMap.exists "php7" com.defines

module CompilationServer = struct
type cache = {
c_haxelib : (string list, string list) Hashtbl.t;
Expand Down Expand Up @@ -607,7 +605,7 @@ module Define = struct
| JsEnumsAsObjects -> "js_enums_as_objects",("Generate enum representation as object instead of as array",[Platform Js])
| JsUnflatten -> "js_unflatten",("Generate nested objects for packages and types",[Platform Js])
| JsSourceMap -> "js_source_map",("Generate JavaScript source map even in non-debug mode",[Platform Js])
| SourceMap -> "source_map",("Generate source map for compiled files (Currently supported for php7 only)",[Platform Php])
| SourceMap -> "source_map",("Generate source map for compiled files (Currently supported for php only)",[Platform Php])
| KeepOldOutput -> "keep_old_output",("Keep old source files in the output directory (for C#/Java)",[Platforms [Cs;Java]])
| LoopUnrollMaxCost -> "loop_unroll_max_cost",("Maximum cost (number of expressions * iterations) before loop unrolling is canceled (default 250)",[])
| LuaJit -> "lua_jit",("Enable the jit compiler for lua (version 5.2 only)",[Platform Lua])
Expand All @@ -634,8 +632,8 @@ module Define = struct
| Objc -> "objc",("Sets the hxcpp output to objective-c++ classes. Must be defined for interop",[Platform Cpp])
| OldConstructorInline -> "old-constructor-inline",("Use old constructor inlining logic (from haxe 3.4.2) instead of the reworked version.",[])
| OldErrorFormat -> "old-error-format",("Use Haxe 3.x zero-based column error messages instead of new one-based format.",[])
| PhpPrefix -> "php_prefix",("Compiled with --php-prefix",[Platform Php])
| RealPosition -> "real_position",("Disables Haxe source mapping when targetting C#, removes position comments in Java and Php7 output",[Platforms [Cs;Java;Php]])
| PhpPrefix -> "php_prefix",("Root namespace for generated php classes. E.g. if compiled with`--php-prefix some.sub`, then all classes will be generated in `\\some\\sub` namespace.",[Platform Php])
| RealPosition -> "real_position",("Disables Haxe source mapping when targetting C#, removes position comments in Java and Php output",[Platforms [Cs;Java;Php]])
| ReplaceFiles -> "replace_files",("GenCommon internal",[Platforms [Java;Cs]])
| Scriptable -> "scriptable",("GenCPP internal",[Platform Cpp])
| ShallowExpose -> "shallow-expose",("Expose types to surrounding scope of Haxe generated closure without writing to window object",[Platform Js])
Expand Down Expand Up @@ -756,17 +754,10 @@ let get_config com =
pf_reserved_type_paths = [([],"Object");([],"Error")];
}
| Php ->
if is_php7 com then
{
default_config with
pf_static = false;
}
else
{
default_config with
pf_static = false;
pf_pad_nulls = true;
}
{
default_config with
pf_static = false;
}
| Cpp ->
{
default_config with
Expand Down
12 changes: 5 additions & 7 deletions src/context/meta.ml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ type strict_meta =
| LibType
| LoopLabel
| LuaRequire
| LuaDotMethod
| LuaDotMethod
| Meta
| Macro
| MaybeUsed
Expand Down Expand Up @@ -119,7 +119,6 @@ type strict_meta =
| Op
| Optional
| Overload
| PhpConstants
| PhpGlobal
| PhpClassConst
| PhpMagic
Expand Down Expand Up @@ -317,11 +316,10 @@ let get_info = function
| Op -> ":op",("Declares an abstract field as being an operator overload",[HasParam "The operation";UsedOn TAbstractField])
| Optional -> ":optional",("Marks the field of a structure as optional",[UsedOn TClassField])
| Overload -> ":overload",("Allows the field to be called with different argument types",[HasParam "Function specification (no expression)";UsedOn TClassField])
| PhpConstants -> ":phpConstants",("Marks the static fields of a class as PHP constants, without $",[Platform Php;UsedOn TClass])
| PhpGlobal -> ":phpGlobal",("(php7) Puts the static fields of a class in the global PHP namespace",[Platform Php;UsedOn TClass])
| PhpClassConst -> ":phpClassConst",("(php7) Generate static var of an extern class as a PHP class constant",[Platform Php;UsedOn TClass])
| PhpMagic -> ":phpMagic",("(php7) Treat annotated field as special PHP magic field",[Platform Php;UsedOn TClassField])
| PhpNoConstructor -> ":phpNoConstructor",("(php7) Special meta for extern classes which does not have native constructor in PHP, but need a constructor in Haxe extern",[Platform Php;UsedOn TClass])
| PhpGlobal -> ":phpGlobal",("Indicates that static fields of an extern class actually are located in the global PHP namespace",[Platform Php;UsedOn TClass])
| PhpClassConst -> ":phpClassConst",("Indicates that a static var of an extern class is a PHP class constant",[Platform Php;UsedOn TClassField])
| PhpMagic -> ":phpMagic",("Treat annotated field as special PHP magic field. This meta makes compiler avoid renaming such fields on generating PHP code.",[Platform Php;UsedOn TClassField])
| PhpNoConstructor -> ":phpNoConstructor",("Special meta for extern classes which do not have native constructor in PHP, but need a constructor in Haxe extern",[Platform Php;UsedOn TClass])
| Pos -> ":pos",("Sets the position of a reified expression",[HasParam "Position";UsedOn TExpr])
| Public -> ":public",("Marks a class field as being public",[UsedOn TClassField;UsedInternally])
| PublicFields -> ":publicFields",("Forces all class fields of inheriting classes to be public",[UsedOn TClass])
Expand Down
Loading