Feb 10
Permalink

Agavi 1.0.0 beta 9 released!

Agavi 1.0.0 beta 9 is now available for download at www.agavi.org.

This release includes a relatively modest number of changes over 1.0.0 beta 8:

  • Testing infrastructure (experimental!) was declared “finished” (it will be changed and improved until at least 1.1)
  • Routing callbacks can now return an AgaviResponse from onMatched() and onNotMatched()
  • Cache group callbacks need to throw an exception of type AgaviUncacheableException now to prevent caching
  • Routing callbacks now have onNotMatched() called by the framework, even if the same callback’s onMatched() method returns false
  • Several regressions were fixed in the new Routing.

As always, the CHANGELOG has a complete list of all changes.

There is, however, one new feature that I’d like to devote special attention to:

A new API for accessing information about the result of a validation run is now available through AgaviValidationManager::getReport(). It is vastly more convenient and capable of the previous APIs which have been deprecated.

The primary instrument for accessing validation result information are query objects, which you can retrieve using AgaviValidationReport::createQuery(). They have methods for defining query filter rules (byArgument, byValidator, byMinSeverity, byErrorName), which form a fluent interface. Methods like has(), count() or getErrorMessages() are available to retrieve information from the resulting collection.

This new interface allows you to query any kind of result from the validation system in just one (albeit long) line of code, and we’re pretty excited about it, because, frankly, the old APIs were a bit of a mess and not very intuitive to use.

Be sure to check out ticket #1022 to see some examples on how to use the new interface.

We’ll release an RC1 very soon now, so stay tuned, friends!