To use the mantis API in the bugbits module, a file (core.php) from mantis needs to be included in a file from the bugbits module. This creates conflicts because both drupal and mantis are not programmed in an object oriented way. The previous solution was to patch mantis to resolve these inconsistensies, but this is an ugly hack (in my opinion, and it still might be necessary).
A better solution would be to provide a wrapper around the mantis api. But using an object with a callMethod function in which the core.php file is included doesn't work, the conflicts remain.
A new solution will soon be possible however. Namespaces will be introduced as of php 5.3 and this could mean an efficient solution to the problem. A patch file could be made to make sure all the mantis files (or all the necessary) have the mantis namespace. Calling a mantis function would reduce itself to something along mantis\functionname(args). This would also mean that php5.3 would be a minimum requirement to use the bugbits module, a big constraint for some sites I think (but worth it ;)). Development would also have to be postponed until the release of php5.3 (first quarter of 2009).
Any thoughts or other solutions to the conflict problem?
Comments
Comment #1
daften commentedComment #2
daften commentedDirect database access for user operations, the rest through the soap api is the consensus now