Akelos PHP Framework

Website
http://www.akelos.org/
SVN
http://svn.akelos.org/trunk/
Short description from authors website
Akelos PHP Framework Goals
  • Improve developer happiness.
  • Speed up the creation of complex web applications writing less code.
  • Provide all the means for creating applications that can run on cheap PHP4/PHP5 hosts and in the developer desktop without complex configurations.
  • Help on the hard task of creating and maintaining applications with data and views in multiple languages.
  • Favor conventions over configurations.
Distributed size:
2.3MB zip (0.9)
Graphs

Changelog (only since Jan 1, 2009)

RevisionMessageDateAuthor
1342Restoring attribute skipping when null22.07.2009 23:40:32bermi
1341Adding support for finding within collections on finders.

Now you can use on your finders

{{{
$Tag->find(array('conditions'=> array('name IN (?)', array('Tag 1', 'Tag 2'))));
}}}

And it will escape, quote and bind the attributes properly generating this SQL

{{{
SELECT * FROM tags WHERE name IN ('Tag 1', 'Tag 2')
}}}

You can also pass a collection of Active Record elements like those returned on by a finder.

{{{
$Tag->find(array('conditions'=> array('name IN (?)', $PopularTags->find())));
}}}
22.07.2009 18:20:07bermi
1340removing tests for findByIds mismatch in number of ids and results.

Adding test for deleteAll with bind parameters
22.07.2009 11:20:39arnoschn
1339lowercasing css attribute name for unifying styles22.07.2009 11:02:42arnoschn
1338- adding layout for mailers. naming convention: layout.text.html.tpl, layout.text.plain.tpl
- fixing text-helper which could not extract image urls from <img/> tags that went over multiple lines
- extracting style attributes in html mailer views like <td style="height:100px;width:100px;text-align:center"></td> and converting them into element inline styles <td width="100" height="100" align="center" ></td> etc. for better mailer compatibility
20.07.2009 08:41:18arnoschn
133717.07.2009 12:39:41arnoschn
1336Adding render :partial functionality to Mailer.
Adding extraction of css rules and applying to elements to html email
Adding automatic addition of target="_blank" to links without target (needed for webmailers)
17.07.2009 11:45:57arnoschn
1335silencing unserialize of serialized column, in case the db value was not serialized before (happens if var $serialize is added later on with existing records)16.07.2009 16:20:26arnoschn
1334adding bind syntax to ActiveRecord::updateAll and deleteAll. Callable via $record->updateAll('setme="new value"',array('condition=?','my condition'));

casting findFromIds($ids) ids to its db type and quoting before finding the records.
removing id count mismatch, search for $record->find(1,2,3,4) will now return records 1,2,3 even if record 4 does not exist, before it would have returned false.
16.07.2009 16:16:02arnoschn
1333DB Schema Cache will not be saved from the CLI anymore, storing the cache file from the CLI results in permission problems when reading from the webserver16.07.2009 16:11:35arnoschn
1332Removing leading whitespace in chunk-splitted mail-body16.07.2009 15:13:20arnoschn
1331by: @haakon

Ignoring POSIX .invisible_fiels on automated model inclusion of active records on ./script/console

Closes #264

10.07.2009 21:51:45bermi
1330Making db traces less verbose by default
10.07.2009 21:47:36bermi
1329Forcing AK_REMOTE_IP to a single originating IP address. If you want to check how a request was forwarded use better $_ENV/$_SERVER[HTTP_X_FORWARDED_FOR]
05.07.2009 12:09:36bermi
1328Adding another possible IP address location for AK_REMOTE_IP
30.06.2009 21:07:45bermi
1327Double render error on rendering diferent parts26.06.2009 16:00:25masylum
1326Using Ak::trace() to display transaction failures
26.06.2009 09:44:49bermi
1325Using Ak::trace to debug SQL queries!

It will now show where in the app the query was generated, if you need to know where in the whole framework it was generated, you need to declare AK_TRACE_ONLY_APP_DB_QUERIES to false.
25.06.2009 12:07:06bermi
1324Has many counter SQL now works when calling it without requiring a previous __owner inclussion.
22.06.2009 02:12:22bermi
1323Restricting wich email header can be added automagically to AkActionMailer mail headers
19.06.2009 13:12:50bermi
1322Belongs to should not increment counter if owner is new record.

Adding white background to debug message
18.06.2009 09:05:59bermi
1321Backtrace now points you to the line in the source where the bug is.
16.06.2009 18:35:52bermi
1320Making Ak::trace a little more fancy. Now it event gives trace information O:)

