Skip to content

Commit c8fd30b

Browse files
ojwbwsfulton
authored andcommitted
[PHP] Update docs for removal of -noproxy in SWIG 4.1.0
Closes swig#2419 Conflicts: CHANGES.current
1 parent 7b19a6d commit c8fd30b

File tree

3 files changed

+10
-29
lines changed

3 files changed

+10
-29
lines changed

CHANGES.current

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ Version 4.1.1 (in progress)
1414
#2447 Fix undefined behaviour in swig's parser when handling
1515
default parameter expressions containing method calls.
1616

17+
2022-11-13: olly
18+
[PHP] #2419 Update the documentation to reflect that SWIG 4.1.0
19+
dropped support for -noproxy when generating PHP wrappers.
20+
1721
2022-11-05: wsfulton
1822
#2417 Fix -swiglib for Windows when building with CMake.
1923

Doc/Manual/Php.html

Lines changed: 5 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -635,18 +635,12 @@ <H3><a name="Php_nn2_6">32.2.6 Structures and C++ classes</a></H3>
635635

636636

637637
<p>
638-
SWIG defaults to wrapping C++ structs and classes with PHP classes.
638+
SWIG wraps C++ structs and classes with PHP classes.
639639
Since SWIG 4.1.0, this is done entirely via PHP's C API - earlier SWIG
640640
versions generated a PHP wrapper script which defined proxy classes
641641
which called a set of flat functions which actually wrapped the C++ class.
642642
</p>
643643

644-
<p>
645-
If you don't want the class wrappers, you can pass the command-line option
646-
"-noproxy" in which case you'll get C++ classes wrapped as flat functions
647-
as described below.
648-
</p>
649-
650644
<p>
651645
This interface file
652646
</p>
@@ -699,33 +693,16 @@ <H4><a name="Php_nn2_6_1">32.2.6.1 Using -noproxy</a></H4>
699693

700694

701695
<p>
702-
The <tt>-noproxy</tt> option flattens the object structure and
703-
generates collections of named functions. The above example results
704-
in the following PHP functions:
696+
SWIG/PHP used to support a <tt>-noproxy</tt> option to flatten the class
697+
structure and generate collections of named flat functions. This is no
698+
longer supported as of SWIG 4.1.0.
705699
</p>
706700

707-
<div class="code"><pre>
708-
new_Vector();
709-
Vector_x_set($obj, $d);
710-
Vector_x_get($obj);
711-
Vector_y_set($obj, $d);
712-
Vector_y_get($obj);
713-
Vector_z_set($obj, $d);
714-
Vector_z_get($obj);
715-
Vector_magnitude($obj);
716-
new_Complex();
717-
Complex_re_set($obj, $d);
718-
Complex_re_get($obj);
719-
Complex_im_set($obj, $d);
720-
Complex_im_get($obj);
721-
</pre></div>
722-
723701
<H4><a name="Php_nn2_6_2">32.2.6.2 Constructors and Destructors</a></H4>
724702

725703

726704
<p>
727-
The constructor is called when <tt>new Object()</tt> (or
728-
<tt>new_Object()</tt> if using <tt>-noproxy</tt>) is used to create an
705+
The constructor is called when <tt>new Object()</tt> is used to create an
729706
instance of the object. If multiple constructors are defined for an
730707
object, function overloading will be used to determine which
731708
constructor to execute.

Doc/Manual/SWIGPlus.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ <H2><a name="SWIGPlus_nn5">6.4 Command line options and compilation</a></H2>
254254
</p>
255255

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

260260
<H2><a name="SWIGPlus_nn38">6.5 Proxy classes</a></H2>

0 commit comments

Comments
 (0)