terug naar Techniek CodeIgniter 3
Codeigniter versie 3.2.0 dev
Version 3.2.0
Release Date: Not Released
- General Changes
- Officially dropped any kind of support for anything under PHP 5.4.8.
- Updated Welcome view and HTML error templates with new styling.
- Updated configurable directory paths to handle missing trailing
DIRECTORY_SEPARATOR
automatically. - Added support for HTTP status codes 103, 207, 308, 421 and 451 to common function
set_status_header()
.
- Core
- Added a
$config['log_file']
option. - Removed
$config['log_file_extension']
. - Removed
$config['rewrite_short_tags']
(irrelevant on PHP 5.4+). - Removed previously deprecated
$config['global_xss_filtering']
. - Removed previously deprecated Routing Class methods
fetch_directory()
,fetch_class()
andfetch_method()
(use the respective class properties instead). - Removed previously deprecated Config Library method
system_url()
(encourages insecure practices). - Changed URI Library to ignore the
$config['url_suffix']
,$config['permitted_uri_chars']
configuration settings for CLI requests. - Changed Loader method
model()
to always check if the loaded class extendsCI_Model
. - Changed Output Library method
_display()
default parameter value toNULL
instead of empty string. - Input Library changes include:
- Removed previously deprecated
$config['allow_get_array']
. - Removed previously deprecated
$config['standardize_newlines']
. - Removed previously deprecated method
is_cli_request()
(useis_cli()
instead). - Changed the
set_cookie()
method’s default expiry time to 0 (expires when browser is closed). - Changed the
set_cookie()
method to delete the cookie if a negative expiry time is passed to it. - Allowed usage of nested array keys in
get_post()
,post_get()
methods.
- Removed previously deprecated
- Added a
- Libraries
- Removed previously deprecated Encrypt Library.
- Removed previously deprecated Cart Library.
- Removed previously deprecated Javascript Library (it was always experimental in the first place).
- Removed previously deprecated
anchor_class
option from Pagination Library. - Added TLS and UNIX socket connection support to Session Library ‘redis’ driver.
- Updated ZIP Library method
read_dir()
to include hidden (dot-prefixed) files. - Cache Library changes include:
- Added ‘apcu’ driver.
- Added UNIX socket connection support to the ‘memcached’ driver.
- Added ‘database’ configuration option to the ‘redis’ driver, allowing to auto-select another database.
- Added method
get_loaded_driver()
to return the currently used driver. - Changed the ‘memcached’ driver to ignore configurations that don’t specify a hostname.
- Removed the socket_type configuration setting from the ‘redis’ driver.
- Changed data serialization logic in ‘redis’ driver for better performance.
- Form Validation Library changes include:
- Removed previously deprecated method
prep_for_form()
/ rule prep_for_form. - Removed previously deprecated ability to use language translations without the
'form_validation_'
prefix. - Changed method
set_rules()
to throw aBadMethodCallException
when its first parameter is not an array and the$rules
one is unused. - Added rule valid_mac, which replicates PHP’s native
filter_var()
withFILTER_VALIDATE_MAC
. - Added ability to validate entire arrays at once, if
is_array
is within the list of rules. - Added ability to fetch processed data via a second parameter to
run()
.
- Removed previously deprecated method
- HTML Table Library changes include:
- Changed method
clear()
to also reset captions.
- Changed method
- Email Library changes include:
- Changed the default value of the validate option to
TRUE
. - Changed the
send()
method to always returnTRUE
when sending multiple batches of emails.
- Changed the default value of the validate option to
- Image Manipulation Library changes include:
- Added option to change the output filename via the
new_name
option when rendering images withdynamic_output
. - Updated to serve multibyte filenames when rendering images with
dynamic_output
, if possible. - Added WebP image support.
- Added option to change the output filename via the
- Database changes include:
- Removed the option to disable the Query Builder.
- Removed driver-specific
$curs_id
property andget_cursor()
,stored_procedure()
methods from OCI8 driver. - Removed previously deprecated ‘sqlite’ driver (used for SQLite version 2; no longer shipped with PHP 5.4+).
- Removed method
db_set_charset()
and the ability to change a connection character set at runtime. - Changed method
initialize()
to return void and instead throw aRuntimeException
in case of failure. - Changed method
db_connect()
to always set the connection character set (if supported by the driver) and to fail if it can’t. - Database Forge:
- Added support for declaring date/time type fields default values as
CURRENT_TIMESTAMP
and similar. - Removed previously deprecated
$_after
parameter foradd_column()
.
- Added support for declaring date/time type fields default values as
- Query Builder:
- Added methods
having_in()
,or_having_in()
,not_having_in()
,or_not_having_in()
. - Updated methods
where_in()
,or_where_in()
,not_where_in()
,or_not_where_in()
to reject non-array inputs for the second parameter. - Updated method
join()
to allow acceptingNATURAL
clauses in its third parameter. - Updated logic to allow dots in alias names.
- Added methods
- Helpers
- Removed previously deprecated Email Helper (had only two functions, aliases for PHP’s native
filter_var()
andmail()
). - Removed previously deprecated Smiley Helper.
- Removed previously deprecated Date Helper function
standard_date()
(use PHP’s nativedate()
instead). - Removed previously deprecated Date Helper function
nice_date()
(use PHP’s nativeDateTime::format()
instead). - Removed previously deprecated Security Helper function
do_hash()
(use PHP’s nativehash()
instead). - Removed previously deprecated File Helper function
read_file()
(use PHP’s nativefile_get_contents()
instead). - Removed previously deprecated options
'dash'
and'underscore'
from URL Helper functionurl_title()
. - Added new function
ordinal_format()
to Inflector Helper. - Download Helper changes include:
- Updated
force_download()
to allow existing files to be renamed for download. - Updated
force_download()
to better utilize available server memory. - Updated
force_download()
to serve multibyte filenames when possible, via thefilename*
attribute specified by IETF RFC 6266.
- Updated
- String Helper changes include:
- Removed previously deprecated function
trim_slashes()
(use PHP’s nativetrim()
with'/'
instead). - Removed previously deprecated function
repeater()
(use PHP’s nativestr_repeat()
instead). - Removed previously deprecated
'unique'
and'encrypt'
options fromrandom_string()
.
- Removed previously deprecated function
- HTML Helper changes include:
- Removed previously deprecated function
br()
(use PHP’s nativestr_repeat()
with'<br />'
instead). - Removed previously deprecated function
nbs()
(use PHP’s nativestr_repeat()
with' '
instead). - Updated function
meta()
with support for “charset” and “property” properties. - Changed function
doctype()
default document type to HTML 5.
- Removed previously deprecated function
- Form Helper changes include:
- Removed previously deprecated function
form_prep()
(usehtml_escape()
instead). - Removed the second (out of three) parameter from the
form_upload()
function (it was never used).
- Removed previously deprecated function
- CAPTCHA Helper changes include:
- Added ‘img_alt’ option with a default value of ‘captcha’.
- Added ‘img_class’ option.
- Added ability to generate
data:image/png;base64
URIs instead of writing image files to disk. - Updated to always create PNG images instead of JPEG.
- Removed previously deprecated usage with
$img_path
,$img_url
,$font_path
as extra parameters instead of array options.
- Removed previously deprecated Email Helper (had only two functions, aliases for PHP’s native
Bug fixes for 3.2.0
- Fixed a bug (#5562) - Cache Library ‘redis’ driver would pointlessly attempt to perform its functions if a connection to the Redis server failed.
- Fixed a bug (#92) - File Helper function
get_dir_file_info()
output could have colliding array keys.