walle/wsdl2phpgenerator — Issue #12: Constants with names resolving to PHP primitives are created incorrectly
Author: rgantt
Created: 2011-11-11 19:16:39+00:00
State: open

Something weird is happening in `PhpClass::addConstant( $value, $name )`: whenever a constant is added with a name that resolves to a PHP primitive (e.g. `DECIMAL` --> `float`, `INTEGER` --> `int`, `LONG` --> `int`), the name of the primitive is added as a constant instead of the name itself.

This is a problem in situations, for example, where we have a WSDL describing an enumeration with constants like the following:

In this case, an exception is thrown because `INTEGER` and `LONG` both resolve to `int`.