From f1f77c218f0270fc9800b6d709794e2bf81c911a Mon Sep 17 00:00:00 2001 From: Olly Betts Date: Sun, 13 Nov 2022 15:23:42 +1300 Subject: [PATCH] [PHP] Update docs for removal of -noproxy in SWIG 4.1.0 Closes #2419 --- CHANGES.current | 4 ++++ Doc/Manual/Php.html | 33 +++++---------------------------- Doc/Manual/SWIGPlus.html | 2 +- 3 files changed, 10 insertions(+), 29 deletions(-) diff --git a/CHANGES.current b/CHANGES.current index 3cc2c6066..3f36a80df 100644 --- a/CHANGES.current +++ b/CHANGES.current @@ -7,6 +7,10 @@ the issue number to the end of the URL: https://github.com/swig/swig/issues/ Version 4.2.0 (in progress) =========================== +2022-11-13: olly + [PHP] #2419 Update the documentation to reflect that SWIG 4.1.0 + dropped support for -noproxy when generating PHP wrappers. + 2022-11-05: wsfulton #2417 Fix -swiglib for Windows when building with CMake. diff --git a/Doc/Manual/Php.html b/Doc/Manual/Php.html index 97a48b707..fad7f6a2f 100644 --- a/Doc/Manual/Php.html +++ b/Doc/Manual/Php.html @@ -635,18 +635,12 @@ variable, or assigning NULL to a variable.

-SWIG defaults to wrapping C++ structs and classes with PHP classes. +SWIG wraps C++ structs and classes with PHP classes. Since SWIG 4.1.0, this is done entirely via PHP's C API - earlier SWIG versions generated a PHP wrapper script which defined proxy classes which called a set of flat functions which actually wrapped the C++ class.

-

-If you don't want the class wrappers, you can pass the command-line option -"-noproxy" in which case you'll get C++ classes wrapped as flat functions -as described below. -

-

This interface file

@@ -699,33 +693,16 @@ Member variables and methods are accessed using the -> operator.

-The -noproxy option flattens the object structure and -generates collections of named functions. The above example results -in the following PHP functions: +SWIG/PHP used to support a -noproxy option to flatten the class +structure and generate collections of named flat functions. This is no +longer supported as of SWIG 4.1.0.

-
-new_Vector();
-Vector_x_set($obj, $d);
-Vector_x_get($obj);
-Vector_y_set($obj, $d);
-Vector_y_get($obj);
-Vector_z_set($obj, $d);
-Vector_z_get($obj);
-Vector_magnitude($obj);
-new_Complex();
-Complex_re_set($obj, $d);
-Complex_re_get($obj);
-Complex_im_set($obj, $d);
-Complex_im_get($obj);
-
-

32.2.6.2 Constructors and Destructors

-The constructor is called when new Object() (or -new_Object() if using -noproxy) is used to create an +The constructor is called when new Object() is used to create an instance of the object. If multiple constructors are defined for an object, function overloading will be used to determine which constructor to execute. diff --git a/Doc/Manual/SWIGPlus.html b/Doc/Manual/SWIGPlus.html index b4b9acb17..a3f600b40 100644 --- a/Doc/Manual/SWIGPlus.html +++ b/Doc/Manual/SWIGPlus.html @@ -254,7 +254,7 @@ details. The SWIG Wiki also has further details.

Compatibility Note: Early versions of SWIG generated just a flattened low-level C style API to C++ classes by default. -The -noproxy commandline option is recognised by many target languages and will generate just this +The -noproxy commandline option is recognised by some target languages and will generate just this interface as in earlier versions.

6.5 Proxy classes