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.
Agavi 1.0.2 RC3 is now available for download at www.agavi.org.
This release adds support for Propel 1.4 and introduces a new way to configure connection setting overrides for Propel; see the RELEASE_NOTES for details.
A couple of bugs have also been fixed, most notably an issue where the first element of a multi-dimensional array would be lost when exported from a validator.
PHPUnit and the timezone database have been updated to their latest versions.
As always, the CHANGELOG has the full list of changes in this release.
Unless there are any nasty surprises, a final release will follow next week.
Hello everybody,
Agavi 1.0.2 RC2 is now available for download at www.agavi.org.
A couple of fixes have been made since RC1, and PHPUnit and the timezone database have been updated to their latest versions.
We’re currently planning a final release next week, after another new version of the timezone database has been released.
Enjoy your weekend,
David
The fifth and final article in the series on Agavi over at IBM developerWorks has just been published.
This last part talks about handling of file uploads, storing data in sessions and writing custom validator classes. Go read it, rate it, blog about it and spread the word!
Agavi 1.0.2 RC1 is now available for download at www.agavi.org.
This maintenance release fixes a number of issues over Agavi 1.0.1 and brings a couple of minor enhancements.
The following fixes are worth mentioning:
- AgaviArraylengthValidator didn’t work with files.
- AgaviValidationManager::clear() didn’t clear validation errors.
- Multiple settings blocks and settings prefixes were not allowed in module configs.
- AgaviNumberValidator does not mutate invalid input anymore.
- Several ICU bugfixes have been ported.
Important Changes:
- Optional strict comparison of elements in AgaviInarrayValidator now possible.
- Validator shortcut “arraylength” now defaults to minimum of one element.
- Routing callback parameters are now set before initialize method is called.
- Lots of ICU bugfix and change backports to the date and translation system. As a result, custom time zones now have identifiers like “GMT+0200”.
- Namespaced class identifiers can now be used in all configuration files.
- AgaviValidator::getArgument() now accepts an argument identifier.
- Support for PHPTAL 1.2.
Bundle updates:
- The timezone database has been updated to version 2009m.
- PHPUnit has been updated to version 3.4.0RC3.
- ISO Schematron has been updated to version 2009-05-18.
Please refer to CHANGELOG for a full list of changes.