[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pear-doc
Subject:    [PEAR-DOC] [PEAR-BUG] Req #3836 [Opn->Csd]: Coding standards overlook topics
From:       cweiske () php ! net
Date:       2009-05-04 20:09:27
Message-ID: 20090504210849.67376193A25 () euk1 ! php ! net
[Download RAW message or body]

Edit report at http://pear.php.net/bugs/bug.php?id=3836&edit=1

 ID:               3836
 Updated by:       cweiske@php.net
 Reported By:      drewish at katherinehouse dot com
 Summary:          Coding standards overlook topics
-Status:           Open
+Status:           Closed
 Type:             Feature/Change Request
 Package:          Documentation
 PHP Version:      Irrelevant
-Assigned To:      
+Assigned To:      cweiske
 Roadmap Versions: 
 New Comment:

-Status:      Open
+Status:      Closed
-Assigned To:
+Assigned To: cweiske

The issue has been resolved by the PEAR2 Coding standards:
http://pear.php.net/manual/en/pear2cs.rules.php


Previous Comments:
------------------------------------------------------------------------

[2006-08-05 04:45:55] wiesemann

> die() is allowed, in very rare cases, when the situation
> requires it.

Yes, okay. We found yesterday this
die('Checksum error on entry '.$this->currentFilename);
in File_Archive, which is very bad error handling and makes it unusable
without patching the code.

> If you add it to the CS, please try to say that it is not
> recommended to use die but in extremely rare cases.

For now, this was only a comment, so it does not get lost. 

In longer terms, we should have a new page in the CS section that talks
about error handling:
- PEAR_Error in PHP 4
- PEAR_Exception in PHP 5
- using die/exit

------------------------------------------------------------------------

[2006-08-04 08:58:47] pajoye

die() is allowed, in very rare cases, when the situation requires it.
If you add it to the CS, please try to say that it is not recommended to
use die but in extremely rare cases.

------------------------------------------------------------------------

[2006-08-04 08:26:39] wiesemann

I'd like to add here, that the CS section in the manual does not state
that using die() is not allowed.

------------------------------------------------------------------------

[2005-03-16 03:37:15] drewish

I can understand the reluctance to start making changes. It's
practically inviting religious warfare. That said, I think even
acknowledging that there is no agreed upon standard is better than
omitting it.

------------------------------------------------------------------------

[2005-03-16 03:03:37] smith at backendmedia dot com

I think Toby started an RFC a while back, but he in the end didnt
persue it to the end. I also agree this should be in the CS. One of the
tricky topics was if non public classes need to reside in their own file
as well or not.

There are also other topics like multiline conditions that are not in
the CS.

All in all most people see the CS as a pandoras box in glass. Do not
open it to add anything, cause the result could be very unpleasent
quickly.

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://pear.php.net/bugs/bug.php?id=3836

-- 
Edit this bug report at http://pear.php.net/bugs/bug.php?id=3836&edit=1


-- 
PEAR Documentation List Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic