Agavi 1.0.3 has just been released and can be downloaded at www.agavi.org.
Only very few changes were done since RC1, so I’ll once more leave it to the RELEASE_NOTES to list the most important changes:
This maintenance release fixes a number of issues over Agavi 1.0.2 and features a few minor enhancements.
Several issues and inconsistencies have been fixed in AgaviNumberValidator and AgaviDecimalFormatter::parse(). Parsing behavior is now consistent with the NumberFormatter implementations of ICU and ext/intl. No integer overflow occurs when checking against min and max values, and the validator accepts non-strings as input. Exporting of the validated value is now possible, in which case the original argument is not mutated. Please note that the “number” validator shortcut definition specifies “int” as the default value for the “type” parameter. No value for “type” will automatically lead to integer or float values, depending on the size of the number in the input string. A cast to the specified type is now automatically performed if no “cast_to” parameter is given.
All file validators now perform case-insensitive checks against the list of allowed file extensions, which may now also be a parameter array instead of a space-separated list of values.
This release bumps the minimum required version of Phing to 2.4.0; this was necessary to fix some bugs with the build system that were next to impossible to fix for both 2.3 and 2.4 (which drastically changed some internals structures) at the same time.
An issue relating to the behavior of DOM in PHP 5.1.12 and PHP 5.2.3 has been addressed. Running Agavi 1.0.3 might be necessary under certain circumstances when using these versions of PHP.
A couple of minor fixes have been made to the routing; most notably, overwriting of routes in other <ae:configuration> blocks now always works as expected, even when using implied routes.
Some default code templates have been updated; most notably, caching configuration files now explicitly disable caching, as otherwise, Actions that do not use a View would be cached automatically.
The timezone database has been updated to version 2010h.
For a full list of changes, please refer to the CHANGELOG.
The next release of Agavi will have initial support for running applications on the Microsoft Windows Azure platform, as well as a database adapter for the new ext/sqlsrv driver to communicate with Microsoft SQL Server and support for the IIS7 web server, which now finally has a very nice rewrite module.
As always with these kind of features, the biggest task was getting to know the platform and its components. I spent a good amount of time setting up the necessary tools, learning the finer details of Azure deployment, researching on how the load balancing worked, finding the right rewrite rules for IIS and bending ext/sqlsrv to my will.
In Agavi itself, you will merely find a new session storage class (for cloud-based sessions), a new database adapter class to talk to MSSQL, and some minor modifications to the web request and routing implementations to deal with IIS7’s URL decoding behavior. The latter is still a work in progress, and requires a lot of testing since unfortunately, Apache/IIS/lighttpd/… all have vastly different behavior especially when it comes to URL decoding.
All of these updates will be in Agavi 1.0.4; I plan on releasing 1.0.3 as a final first (it’s been out there long enough in RC state now).
Expect a blog post with examples on how to get your Agavi app up and running on Azure very soon; especially with the Toolkit for Eclipse, it’s a remarkably convenient way of testing and deploying your applications on a cloud infrastructure. And there will, of course, be another article with a wrap-up of last week’s Jump In Camp.
Jump In! Developers’ Camp has started today at a beautiful resort near Zürich, Switzerland. Over the next three days, we’ll have workshops focusing on the topics of cloud computing, the Microsoft Azure platform. There are quite a bunch of fellow Open Source developers here, and it’ll be exciting to sit together and hack away on various features.
For Agavi, this means that work will be done this week on native support for the Azure cloud computing platform, support for IIS7 and the new SQL Server Driver for PHP. I’m also hoping to get some support in for the table and queue stores the Azure platform offers, although that will require a lot work on the new storage subsystem planned for Agavi 1.1 that will be difficult to squeeze into the next three days.
In addition to that, I’ve been working on support for both input types (finally!) and a new security infrastructure that decouples authentication and authorization and will allow you, among other things, to access validated request data, so you can for instance implement an ACL subsystem to perform authorization checks directly on your business objects.
I’ll blog several updates over the next few days, so stay tuned!
– David
Agavi 1.0.3 RC1 is ready for testing and can be downloaded at www.agavi.org.
I’ll quote right from the release notes to give you an overview of the most important changes. Please help us test this release thoroughly!
This maintenance release fixes a number of issues over Agavi 1.0.2 and features a few minor enhancements.
Several issues and inconsistencies have been fixed in AgaviNumberValidator and AgaviDecimalFormatter::parse(). Parsing behavior is now consistent with the NumberFormatter implementations of ICU and ext/intl. No integer overflow occurs when checking against min and max values, and the validator accepts non-strings as input. Exporting of the validated value is now possible, in which case the original argument is not mutated. Please note that the “number” validator shortcut definition specifies “int” as the default value for the “type” parameter. No value for “type” will automatically lead to integer or float values, depending on the size of the number in the input string. A cast to the specified type is now automatically performed if no “cast_to” parameter is given.
All file validators now perform case-insensitive checks against the list of allowed file extensions, which may now also be a parameter array instead of a space-separated list of values.
This release bumps the minimum required version of Phing to 2.4.0; this was necessary to fix some bugs with the build system that were next to impossible to fix for both 2.3 and 2.4 (which drastically changed some internals structures) at the same time.
An issue relating to the behavior of DOM in PHP 5.1.12 and PHP 5.2.3 has been addressed. Running Agavi 1.0.3 might be necessary under certain circumstances when using these versions of PHP.
A couple of minor fixes have been made to the routing; most notably, overwriting of routes in other blocks now always works as expected, even when using implied routes.
Some default code templates have been updated; most notably, caching configuration files now explicitly disable caching, as otherwise, Actions that do not use a View would be cached automatically.
The timezone database has been updated to version 2010f.
For a full list of changes, please refer to the CHANGELOG.
The beacon of hope that is Agavi is carried to Montréal this week, where the ConFoo Web Tech conference takes place.
David will be giving a talk on Agavi, and although we know that some of you will be there to watch it live, all those who couldn’t make it to Montréal (it’s a lovely city, so consider attending next year) need not despair, as at least the slides, and possibly also a recording of the talk will be posted after the conference.
If you’re there in person, make sure to catch a seat in one of the front rows so you can be first in line after the talk to grab one of the Agavi t-shirts that made the long journey to Canada.
We’re proud to announce that Agavi is a community partner of the always-awesome PHP UK Conference which takes place this Friday, February 26, in London, England.
The conference is now in its fifth year and is bigger and better than ever. Friday’s event has 16 different hour-long talks from some of the world’s best PHP speakers, covering core, database and various specialist topics. It takes place at the modern Business Design Centre in London’s bustling Islington area, close to Kings Cross and Euston and just two minutes walk from Angel underground station, and as usual we’ve arranged social events for both the evening before and straight after the event - the former being free to anyone to come along and the latter starting with a sponsored bar by Facebook. The registration price also includes a buffet lunch and dessert, refreshments throughout the day, cloakroom facilities, access to discounted books from O’Reilly and Packt publishers, countless networking opportunities, and a raffle with over 50 prizes on offer, including Agavi T-Shirts!
Agavi is a community partner of the event and we are pleased to be able to offer all Agavi friends, users and developers a £20 discount on the event registration. Just head to http://www.phpconference.co.uk/registration/agavi to get the reduced price, and please browse the rest of the site for much more information on the conference.
We hope to see you there on Friday! David will also be giving a talk on Designing URLs and RESTful APIs at the pre-conference social on Thursday evening; http://www.phpconference.co.uk/socials has more info.
The Agavi team is happy to announce that Agavi 1.0.2 is now available for download at www.agavi.org.
The CHANGELOG for this release counts 8 additions, 22 changes and at least 39 fixes over Agavi 1.0.1; the most important ones are:
- Support for HTML 5 forms in AgaviFormPopulationFilter.
- Support for Doctrine 1.2.
- Support for Propel 1.4.
- Support for Phing 2.4.0.
- Support for PHPTAL 1.2.
- Support for PHP 5.3 Namespaces
Several validation-related fixes and changes have been made, and a ton of bugfixes were backported from the ICU project in the internationalization subsystem.
The bundled PHPUnit, timezonedb and Schematron versions have also been updated to their latest releases.
As always, the RELEASE_NOTES have the full story.
Agavi 1.0.2 RC4 is now available for download at www.agavi.org.
This release adds support for Doctrine 1.2 and implements HTML 5 forms in AgaviFormPopulationFilter.
A couple of bugs have also been fixed; the most important one results in whitespace-only configuration parameter values being cast to null now instead of an empty string.
The timezone database has also been updated to their latest versions.
As always, the CHANGELOG has the full list of changes in this release.
Please test this thoroughly; a final release is scheduled to follow next week.
We’re about to move agavi.org and a ton of related stuff to a new server. This will affect the website, Trac, SVN, PEAR Channels, Mailing Lists and so forth.
The DNS TTL for agavi.org is 24 hours and unfortunately, we can’t change that, so it’ll take quite a bit for the updated nameserver records to propagate. Because of this, we’re switching all services on the old servers to a read-only mode until the migration is completely finished. The mailing lists should migrate relatively instantly (and seamlessly), but you never know.
If you’re still experiencing any kind of trouble after Thursday, please let us know so we can investigate.
Thank you for your patience and have very happy holidays!
Something’s been bugging me lately. Be it customer projects or code people post on the channel, I often find code that spells out long validator names, over and over again:
<?xml version="1.0" encoding="UTF-8"?>
<ae:configurations
xmlns="http://agavi.org/agavi/config/parts/validators/1.0"
xmlns:ae="http://agavi.org/agavi/config/global/envelope/1.0"
parent="%core.module_dir%/Account/config/validators.xml"
>
<ae:configuration>
<validators>
<validator class="FooBarValidatorWithVeryLongClassname">
<arguments>
<argument>foo</argument>
</arguments>
</validator>
<validator class="FooBarValidatorWithVeryLongClassname">
<arguments>
<argument>bar</argument>
</arguments>
</validator>
<validator class="string">
<arguments>
<argument>baz</argument>
</arguments>
</validator>
</validators>
</ae:configuration>
</ae:configurations>
Granted, this is one of the less documented features in Agavi, but does nobody ever wonder whether there’s a better way? There’s obviously a way to create shortcuts or the validator named string couldn’t be resolved - the full classname is AgaviStringValidator.
Actually, it’s quite simple. At any point in a validation file you can define shortnames and use like this:
<?xml version="1.0" encoding="utf-8"?>
<ae:configurations xmlns="http://agavi.org/agavi/config/parts/validators/1.0"
xmlns:ae="http://agavi.org/agavi/config/global/envelope/1.0">
<ae:configuration>
<validator_definitions>
<validator_definition name="foo" class="FooBarValidatorWithVeryLongClassname" />
</validator_definitions>
<validators>
<validator class="foo">
<arguments>
<argument>foo</argument>
</arguments>
</validator>
<validator class="foo">
<arguments>
<argument>bar</argument>
</arguments>
</validator>
<validator class="string">
<arguments>
<argument>baz</argument>
</arguments>
</validator>
</validators>
</ae:configuration>
</ae:configurations>
Validatordefinitions can include default parameters and multiple definitions can reference the same class:
<?xml version="1.0" encoding="utf-8"?>
<ae:configurations xmlns="http://agavi.org/agavi/config/parts/validators/1.0"
xmlns:ae="http://agavi.org/agavi/config/global/envelope/1.0">
<ae:configuration>
<validator_definitions>
<validator_definition name="foo" class="FooBarValidatorWithVeryLongClassname" />
<validator_definition name="foobar" class="FooBarValidatorWithVeryLongClassname">
<ae:parameters>
<ae:parameter name="bar">baz</ae:parameter>
<ae:parameters>
</validator_definition>
</validator_definitions>
</ae:configuration>
</ae:configurations>
The default parameters can be overwritten by the actual validator definition referencing that shortname. This is how all the shortnames we provide are implemented - the curious among you can have a peek in the config/defaults/validators.xml file.
Projects created with Agavi > 1.0.0 will have a cascade of validator files that are loaded: The actual validaton file for the action which references a validator config in the module’s config directory which in turn references a validator config file in the app’s config directory which in turn references the agavi default file. Older projects do not have this structure but I do recommend to create at least a global config file to shorten often used names.