Re: [phpxmlrpc-devel] formatting and php3, etc.
Brought to you by:
ggiunta
From: Edd D. <ed...@us...> - 2001-08-30 17:32:04
|
well, i think php3-friendliness is a good idea and would endorse that. i've tried to keep most of the code php3 friendly. for any code you change like this, could you write a unit test for it in testsuite.php that works before the change, and then works after -- i've started to try to do this in order that we have some kind of test suite building up. it'll help us know exactly what has or has not caused problems. on code indenting, well this is a religious issue :) i personally don't like the style with { } on a line on their own but i'm not overly bothered. i guess the answer is: if you want to change the code to look like that then you're welcome, but there may be occasional times when i forget to make it look like that :) i've tagged the current release in the CVS repository as release1_0 or something like that. it occurs to me that one problem we'll have is bugfixes to 1.0 that are urgent but come in while we're busy working on more development-like issues. therefore i propose that if we get any bugs to fix before 1.1 is ready then we perform them on a branch ie. we check out release1_0 and then tag it "stable" and perform bugfixes on that and release 1.01 or whatever. i hope i'm making some sense here. -- Edd On Wed, 2001-08-29 at 06:08, Miles Lott wrote: > Hello to all (2) of you, and others who are hidden from > the subscriber list. >=20 > I am interested in first making sure the code is > php3-compliant. We are using a modified version of this > code in phpgroupware, and it was not difficult to adjust. > For the most part this means replacing foreach with reset > and while. Since the code is not using xml_set_object or > get_class, et al, it is otherwise in good shape. >=20 > Next, I would like to go through and replace all " with '. > This has shown itself to improve performance noticeably. >=20 > Lastly, I am interested in applying a new formatting style > to the code, roughly along the lines of GNU and phpgroupware's > format. Here is a brief outline: >=20 > <?php > class myclass > { > var $somevar; > var $somearray( > 'element1' =3D> 'value', > 'element2' =3D> 1 > ); > =09 > function myclass($arg=3DFalse) > { > if($arg) > { > echo 'hello world'; > } > } > } > ?> >=20 > The whitespace above are all tabs. This format helps to ensure > that most people are able to view and understand it more clearly, > I feel. Unbracketed if statements,etc., can be a pain to troubleshoot > if you did not write the code. >=20 > I know this last item will probably spark at least some debate, > so I dare not touch that until I get some yeas and nays. >=20 --=20 Edd Dumbill --/ voice: +44 1904 427740 fax: +44 8701 640230 /-- | Managing Editor, XML.com -//- Publishing Editor, XMLhack.com | Chair, XML Europe 2002 -//- Chair, O'Reilly XTech 2001 |