]> granicus.if.org Git - php/commit
Fixed Bug #60165 (Aliasing unexisting trait should throw/trigger the exception/error)
authorStefan Marr <gron@php.net>
Thu, 17 Nov 2011 21:04:15 +0000 (21:04 +0000)
committerStefan Marr <gron@php.net>
Thu, 17 Nov 2011 21:04:15 +0000 (21:04 +0000)
commitc5ba229617700f0b1ef4bb9ef0b06cbe3bd4bced
tree34f8aa8daa144dc42bac2d8d8375204cf3aad597
parentc2ad166fd584edf577fa0b295332c9158bd47d39
Fixed Bug #60165 (Aliasing unexisting trait should throw/trigger the exception/error)

- aliases that are not actually matching anything are treated as errors now. This
  will make sure that all methods that are expected to be in a class are actually
  there, or in case a trait changed for instance, that the code breaks already
  on composition
- Precedence declarations are also checked to ensure that the method
  which is supposed to take precedence actually exists, however,
  the other traits mentioned in the declaration are not regarded.
  We are more lenient here, since this avoids unnecessary fragility.
- fixed another seamingly unrelated test which broke in the progress
  but wasn't clear before either.
Zend/tests/traits/bug60165a.phpt [new file with mode: 0644]
Zend/tests/traits/bug60165b.phpt [new file with mode: 0644]
Zend/tests/traits/bug60165c.phpt [new file with mode: 0644]
Zend/tests/traits/bug60165d.phpt [new file with mode: 0644]
Zend/tests/traits/language011.phpt
Zend/zend_compile.c