LogoPhly, boy, phly
the weblog and site of Matthew Weier O'Phinney

Friday, April 22. 2005

Cgiapp 1.6.0 Released

Cgiapp 1.6.0, "Wart Removal", has been released!

This release does not add any new methods, but adds quite a lot in terms of functionality:

  • phpt tests. I finished writing a suite of unit tests using the phpt framework popularized by the PHP-QA project and PEAR. This process helped me find some obscure bugs in the class, as well as some... well, downright ugly code, and to fix these areas. (To be honest, most of the 'ugly' code was a result of being too literal when porting from perl and not using more standard PHP functionality.) Among the bugs fixed:
    • s_delete() now works properly.
    • param() and s_param() now behave gracefully when given bad data (as do a number of other methods)
    • _send_headers() and the header_*() suite now function as documented.
    • All methods now react gracefully to bad input.
  • Error handling. carp() and croak() no longer echo directly to the output stream (and, in the case of croak(), die); they use trigger_error(). This will allow developers to use carp() and croak() as part of their regular arsenal of PHP errors -- including allowing PHP error handling. Additionally, most croak() calls in the class were changed to carp() as they were not truly fatal errors.
  • PEAR packaging. Cgiapp can now be installed using PEAR's installer. Simply download the package and type 'pear install Cgiapp-1.6.0.tgz' to get Cgiapp installed sitewide on your system!

As usual, Cgiapp is available at the Cgiapp website.

Posted by Matthew Weier O'Phinney in PHP at 23:50 | Comments (6) | Trackbacks (0)

Trackbacks
Trackback specific URI for this entry

No Trackbacks

Comments
Display comments as (Linear | Threaded)

hey matt-
parse error like 1694 in cgiapp distro, you have the keyword public in front the of the function declaration for s_param, so it breaks in php 4.
#1 kenrick buchanan (Link) on 2005-04-24 15:30 (Reply)
Thanks for the report -- guess you can figure out which version of PHP I've been using for testing!

I've corrected this and released version 1.6.1.
#1.1 Matthew (Link) on 2005-04-24 20:23 (Reply)
also, when I use the new 1.6 version (have not tried 1.61 yet) my application which previously worked fine with 1.53 no longer works. whoops. I have not had time to check it out in depth, the water pressure valve regulator on my house busted today so im pretty busy, but I will try to check it later this evening.
#2 kenrick buchanan (Link) on 2005-04-24 20:51 (Reply)
Please let me know what you find. I've done quite a bit of testing on it, but primarily on PHP5, so there may be some PHP4-specific areas I need to address.


However, the primary difference between 1.5.3 and 1.6.x is that (a) I added unit tests (which didn't affect the code), (b) I changed most croak()s to carp()s (which, if anything, should allow your code to continue running!), and (c) I cleaned up some conditionals to use more standard PHP annotation (such as !empty($var) instead of (!is_null($var) && ('' != $var))). I'm very curious to see if/how any of these broke from the 1.5.3 release, so bug reports are definitely valuable.


Speaking of bug reports, if you figure out exactly what the issue is and can reproduce it, enter a bug on the cgiapp sourceforge bug tracker so I can record it for posterity -- and others can follow the issue:

http://sourceforge.net/tracker/?atid=702406&group_id=125419&func=browse
#2.1 Matthew (Link) on 2005-04-24 21:55 (Reply)
Ok I figured it out, its not a bug exactly, but you did change the functionality of the load_tmpl function. In previous versions you didn't do the is_a check in the load_tmpl function, and now you specifically look for a smarty instance. I really dont like smarty so I use Savant instead. I previously didnt overload the load_tmpl function, since all you did was call $this->_TEMPLATE->fetch() on the template object. Oh well, took a while to figure that out but now everything seems to be working ok. Thanks Mattew.
#3 kenrick buchanan (Link) on 2005-04-25 11:02 (Reply)
Ah yes -- I needed to do the is_a() call in order to pass the unit tests. As noted in the documentation, if you wish to use another template engine, you will need to override the various tmpl_* and *_tmpl methods. Glad you were able to figure it out!
#3.1 Matthew (Link) on 2005-04-25 16:33 (Reply)

Add Comment

Standard emoticons like :-) and ;-) are converted to images.
E-Mail addresses will not be displayed and will only be used for E-Mail notifications

To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.
CAPTCHA

 
 
  • Home
  • Resume
  • Blog
  • Phly PEAR Channel
  • Contact Me
  • About this site

ZCE

Zend Education Advisory Board Member

Add to Technorati Favorites

Calendar

Back August '08 Forward
Mon Tue Wed Thu Fri Sat Sun
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31

Quicksearch

Links

  • PHLY - PHp LibrarY
  • Paul M. Jones
  • Mike Naberezny
  • Shahar Evron
  • Planet PHP
  • Zend Where I now work
  • Garden.org Where I once worked

Archives

August 2008
July 2008
June 2008
Recent...
Older...

Categories

XML Linux
XML Personal
XML Aikido
XML Family
XML Programming
XML Perl
XML PHP

All categories

Syndicate This Blog

XML RSS 0.91 feed
XML RSS 1.0 feed
XML RSS 2.0 feed
ATOM/XML ATOM 0.3 feed
ATOM/XML ATOM 1.0 feed
XML RSS 2.0 Comments

Show tagged entries

xml best practices
xml books
xml conferences
xml dojo
xml dpc08
xml file_fortune
xml linux
xml mvc
xml pear
xml personal
xml php
xml programming
xml ubuntu
xml webinar
xml zendcon
xml zend framework
© 2004 - present, Matthew Weier O'Phinney
matthew-web <at> weierophinney.net