Commit graph

21 commits

Author SHA1 Message Date
Seth R Johnson
de78b80de9 Renames performed by %namewarn with rename= are printed in warning message
This is necessary for regex-like renames (where you can't use the #define trick
as is done in many of the %keywordwarn directives). It's now unnecessary to print
the "renaming to '`x`'" code explicitly by the kw.swg files.
2022-02-06 13:51:37 -05:00
Olly Betts
7d75e3eb7e [PHP] Add new PHP 8.1 keyword
Add PHP keyword 'readonly' (added in 8.1) to the list SWIG knows to
automatically rename.  This keyword is special in that PHP allows it to
be used as a function (or method) name.
2021-12-18 15:30:38 +13:00
Olly Betts
b671a37e89 [php] Fix reserved class names TRUE, FALSE, NULL
PHPCN(x) does a string compare of x with the lower-cased class name,
so x needs to be in lowercase or else the entry has no effect.  The
entries for TRUE, FALSE and NULL weren't working as a result.
2021-05-12 16:45:42 +12:00
Olly Betts
853c511057 [php] Update keyword list
Add some missing entries, remove some long obsolete entries (from
the "ming" extension for generating SWF files, which was split
out from PHP core in 2008), and entry for "static" as a reserved class
name (`static::` is used for late static bindings, but attempting to
name a PHP class `static` fails because `static` is a keyword and we
also list it as such).
2021-05-12 16:43:32 +12:00
Olly Betts
76c2c4675b [PHP] Update PHP keyword list
Add PHP keywords 'fn' (added in 7.4) and 'match' (added in 8.0) to the
list SWIG knows to automatically rename.
2021-03-26 08:24:40 +13:00
Alexander Gabriel
ccbc16f810 PHP: Make reserved keywords to reserved function only (#1335)
[php] Make Keywords which are functions reserved functions
2018-10-29 08:41:16 +13:00
Olly Betts
d6d5db122b Remove support for PHP5
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.
2018-06-07 18:09:03 +12:00
Olly Betts
1169874f59 [PHP] Add support for PHP7.
PHP5's C extension API has changed substantially so you need to use
-php7 to specify you want PHP7 compatible wrappers.
Fixes https://github.com/swig/swig/issues/571
2016-11-30 13:05:59 +13:00
Olly Betts
b58caf6978 Add more new PHP5.6 keywords 2014-06-08 22:04:55 +12:00
Olly Betts
06e5a5fb0d [PHP] Update the lists of PHP keywords with new ones from PHP 5.4
and newer (and some missing ones from 5.3).  Reserved PHP constants
names are now checked against enum values and constants, instead
of against function and method names.  Built-in PHP function names
no longer match methods added by %extend.  Functions and methods
named '__sleep', '__wakeup', 'not', 'parent', or 'virtual' are no
longer needlessly renamed.
2014-02-19 17:21:34 +13:00
Olly Betts
36c22b70bd Make PHP %keywordwarn message wording consistent with other languages 2014-02-19 16:51:31 +13:00
William S Fulton
c151a0d69a Add array function PHP keywords 2013-11-11 19:12:48 +00:00
Olly Betts
ee474ece0e Update keyword list to include keywords add in PHP releases up to 5.3.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12845 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-11-28 04:07:44 +00:00
William S Fulton
4308dd03cf SWIG license change - The Examples and Lib move to a very permissive license in the LICENSE file, removing the BSD license restrictions as agreed by committers since it was inadvertently introduced. Remove some examples where the impact of the license change is not clear.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11874 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-02-27 23:26:02 +00:00
Olly Betts
b2fc62f21f [PHP] Add datetime to the list of PHP predefined classes (patch from David
Fletcher in SF#2931042).


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11822 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-01-13 11:53:18 +00:00
Olly Betts
2c74fbf9e4 [PHP] Fix warning and rename of reserved class name to be case insensitive.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11763 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-12-02 13:02:38 +00:00
Olly Betts
3675a7baf7 Add min and max as built-in functions.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11555 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-08-14 01:00:36 +00:00
Miklos Vajna
a9f9b7cbbf PHP: fix for the li_math testcase
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11496 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-08-04 10:32:25 +00:00
Olly Betts
c321421bc5 [PHP] Update warnings about clashes between identifiers and PHP
keywords and automatic renaming to work with the PHP5 class 
wrappers.  Fixes SF#1613679.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11460 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-07-28 13:12:06 +00:00
Olly Betts
949ea9b580 [PHP] Update the list of PHP keywords - "cfunction" is no longer a
keyword in PHP5 and PHP 5.3 added "goto", "namespace", "__DIR__",
and "__NAMESPACE__".


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11368 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-07-05 05:40:50 +00:00
Olly Betts
3d3bc01a2f Rename php4*.swg to php*.swg.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10635 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-07-03 00:37:38 +00:00
Renamed from Lib/php/php4kw.swg (Browse further)