Spoon Library v1.3.0 released

Written by Davy Hellemans -

We're proud to announce the v1.3.0 release.

Changelog

  • Template options may now start with an integer e.g. {option:404}
  • The WHERE clause in SpoonDatabase::update and SpoonDatabase::delete may now be null instead of an empty string.
  • Added option for headers.sortingIcon in datagrid.tpl - empty <img> elements are no longer shown for default sorting settings.
  • Fixed the sorting problem when setting the sortParameter option in a datagrid.
  • Bugfix: some classes were using non-existing exceptions, fixed this issue.
  • Rewrote a few methods in SpoonFilter for consistency and performance reasons.
  • Bugfix: when providing a template to SpoonTemplate::display a few extra checks are performed.
  • Bugfix: multiple forms on the same page would produce ambiguous id's resulting in 'invalid' markup.
  • Feature: a callback mechanism for exceptions has been added. New constant 'SPOON_EXCEPTION_CALLBACK'.
  • Feature: you can now overwrite the token error message in SpoonForm.
  • Bugfix: add FOLLOW_LOCATION to SpoonFile::download cURL call so rewrites pose no problem.
  • Bugfix: fixed SpoonFilter::isFloat and SpoonFilter::isInteger to work on every float and int instead of relying on regexes.
  • Rewrote some small snippets of code to improve performance.
  • Bugfix: rewrote SpoonFilter::isInternalReferrer to use PHP's internal parse_url function.
  • Bugfix: createThumbnail had been missing from SpoonFormImage.
  • Bugfix: form tokens are now working when you have more than one form on your page.
  • Feature: SpoonFilter::arrayMapRecursive() now has an optional third parameter $allowedKeys, which allows you to map callback to specified array keys only.
  • Bugfix: Custom keys didn't work correctly for SpoonDatagridSourceArray, they do now.
  • htmlspecialchars now uses ENT_NOQUOTES by default instead of ENT_QUOTES
  • Bugfix: SpoonDatagrid::getColumn no longer triggers an exception when the datagrid contains no results.
  • Bugfix: SpoonDropdown::isFilled will no longer equal true when allowExternalData is disabled and the value is not found in the initial list of values. (thx to Dieter Vanden Eynde)
  • SpoonFilter::isURL will now acccept domains such as 'spoon.local'
  • Feature: added SpoonDirectory::isWritable, a better alternative to the native is_writable function (that can not handle Windows' permissions properly)
  • bugfix: fixed SpoonTemplate on Windows for file includes: absolute paths were identified as relative paths
  • Feature: added optional parameter to exclude certain columns in all relevant functions of SpoonFileCSV
  • Bugfix: SpoonFilter::isURL allows ip(v4 & v6) as URLS from now on
  • Feature: when passing null as defaultvalue and type to SpoonFilter::getValue() the return will be null instead of an empty string
  • Feature: you no longer need to pass an array with values to a dropdown. A default element will be generated with no value.
  • Bugfix: SpoonEmail now uses the charset when building the emails' headers.
  • Bugfix: template cycle tags now work as intended. (thx to Matthis Mullie)
  • Bugfix: fixed check that used to always fail. Needs to be improved though. (thx to Dieter Vanden Eynde)
  • SpoonDatabase now prefixes fields with their tablename (insert/update)
  • Exceptions now show the user-agent, if we can find it in the $_SERVER array
  • Spoondatabase can now be used with custom ports
  • SpoonTemplate does allow empty strings in the cycle-tag from now on.
  • SpoonLocale::getCountry added, which allows you to fetch a country in a specific language.
  • SpoonLocale: getMonth and getWeekDay added as well.
  • SpoonFile::delete now allows you to delete an array of files.
  • Rearranged the general authors/owners.
  • Bugfix: you can now use named parameters within update queries.
  • Bugfix: multiple dropdownfields weren't parsed because of the [].
  • Feature: SpoonLocale now contains the supported language names.
  • Template-syntax changed for include, iterations & variables
  • Unassigned variables don't trigger a notice but gracefully degrade to the template-syntax when SPOON_DEBUG is enabled
  • Unassigned forms don't need template recompilation to work when they are in a later stadium assigned
  • Cycle-tags now work correctly when nesting an iteration inside itself
  • Variables can now go infinitely deep inside associative arrays
  • Nearly every character is now allowed as a parameter for parameter-modifiers

The latest tweaks, bugfixes & updates are found on github.