Adding Ak::dump() for returning a string representation of var_dump, var_export, or print_r instead of directly echoing it.
16.06.2009 16:44:32bermi
1319Fixing issue #258

Patch by firodj
10.06.2009 21:11:10bermi
1317Improving lib/AkDevelopmentErrorHandler.php
09.06.2009 09:15:39bermi
1315Checking constant before it clashes04.06.2009 11:33:36bermi
1314Creating log files if they do not exist03.06.2009 23:46:45bermi
1313Small fix for last commit03.06.2009 23:15:41bermi
1312Adding namespaced loggers

Now you can call

{{{
Ak::getLogger('signup')->error('Something screwed up');
}}}

and it will store the error at

{{{
log/signup.log
}}}

03.06.2009 23:12:28bermi
1311Fixing AkBelongsTo::counter_cache_column default settigns to match the documentation

Removing traling spaces from other files.

03.06.2009 11:10:12bermi
1310Ak::t() returning key of translation if translation is empty28.05.2009 08:11:49arnoschn
1309fixing dependency nullify22.05.2009 11:17:53arnoschn
1308Do not resize when the image is smaller22.05.2009 10:05:51masylum
1307adding replacement for tablename.* columns on the findWithAssociations21.05.2009 16:25:30arnoschn
1306adding content:encoded to rssbuilder20.05.2009 10:06:44arnoschn
1305Changing imagecopyresized to imagecopyresampled in order to get better image quality. A bicubic resizing mode might have better quality but hit too hard on performance.

Adding pear/Image/Text.php
18.05.2009 20:06:16bermi
1304Adding email messages to log/mail.log when the Mailer delivery is test and runs on Development mode18.05.2009 20:03:04bermi
1303Getting rid o beforeDropTable and afterDropTable hook18.05.2009 08:30:10arnoschn
1302Adding dependent options nullify/delete. adding join_conditions options which will add conditions on the JOIN part when including18.05.2009 08:28:43arnoschn
1301fixing afterDestroy method. if associated item isNewRecord or does not exist, return true instead of trying to delete/destroy/nullify18.05.2009 08:21:34arnoschn
1300fixing bug on constructFinderSqlWithAssoctions. handing through $include_owner_as_selection to parameter to the addConditions, to send the right table-alias to the typeCondition method.18.05.2009 08:20:20arnoschn
1299refactoring the AkActiveRecordMock and the objectgraph builder. Adding xml_helper for php5.12.05.2009 19:40:08arnoschn
1298Making it easier to use Ak::trace() with active records and other objects. Fixing issue with belongs to dependencies04.05.2009 01:54:19bermi
1297fixing issue on detecting content-columns when instantiating objects in findWithAssociations30.04.2009 07:41:03arnoschn
1296Removing empty params from Image native filters
29.04.2009 06:33:39bermi
1295Adding missing fixture O:)
28.04.2009 15:08:58bermi
1294Adding new filters for AkImage::transform :

* negate
* grayscale
* brightness
* contrast
* colorize
* detect_edges
* emboss
* gaussian_blur
* selective_blur
* sketch
* smooth
* pixelate

28.04.2009 14:22:52bermi
1293adding the possiblity to findWithAssociations to return array or an array of simulated ActiveRecord Objects instead of instantiating each and every ActiveRecord.

performance improvement of generateObjectGraphFromResultSet
28.04.2009 13:06:58arnoschn
1292Allowing discarding day without breaking date preselection on the date_helper
27.04.2009 21:57:55bermi
1291damn.... hopefully fixed!27.04.2009 14:14:54arnoschn
1290version crazyness!27.04.2009 13:54:57arnoschn
1289need to check if version===0 instead of assuming 0 == false27.04.2009 08:47:48arnoschn
1288Fixing soft migration issue for already installed migrations27.04.2009 06:54:18arnoschn
1287fixing a stupid Ak::compat() call.

= adding a $options['wrap'] to finders.

Works as follows:

$options['wrap'] = 'SELECT * FROM ({query}) a GROUP BY something";

the generated finder query is inserted for {query}.

SELECT * FROM (SELECT * FROM ... WHERE ...) a GROUP BY something";

this allows you to do group bys and still define the order of a date for example.

= added join-table columns to habtm sql generation, so you can use it in the "wrap" sql.
useful if you have information on the join class and you want to buildl conditions on that.
26.04.2009 16:32:27arnoschn
1286WARNING: IMPORTANT CHANGES AHEAD ON AkAssociatedActiveRecord::findWithAssociations
influences all custom $options['selection'] calls when using $options['include'] with a finder.

