Skip to content

Changelog v1.2

FrenkyNet edited this page May 6, 2012 · 26 revisions

This keeps track of important changes to the 1.x branch. Important changes that need extra attention when releasing v1.2.

Removed code (because it was deprecated in v1.1)

  • All factory() methods. The have been replaced by forge().
  • Agent::is_mobile(). Replaced by is_mobiledevice().
  • Arr::element(). Replaced by get().
  • Arr::elements(). Replaced by get().
  • Arr::replace_keys(). Replaced by replace_key().
  • Controller::render(). Is no longer used as actions need to return a Response object now.
  • Database_Connection::transactional(). Was already a NOOP.
  • DB::transactional(). Called Database_Connection::transactional().
  • Fieldset::errors(). Replaced by error().
  • Fieldset::repopulate(). Undocumented parameter was removed, functionality is offered by populate().
  • Fuel::find_file(). Replaced by Finder::search().
  • Fuel::list_files(). Replaced by Finder::instance()->list_files().
  • Fuel::add_path(). Was used by find_file(), no longer needed.
  • Fuel::get_paths(). Was used by find_file(), no longer needed.
  • Fuel::add_package(). Replaced by Package::load().
  • Fuel::remove_package(). Replaced by Package::unload().
  • Fuel_Exception class. Replaced by FuelException.
  • Input::get_post(). Replaced by param().
  • Lang::line(). Replaced by get().
  • Request404Exception class. Is replaced by HttpNotFoundException.
  • Uri properties $uri and $segments are now protected. Use Uri::get() and Uri::get_segment() or Uri::get_segments().
  • Validation::errors(). Replaced by error().
  • Viewmodel property $_template. Is replaced by $_view.
  • Viewmodel::set_template(). Replaced by set_view().

Code deprecated in v1.2 (to be removed in v1.3)

  • Pagination: Class will be removed and replaced by a new Paginate class.
  • Fuel::add_module(). Is replaced by Module::load().
  • Fuel::module_exists(). Is replaced by Module::exists().
  • Theme::asset(). Replaced by asset_path().
  • Theme::info(). Replaced by get_info().
  • Theme::all_info(). Replaced by load_info().

Security related

  • Security class now requires you to define the security.output_filter application config setting. An exception is thrown if it isn't present.
  • Security::htmlentities() now defaults to use ENT_QUOTES instead of ENT_COMPAT as flag. This is configurable in the second argument for the method and the default can be overwritten in config as security.htmlentities_flags.

System changes

  • Controller: action methods, or the controllers after() method if present, now must return a Response object.
  • Controller: before() and after() methods are now optional, as documented.
  • Controller_Hybrid: combines Controller_Template and Controller_Rest in a single base controller for mixed HTTP and REST responses.
  • Controller_Rest: added a fallback to "action_" when no HTTP method action is found.
  • Controller_Rest: you can now define custom HTTP status codes.
  • Controller_Template: the $auto_render setting has been removed, to prevent rendering return whatever you want to use instead.
  • Database: The PDO driver now supports list_columns().
  • Module: new Module class to load or unload modules.
  • Uri: the URL extension is no longer part of the URI. A new extension() method allows you to fetch it.
  • Request: Request_Curl now properly deals with succesful requests that return a 4xx or 5xx HTTP status.
  • Request: Request_Curl and Request_Soap now supports returning header information. A get_headers() has been added to fetch them manually.
  • Router: can now be configured to treat URI's without regards to case.

