Yesterday, I released version 1.1.2 of the Solar framework for PHP; you can get it from the usual sources. This is primarily a bugfix release; you can review the change notes at http://svn.solarphp.com/core/tags/release-1.1.2/info/notes. Many thanks to everyone who helped make this release possible!
I just switched the solarphp.com PEAR server over from the old Chiara_PEAR_Server system to Pirum. It only took a couple hours to figure out Pirum, then plan and execute the conversion and server update. The presentation is not as slick as I'd like, but it's dead-stupid simple to set up, and I can tweak the CSS etc. later.
Yesterday, I upgraded the solarphp.com server from Ubuntu 8.04 to 10.04. While this gives us easy access to PHP 5.3.2 packages, it appears to have screwed up Trac. I appreciate your patience while I work this out; perhaps it presages a move to Wez Furlong's "Mtrack" as a replacement.
UPDATE (22 Jun): I have Trac back up and running. Thanks for your patience, all.
On Thursday, I released version 1.1.0 of the Solar Framework for PHP. Due to a small but critical bug in the PostgreSQL adapter, I released version 1.1.1 with the necessary fix earlier today. Change notes are here for 1.1.0, and here for 1.1.1.
The single biggest new feature in this release of Solar is a Markdown plugin set for DocBook, along with a new
make-docbook command to convertAPI documentation to DocBook files. Previously, the Solar API documentation was wiki-like; now, we take the Markdown-based comments in the codebase and convert them to DocBook, and render the DocBook files in to HTML using PhD. (Incidentally, I tried rendering with xsltproc; after three hours, the processing was less than one-third complete. With PhD, rendering takes under five minutes for the entire API documentation set.)
make-model command now recognizes a star at the end of the model name, indicating it should make one model class set for each table in the database. For example, this will make one model class from the table "foo_bar" ...
./script/solar make-model Vendor_Model_FooBar
... but this will make a Vendor_Model class for each table in the database:
./script/solar make-model Vendor_Model_*
That kind of thing is helpful when getting started with an existing set of tables, or when you're updating your models after schema changes.
Other highlights include a series of small fixes, better CLI output in non-TTY environments, improved automation of CSRF form elements.
Finally, we've added a new manual chapter on user authentication, roles, and access control. Find out how, with some config settings, you can instantiate a single object and let it automatically handle user login/logout, role discovery, and access permissions for you! And if you want more direct control over the process, browse on over to these blog entries from CoolGoose:
If you haven't tried Solar yet, maybe now is the time: run through the Getting Started documentation and see how you like it!
The most significant change is a bugfix to eager fetches in the model system. When eager conditions are present, and no join type is specified, eager fetches will use an 'inner' join by default. This means that the eager conditions now have the proper effect when using
Yesterday, I announced the release of the 1.0.0 stable version of the Solar Framework for PHP on our mailing list. (I tagged the release four days ago on Monday, but wanted to time the announcement to go along with my Solar presentation at ConFoo.)
You can see the change notes here. The highlights are:
Added automatic cross-site request forgery (CSRF) protections in various layers of the system.
Added support for named actions (aka "named routes") in the front-controller rewrite logic; this is the "bi-directional" routing that some have asked for.
Optimized queries for Model::countPages() and the native-by select strategy, so that unnecessary joins against related models are not used when counting the number of pages for the native model results.
The next major steps are to revise and extend the narrative documentation, and of course fix bugs and add features as needed.
Slashdot appears to have gotten to the mailing list announcement before I blogged the release. (The commenters there show the usual range of insight, depth, wisdom, and experience. ;-) The Solar site itself, deployed on a 512M SliceHost VPS instance, appears to be handling the load. However, my Wordpress blog on a separate 512M instance is getting ... a bit ... ... slow. Guess it's time to add wp-super-cache.
This stable release is the culmination of about five years of development effort, with important contributions from several others in the PHP community. My many thanks to everyone who helped make this release, and all the previous releases, better than I could have made it on my own.
UPDATE (28 May 2010): This release note has been translated into Belorussian and Russian by Patricia Clausnitzer here: http://ucallweconn.net/be/solar-100-stabylny-reliz. Thanks Patricia!
Overall, most of the work was related to the form helpers and making them even more flexible than they were previously. We've also added a new manual chapter on working with models and forms.
It is super-easy to build forms out of model records in Solar. In the controller, once you have a record object, call its
newForm() method to get a Solar_Form object. In the view, pass that form object to the form view helper and add a submit-process button:
echo $this->form() ->auto($this->form_object) ->addProcess('save') ->fetch();
Those four lines of code will build a complete form for you based on the model record, including top-level feedback and individual element invaldation messages.
The form helper is smart enough to recognize the column types and validation filters on the model record, and will use the appropriate input types accordingly. For example, booleans get checkboxes, date fields get a series of month/day/year options, and columns using
validateInKeys become selects.
You can also further customize the form presentation using the fieldset and grouping methods on the form helper. Alternatively, you can the individual form element helpers to build forms by hand.
These features have been present in Solar for years.
Finally, and I'm not making promises, but I think this is the last or next-to-last beta release. I have some tickets about query optimization from the models that I want to complete. Once those are done, I expect to make Solar's first official stable release.
We have also added three new chapters to the manual:
- Working with Models
- Working with Related Models
- Views and Layouts by Jon Elofson
- And some some appendices for more in-depth information about Solar's underpinnings.
Take Solar for a quick test-drive with the blog demo and see if it suits you.
These days I'm concentrating more on documentation. Previously, we had only the ubiquitous quick-start blog demo. This release includes a new chapter on Solar's dynamic dispatch cycle; i.e., the bootstrap, front controller, page controller, action method, and view. (I'm starting a chapter on the DataMapper-style model system today.)
Incidentally, I've been writing the docs in DocBook 5 and building them with xsltproc. You can see the whole build system in the Solar docs repository. I tried using the new PhD build system, but it required more effort and energy than I could spare. PhD is screamingly fast, but it's not doing everything that xsltproc does just yet, and I barely have enough time to work on my own projects as it is.
Solar 1.0.0alpha5 has been released, with a few bugfixes, and one change. The change notes are below. Also of note, I have created separate "alpha" and "beta" branches, so we can continue bugfix releases on the alpha side while not having to release new beta features.