]> granicus.if.org Git - php/commit
Implement additional type reservations
authorNikita Popov <nikic@php.net>
Mon, 30 Mar 2015 20:05:26 +0000 (22:05 +0200)
committerNikita Popov <nikic@php.net>
Mon, 30 Mar 2015 20:59:06 +0000 (22:59 +0200)
commit53a40386bc81da824468ac3aa8b1962ab7029238
treedb15d2da7900c4726b3ae6e775a59fa0354cb50f
parent607b7d662a854443713e8a9c651c888527718618
Implement additional type reservations

 * The class names false, true and null are now reserved.
 * The code dealing with reserved class names is now decoupled
   from scalar type hint handling. It also includes self, parent,
   and static, which are class names which were already reserved
   previously.
 * Reuse existing messages for reserved class names.

Fallout: class_alias() can no longer alias self, parent and static.
However this never really worked in the first place, as the test
which was testing this shows.
16 files changed:
Zend/tests/class_alias_003.phpt [deleted file]
Zend/tests/typehints/scalar_relative_typehint_disallowed.phpt
Zend/tests/typehints/scalar_reserved2.phpt
Zend/tests/typehints/scalar_reserved2_class_alias.phpt
Zend/tests/typehints/scalar_reserved2_use.phpt
Zend/tests/typehints/scalar_reserved3.phpt
Zend/tests/typehints/scalar_reserved3_class_alias.phpt
Zend/tests/typehints/scalar_reserved3_use.phpt
Zend/tests/typehints/scalar_reserved4.phpt
Zend/tests/typehints/scalar_reserved4_class_alias.phpt
Zend/tests/typehints/scalar_reserved4_use.phpt
Zend/tests/typehints/scalar_reserved6.phpt
Zend/tests/typehints/scalar_reserved6_class_alias.phpt
Zend/tests/typehints/scalar_reserved6_use.phpt
Zend/tests/typehints/scalar_reserved7.phpt
Zend/zend_compile.c