Specific classes

  • Arr: Arr::to_assoc() now throws a BadMethodCallException on bad input.
  • Arr: Arr::assoc_to_keyval() now requires all parameters and first parameter must be an array or implement Iterator.
  • Arr: Added reverse_flatten(), is_assoc() and insert_before_key() methods.
  • Arr: Added in_array_recursive() to do a recursive in_array() lookup.
  • Asset: Separated into the static front (Asset) and dynamic instance (Asset_Instance).
  • Asset: Separated into the static front (Asset) and dynamic instance (Asset_Instance).
  • Asset: css(), js() and img() methods are now chainable.
  • Asset: you can now specify a URL as location, for CDN support.
  • Asset: new fail_silently config value allows you to skip missing assets.
  • Cli: now supports ANSICON on Windows for colored commandline output.
  • Config: is now driver based to support php, ini, yaml and json type configs.
  • Config: now allow you to load a file by FQFN.
  • Cookie: all cookie data can now be fetched like Input class does.
  • Date: All fuel notices have been replaced by UnexpectedValueExceptions.
  • Date: On windows an extra fallback has been added for the create_from_string() method.
  • Date: new display_timezone()' and get_timezone_abbr()`, and changes to support working with multiple timezones.
  • DB: cache() now has the option not to cache empty resultsets.
  • DB: where() do now support closures to specify the where clause.
  • DB: Update now supports limit() and order_by().
  • DB: now tries to reconnect when a disconnected DB connection is detected.
  • DButil: create_database() now supports 'IF NOT EXIST'.
  • DButil: Better support for the CONSTRAINT keyword.
  • DButil: new add_foreign_key() and drop_foreign_key() methods.
  • Event: shutdown events are now also executed after exit and die statements.
  • Fieldset: added set_fieldset_tag() to define the fieldset tag. Fieldset: added add_before() and add_after() methods to insert a new field before/after a specific field.
  • Fieldset_Field: added add_description() method and {description} tag to templates.
  • Fieldset_Field: added add_error_message() method to create error message overwrites per field.
  • File: download() now allows you to continue processing after calling it.
  • Form: Separated into the static front (Form) and dynamic instance (Form_Instance).
  • Inflector: now supports Hungarian accepted characters when converting to ascii.
  • Input: method() now supports the X-HTTP-Method-Override header.
  • Input: new json() and xml() methods to fetch json or xml from the HTTP request body.
  • Lang: load() method now supports overwriting when merging language files.
  • Lang: now allow you to load a file by FQFN.
  • Lang: is now driver based to support php, ini, yaml and json type language files.
  • Lang: language files can now be saved (as php, ini, yaml or json) using save().
  • Migrate: now tracks individual migrations, so they don't have to have a sequence number anymore.
  • Model_Crud: now supports created_at and updated_at fields, like ORM\Model does.
  • Model_Crud: now has full callback support.
  • Model_Crud: you can now run validation separately (::validates) and skip validation when saving a model.
  • Profiler: profiler logging methods are now NO-OP's when the profiler is not loaded.
  • Profiler: now writes it's output under the page content, instead of using an overlay.
  • Session: Added session task to create and remove sessions table.
  • Session: New sessions are not saved until there is data present in the session.
  • Theme: Separated into the static front (Theme) and dynamic instance (Theme_Instance).
  • Theme: now supports installation outside the docroot (for views).
  • Theme: now uses the Asset class to load theme assets.
  • Theme: instances now support templates, template partials and partial chrome templates.
  • Validation: You can now disable fallback to global input using the 'validation.global_input_fallback' config setting.

Packages

  • Auth: Auth login drivers no have a validate_user method to validate a user/password without setting up a logged-in session.
  • Auth: SimpleAuth SimpleUserUpdateExceptions are now numbered to be able to identify the exact error after catching the exception.
  • Email: Now handles SMTP timeouts properly.
  • Email: You can now specify the return address.
  • Email: Now handles BCC lists correctly when using SMTP.
  • Email: Respects new lines in alt body better.
  • Email: You can now specify the return address.
  • Oil: Use phpunit.xml from APPPATH if present when running unit tests.
  • Oil: Reinstated oil package command to install packages from git repositories.
  • Oil: You can define the environment the command has to run in using the -env commandline switch.
  • Oil: Scaffolding now supports both Model_Crud and Orm\Model.
  • Oil: Scaffolding now supports adding created-at and updated-at.
  • Oil: Scaffolding now supports skipping the creation of a migration file using -no-migration.
  • Oil: There is now a core task to generate the table for the database session store.
  • Orm: New model method is_fetched() checks if relation data is fetched without triggering a new query.
  • Orm: Validation section of the properties has a new key skip to indicate the field should not be validated.