Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.5.6

Request #12510 some changes in Generator.php
Submitted: 2007-11-23 13:39 UTC
From: cwiedmann Assigned: wiesemann
Status: Closed Package: DB_Table (version CVS)
PHP Version: Irrelevant OS: Irrelevant
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 17 + 43 = ?

 
 [2007-11-23 13:39 UTC] cwiedmann (Carsten Wiedmann)
Description: ------------ Hello, the main things: a) getTableNames() also sets the MDB2 portability mode. Maybe this should also remporarily in this method? b) buildTableClasses() calls getTableDefinition(), but don't return the error, if any. c) In the created "Database.php, the database name should added to the example dns string. I have also done some other work with this file. This makes it easier for me to use the created files (or test something): a) The created file "Database.php" have now a complete error checking. b) The values for the dns variables are now dynamic created, according to the values you have used during generation. c) In the generated table class files, the " => " are now justified. d) The generated files ends now with a newline. e) I have changed the comment style in the generated files. f) If an error occurs during file/directory creation, e PEAR Error is returned. At least some code cleanup: a) Removing trailing whitespaces in comments b) implode() is allways called with parameter order according to the PHP manual c) And of course, the file is now "100% cweiske" ;-) No errors/warnings with phpcs. Well, I don't know I you love all changes. So just look what happens after applying the patch, to see what I mean. With the patch I have an other problem. It is 58 KB. So I can't upload it in this bug system. If you are interested, I can mail it. Regards, Carsten

Comments

 [2007-11-30 12:23 UTC] wiesemann (Mark Wiesemann)
Carsten, thanks for the proposed patch. I agree about the three "main things": yes, they should be changed. I guess that only the other things ("other work", "code cleanup") are already in the patch? If you want, you can also include the first three changes, but you're also very much welcome to send the patch that you already have via email.
 [2007-12-10 22:03 UTC] wiesemann (Mark Wiesemann)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.