New features:

= AkAssociatedActiveRecord::findWithAssociations takes now nested includes:

$model->findFirstBy('name','test', array('include'=>array('cars'=>array('include'=>array('driver'=>array('include'=>'mother'))))));
see test/unit/lib/AkActiveRecord/_AkActiveRecord_nested_finders.php for more details.

To build the nested includes result a strict convention in naming the SELECT (columns) FROM is applied.
Custom $finder_options['selection'] values will not work with the new findWithAssociation if the column aliases do not conform
with the convention:

SELECT __owner__handler_name.column_name AS "owner[handler_name][colum_name]" ....


= AkInstaller stores version on database

AkInstaller now creates a "akelos_migrations" table where it stores the version numbers of the installers.
A soft migration ensures that existing applications will slowly migrate to the new db storage when using migrations.

Should you find any problems with the new migration system, please file a bug.


Bug fixes:

#255 added order,group to habtm finder
#219 finder by id on habtm: see test/unit/lib/AkActiveRecord/_AkActiveRecord_association_finders.php
#245 removed duplicate conditions on finder
#246 habtm from self->self is now possible
26.04.2009 12:23:26arnoschn
1285Making Ak::trace accept arrays and adding a nicer format when on HTML

Fixing body posting on AkHttpClient
24.04.2009 12:14:28bermi
1284Duplicated default group16.04.2009 14:41:19masylum
1283Added group to AkHasMany16.04.2009 14:39:13masylum
1282Better output for permissions errors on config cache16.04.2009 08:29:45masylum
1281fixing content-encoding error on the ak_development_error_handler.
Removing Content-Encoding header if we step down the ob_levels
14.04.2009 08:04:17arnoschn
1280Adding experimental pre- and post-page-cache scripting functionality. allows you to execute php script before and after delivering a page-cache. the pre-script of course can exit the caching behaviour by simply return; from the page-cache file.

Enabling gzip content-encoding detection and gzip compression if gzip is in accept headers even for non-cached pages
13.04.2009 17:02:48arnoschn
1279need to enable config-cache in testing environment, so the AkConfig testcases can work. AK_CLI only uses cache now when in testing mode13.04.2009 16:59:20arnoschn
1278fixing AK_CLI bug on AkConfig again...09.04.2009 11:08:19arnoschn
1277fixing inheritance column condition (type = ?):

WHERE (type=?) AND ( ... rest of conditions...)

otherwise if you do not put the rest of the conditions in () and you have an OR the type condition is useless
08.04.2009 08:25:58arnoschn
1276adding single file tests to /script/ci-test:

/script/ci-test php5 mysql test/unit/lib/AkActionController/_page_caching.php

will only run the _page_caching.php test file.
08.04.2009 08:23:32arnoschn
1275fixing page_caching with get-parameters.08.04.2009 08:21:29arnoschn
1274Disabling caching of configuration files from the CLI to pervent permission problems07.04.2009 14:41:30arnoschn
1273Fixed a bug produced when calling a custom selected options like

{{{
$form_options_helper->select('person', 'role', array('Admin'=>1,'Moderator'=>2,'Visitor'=>3), array('selected' => 2))));
}}}

the output contained

{{{

<option selected="2" value="1">Admin</option>
<option selected="selected" value="2">Moderator</option>
<option selected="2" value="3">Visitor</option>

}}}

this commit removes the 'selected' option from the tag options array to avoid including selected="2" into all options.
06.04.2009 10:57:32ricard
1272Preventing forced content type on the default dispatcher.
26.03.2009 13:16:53bermi
1271Fixing checksum clash on the file_upload helper.

Fixing Crop Filer docs
25.03.2009 18:59:32bermi
1270fixing second level associations. comparing ids and unsetting data19.03.2009 20:00:04arnoschn
1269Date Time selects were unable to set id. By default no id will be set, but if an id is passed as an option then this will be set.
19.03.2009 10:09:11ricard
1268New functionality in date_helpers that list date or time. Now it's possible to add some custom text in the first option.
Some documentation has been added in order to help users to know about this feature.
18.03.2009 18:48:44ricard
1267adding group by to findWithAssociation18.03.2009 14:24:19arnoschn
1266implementing "conditions" and "order" option on 2nd level associations.18.03.2009 10:30:57arnoschn
1265fixes for postgres17.03.2009 12:32:53arnoschn
1264Adding tests for after destroy on belongs to associations
17.03.2009 12:18:18bermi
1263fixing return by reference17.03.2009 12:09:52arnoschn
1262Adding experimental "2nd level findWithAssociations", which allows you to do:

$user->findFirstBy('name','Bermi',array('include'=>array('roles'=>array('include'=>'permissions')));

You will get $user->roles[0]->permissions[0] in just one select.

Addressing bug #246.
17.03.2009 11:31:32arnoschn
1261Adding more details for failed associations in order to make it easier to debug
17.03.2009 10:41:26bermi
1260Fixing test/unit/lib/AkImage.php fixture images location to avoid http redirect
16.03.2009 10:47:12bermi
1259Fixing typo15.03.2009 17:35:00bermi
1258Fixing caching issues on the file uploader
11.03.2009 00:20:07bermi
1257Fixign index creation bug on AkInstaller. Removing Cookies based sessions until completed.
07.03.2009 00:29:14bermi
1256added centered_crop06.03.2009 18:13:07masylum
1255link_to functions fixed05.03.2009 15:56:20masylum
1254Adding dependency control on belongs to associations
25.02.2009 12:20:13bermi
1253Forcing helper loading when rendering an action different from the ongoing one.
24.02.2009 21:53:42bermi
1252Fixing #253. Added unit test for verifying that connection to multiple databases on a model basis works.
23.02.2009 23:28:29bermi
1251Adding tests for ActiveRecord serializable attributes.

Now it can be declared in multiple ways like

{{{
public $serialize = 'preferences';
}}}

or

{{{
public $serialize = array('settings'=>'Setting');
}}}

where the class 'Setting' will be included automatically before unserializing.

23.02.2009 11:46:36bermi
1250Modified view compilation rules. Now a unique view will be compiled depending on the helpers that are loaded.

Now if template compilation halts, it will dump the code on development environments and it will prevent the view from being cached.

Removed Ak::profile calls as Loggers calls should be used instead.

Adding a default backtrace (a-la python) and simple custom error reporting for development mode.
22.02.2009 23:34:11bermi
1249Using AkActiveRecord::establishConnection as intended and documented in order to allow connecting to different databases depending on the model
11.02.2009 20:42:24bermi
1248Adding Content-Length to HTTP responses to tell HTTP 1.0 clients when the content has been delivered on Keep Alive connections

Changing the plugin discovery url to its new location at http://www.akelos.org/wiki/plugins
11.02.2009 11:37:50bermi
1247Forcing table cache refresh on intallers.
09.02.2009 23:42:07bermi
1245Refactoring Active Record schema cache.

Fixes #249
07.02.2009 23:49:17bermi
1244Adding option "cache" to AkHttpClient. Now you can call

{{{
Ak::url_get_contents('http://akelos.org', array('cache' => 86400));
}}}

To have the contents cached during one day.
06.02.2009 18:12:14bermi
1243Fixing index bug on acts as behaviours when using multiple of them without options06.02.2009 12:30:18bermi
1242Adding a descriptive error message when using the action mailer generator with insufficient paramenters.
28.01.2009 20:41:21bermi
1241Adding a new shotcut for sanitizing/escaping html entities variables on Sintags.

Now you can use this Sintags

{{{
{\variable}
}}}

to generate this PHP code on the compiled template

{{{
<?php echo $text_helper->h($variable); ?>
}}}
26.01.2009 12:41:14bermi
1240script/configure: Fixing typo reported by alake on #248
21.01.2009 06:16:00bermi
1238Removing un-used column serialization code and documenting how colum serialization can be done on Akelos Active Records
20.01.2009 12:01:05bermi
1237Fixing #244. Reported by tosick
16.01.2009 00:21:12bermi
1236Avoiding double flash handling on the same request.
14.01.2009 17:37:58bermi
1235Silencing the image filters when no height or width is provided by default
09.01.2009 15:32:36bermi
1234Adding new Image filters. One for adding watermarks, and another one for cropping image portions.
09.01.2009 02:04:45bermi
1233Fixing db charset setting on PHP4
09.01.2009 01:15:24bermi
1232Important: Data integrity issue on MySQL

Before rev.1232 MySQL on some setups, connections where opened using PHP's default
encoding latin1 this caused that UTF8 data written by Akelos could not be edited using other DB tools like phpMyAdmin

This change solves the issue for new applications, but existing applications can fix this by backing up your database
and following the steps at http://codesnippets.joyent.com/posts/show/84 before defining AK_SET_UTF8_ON_MYSQL_CONNECT on your configuration file.
05.01.2009 12:03:31bermi