News Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Brian Moon's Blog:
Monitoring PHP Errors
November 09, 2010 @ 11:09:16

Brian Moon has a new post to his blog that pulls together some of his thoughts on monitoring PHP applications and how to handle the error that might be thrown.

PHP errors are just part of the language. Some internal functions throw warnings or notices and seem unavoidable. A good case is parse_url. The point of parse_url is to take apart a URL and tell me the parts. Until recently, the only way to validate a URL was a regex. You can now use filter_var with the FILTER_VALIDATE_URL filter. But, in the past, I would use parse_url to validate the URL. It worked as the function returns false if the value is not a URL. But, if you give parse_url something that is not a URL, it throws a PHP Warning error message. The result is I would use the evil @ to suppress errors from parse_url. Long story short, you get errors on PHP systems. And you don't need to ignore them.

He talks about the two-step process he's upgraded to to help monitor and handle the errors that pop up - an error handler that logs human-readable and json versions of the errors and something like Circonus to do metric tracking. He also mentions some external services recommended on twitter - HopToad and Loggly.

0 comments voice your opinion now!
monitor error manage aggregate metric log


Sebastian Bergmann's Blog:
RC2 Is The New RC1 (PHPUnit)
November 13, 2007 @ 10:24:00

Sebastian Bergmann has posted about the latest release of the popular unit testing framework for PHP, PHPUnit 3.2.

I have just released a second release candidate for PHPUnit 3.2, the next major version of the xUnit testing framework for PHP.

According to the Changelog, updates in this new Release Candidate include a number of updates to the software metrics that can be run on code (at project, file, function, class and method level), the addition of DbUnit, code coverage improvements, bug fixes to the TestUI test runner and Selenium integration and much more.

0 comments voice your opinion now!
phpunit unittest releasecandidate codecoverage software metric dbunit runner selenium phpunit unittest releasecandidate codecoverage software metric dbunit runner selenium


Sebastian Bergmann's Blog:
Copy & Paste Detection in PHPUnit 3.2
August 22, 2007 @ 09:31:00

Sebastian Bergmann spotlights another feature of the upcoming PHPUnit version 3.2 - the inclusion of a Project Mess Detector's ability to help find duplicate code.

Duplicate code can be hard to find, especially in a large project. Johann-Peter Hartmann of MAYFLOWER GmbH recently implemented Copy & Paste Detection for PHPUnit's growing set of features that extends its usage scenarios beyond "just unit testing" to a one-stop solution for quality assurance in PHP-based projects.

In his example, Sebastian shows what the response will look like when the tests find duplicate code - giving details like the files involved and the code fragment that was duplicated.

Check out this list in another post on Sebastian's blog for more of the metrics that will be included in the upcoming version.

1 comment voice your opinion now!
phpunit unittest metric software copyandpaste detection mess detector phpunit unittest metric software copyandpaste detection mess detector


Sebastian Bergmann's Blog:
PHPUnit as a Project Mess Detector
August 09, 2007 @ 20:47:06

Sebastian Bergmann has a new post today about a different sort of use for the PHPUnit testing software - a "Project Mess Detector".

As of version 3.2, PHPUnit will not only be able to calculate and collect a variety of software metrics. It will also be able to report violations of rules that are based on these metrics in PMD's XML format. This information can then be fed to any tool that integrates with PMD.

The Project Mess Detector (PMD) software scans code and looks for potential problems. Having this integrated with PHPUnit means one less piece of software to run and the potential for even better written code.

0 comments voice your opinion now!
phpunit pmd projectmessdetector software metric phpunit pmd projectmessdetector software metric


Sebastian Bergmann's Blog:
PHPUnit and Software Metrics
August 03, 2007 @ 12:06:00

In a update to his recent post on Cyclomatic Complexity in PHPUnit, Sebastian Bergmann has given more information about the software metrics support that the upcoming release (3.1.6) of PHPUnit will offer.

The upcoming 3.1.6 release of PHPUnit adds a couple of software metrics to the data that is stored in PHPUnit's test database.

Among the metrics gathered are things like: lines of code, commented lines of code, an attribute inheritance factor, depth of inheritance tree, method hiding factor and a polymorphism factor (he links each of these more complex ones for more information on the subject). Still included in the post is an example of the output for the Cyclomatic Complexity metric.

0 comments voice your opinion now!
phpunit software metric level file class method cyclomatic phpunit software metric level file class method cyclomatic



Community Events





Don't see your event here?
Let us know!


language opinion introduction series interview laravel install community framework symfony list api deployment tips zendserver package podcast update release library

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework