It existed to work around const-correctness issues in older versions of
PHP's C API. It's conceivable user code might be using it, but unlikely
and the switch to creating classes via the API is a natural time for a
compatibility break.
This PR removes the closing `?>` PHP tag from generated files. [PSR-2](https://www.php-fig.org/psr/psr-2/) states:
> The closing `?>` tag MUST be omitted from files containing only PHP.
A problem might occur if files with any character after the closing tag are used with `include` or `require`. It might trigger an output and disallow HTTP header manipulation. See the popular [_headers already sent_](https://stackoverflow.com/a/8028987/1847340) debate on SO.
Finally removed support for %pragma(php4) which was deprecated back in
2008. The replacement is %pragma(php), which has been supported since
at least 2005.
PHP5 is no longer actively supported by the PHP developers and security
support for it ends completely at the end of 2018, so it doesn't make
sense to include support for it in the upcoming SWIG 4.0.0 release.
See #701.
- Fixes generation of director method declarations containing C++11 ref-qualifiers.
- Fixes generation of director method declarations returning more complex types such
as const ref pointers.
- Rewrite Swig_method_call to use more up to date code in the core.
The directorin typemaps will now generate a temporary variable
(specified after the type), such as:
%typemap(directorin) MyType (MyType *temp) { ... use temp ... }
The shared_ptr director typemaps have been fixed for use in functions
that take more than one parameter.
- This fixes the problem of no reaching parent class variables.
Note: Any extra variables set by __set function are stored in the parent class's extras
hastable under swig_object_wrapper.
- This fixes director_basic test case. Uses the new flow in director class methods.
- It also correctly fixes the double free problem in director_detect.
- Rename class entry variables to SWIGTYPE_class_ce
- Refactor factory code to use SWIGTYPE_class_ce to create objects
- Refactor ConvertPtr to work of wrapped class objects.
- Change the need of runtime check on old or new flow at wrapper generation time.
- Change the check on add ZEND_ACC_ABSTRACT to GetFlag(n, "abstract") && Swig_directorclass(Swig_methodclass(n))
- workaround to solve abstract testcases at the moment.
- Remove redundant code in class handler for getting namespaces (Not the correct approact) and use of zend_register_class_alias_ex.
- Refactor choosing of class name to use sym:name by default.
- Change enum_scope_template test to use class enums.
- Move the conversion of void* of ptr in swig wrapper to class pointer to Lib files.
- Synchronize between old and new flow. Old flow to accept newly created objects,
with the use of a new property SWIG_classWrapper to newly created objects.
- ZEND_BEGIN_ARG_INFO_EX to hold exact number of arguments required.
- Fix the constructor overloading bug in the in-house Swig_class_overload_dispatch function
- Add helper function to check if the class is wrapped.
- Add ZEND_ACC_ABSTRACT to virtual functions to make the class abstract.
- Change how wname is selected for staticmemberfn.
- Helper function to get names without namespace getNameWithoutNamespace.
- Fix bugs on class entry level at class handler.
- Move all entry level code to class handler from class decleration.
- Checking if base.item is null before using it.
- Check if the parent class is wrapped before using its class entry.
Code Refactor
- Refactor code for return type of SWIGTYPE
- Workaround for Namespaced classes.
- Refactor code of SWIG_SetZval to take care of objects in class constructor.
- Introduce SWIG_generalize_object to generalize each object to swig object wrapper.
- Catch feature:immutable instead of feature:warnfilter - 462 for missing setter.
- Refactor code to create PHP objects for all instances of value, reference and pointer return types of C++ objects.
- Introduce getAccessMode to get the Access Mode of a method for generating Wrapper.
- Refactor free_object creation to include need_free condition. This is to check if there is a need to free. (Virtual Protected Destructors)
- Support for feature:exceptionclass. Extends class Exception.
- Improve condition check in Director class constructor to distinguish between, extended class creation or not.
Swig::Director::swig_is_overridden_method is used.
- rewire return of type SWIGTYPE
- {NULL, NULL, NULL} to ZEND_FE_END
- feature:warnfilter - 462 of missing setter
- refactor code of return type (replaced)
- support conversion_operator
Refactor Code
- Support Director Classes.
- %rename support of class names and method names.
- Creation and destruction methods after inline code.
- Test case check::function return true. - Needs Fixup
- Support different return types of pointers. - Fixup
- Support the rename functionality in class names.
- Redirect the resource destructor to the class desctructor if its a class resource - Object pointers.