Home >Backend Development >PHP Tutorial >When was ThinkPHP5 released?
ThinkPHP5.0 Beta was released on December 11, 2015, and the full version of ThinkPHP5.0.5 was released on February 27, 2017. ThinkPHP is a free, open source, fast, simple, object-oriented and lightweight PHP development framework.
The operating environment of this article: windows7 system, ThinkPHP5 version, DELL G3 computer
ThinkPHP5.0 Beta was in December 2015 Released on the 11th, the full version of ThinkPHP5.0.5 was released on February 27, 2017.
[Features]
Main features include:
------------------ -------------------------------------------
specification : Comply with PSR-2, PSR-4 specifications, Composer and unit testing support;
Rigorous: Extraordinarily rigorous error detection and security mechanisms, detailed log information, to protect your development;
Flexible: Reduce core dependencies, make expansion more flexible and convenient, and support command line instruction expansion;
API-friendly: Excellent performance and REST support, remote debugging, and better support for API development;
Efficient: lazy loading, and caching mechanism for routing, configuration and automatic loading;
ORM: reconstructed database, model and association, supported by MongoDb;
------ -------------------------------------------------- ------
Users who support ThinkPHP5 please go to Github and give us a `star` ^_^
Related recommendations: The latest 10 thinkphp video tutorials
Compared to the RC4 version, the updates are as follows:
[Request and Routing]
Request object supports dynamic binding properties
The URL original address that defines the routing rule is prohibited from accessing
Improve the routing rule storage structure
The routing grouping function is enhanced, supporting nested and virtual grouping
Routing URL is efficient Anti-explanation
Improve the Request object param method to obtain the priority
Add the name method to the route to set and obtain the route identification
Add MISS and AUTO routing rules
Route The class adds the auto method to support registering a route that automatically parses URLs
Routing rules support model binding
Routing variables are unified and use the param method to obtain
Routing rule identification function and automatic identification
Add the generate route cache instruction optimize:route
Add the route method to the Request object to obtain the route variable separately
The param get post put request delete server cookie env method of the Request object If false is passed in as a parameter, it means that the original data is obtained without filtering
Improved automatic routing identification generation to support different routing rules pointing to the same routing identification, improved Url automatic generation to support routing identification
Improve the initialization of the filter attribute of the Request class
Improve the isAjax and isPjax methods of the Request class
Add the token method to the Request class
The routing configuration file supports multiple configurations using route_config_file configuration parameters
Domain name binding supports https detection
Improve domain name binding to support simultaneous binding of modules and other routing rules that support binding to array definitions, cancel domain name binding to groups
Add PATCH request type support to routing rules
Add route_complete_match configuration parameter to set the global routing rule definition. Whether to use a complete match can be overridden by the parameter complete_match of the routing rule.
Improve routing suffix parameter recognition prior to System pseudo-static suffix parameters
Url class adds root method to specify the current root address (excluding domain name)
Improve Url generation to support optional parameters
[ Database]
Query condition automatic parameter binding
Improve paging method to support parameter binding
The cache method of Query class adds cache tag parameters
Query class The update and delete methods support calling the cache method, which will automatically clear the cache of the specified key. Use it together with the cache method of the query method
Improve the delayed writing method of the Query class
The column and value of the Query class Method supports fetchsql
Improve date query method
Improve support for stored procedure method exec
Improve getLastInsID method of Connection class to obtain
Record database connection log (Connection time and DSN)
Improve the return result set judgment of the select method of the Query class
Add the getNumRows method to the Connection class
Cancel the return value of the database transaction method
Improve the acquisition of the primary key by the chunk method of the Query class
Improve the problem of the builder method of the Query class when the database driver type uses the complete namespace
[Model]
Add soft deletion function
Associated model and preloading improvements
Associated preloading query closure supports more coherent operations
Improve savell method to support update and verification
Association definitions uniformly return the Relation class
The has and hasWhere methods of the Model class support the join type
The data method of the Model class clears the original data when assigning data in batches
When the third parameter of the get method of the Model class is passed in true, the cache will be automatically updated.
The Model class adds read-only field support.
The Model class adds the useGlobalScope method to set whether it is enabled. Global query scope
The base method of the Model class is changed to a static definition that is valid for multiple global calls
The Model class supports setting primary keys, field information and field types, and does not rely on automatic acquisition to improve performance
The data method of the Model class supports modifiers
Improve the Relation class's support for non-numeric primary keys
Improve the one-to-many deletion of the Relation class
Correct the one-to-many association preload query of the Relation class
[Log and Cache]
Support separate storage of log types
The log allows setting the recording level
Add the cache tag function
Add the pull method to the cache class For obtaining and deleting
Add tag parameter to cache assistant function
Simplify log information and hide database password
Add library selection logic for cache/session redis driver;
The configuration parameters of the memcached driver support option parameters
The log record under debug mode increases the header and param parameter records of the page
The memcached cache driver adds the connection account password parameter
Cache Supports setting complex type. Supports configuring multiple caches and switching with store
Cache class adds tag method for cache tag setting clear method supports clearing data of a certain cache tag
File type log driver supports setting Separate files record different log levels
Improve file cache and log storage file name naming convention
The cache class adds inc and dec methods to provide auto-increment and auto-decrement operations for numerical data
Cache class adds has method get method to support default value
[Others]
View class supports setting template engine parameters
Add form token generation and verification
Add Chinese verification rules
Add image and file related verification rules
Redirect Response object supports implicit parameter passing with method
Improve automatic initialization of Session class
The session class adds the pull method for obtaining and deleting
Adds the Env class for obtaining environment variables
The Request class get/post/put etc. param method remains the same after changing the assignment Effective
Improve Jump address support Url::build parsing
Optimize Hook class
App debugging mode and page trace support environment variable settings
config The helper function supports config('?name') usage
Supports binding modules using the BIND_MODULE constant
The entry file automatically binds the module function
Improves the verification exception class Error message and template output, supporting batch verification error message throwing
Improve console and add some common methods of output
Add token assistant function to quickly display tokens on the page
Add halt method for variable debugging and interrupt output
Improve the number verification rules of the Validate class to distinguish them from integer
optimize:autoload adds scanning of the extend extension directory
Improve the boolean validation rules of the Validate class to support form data
Improve the cookie assistant function to support judging whether a certain cookie value exists
Improve the abort assistant function to support throwing HttpResponseException exception
Improve the File class and add handling of upload errors
Improve the return object of the File class move method, add upload form information, and add a method to obtain the file hash value
Improve the return of the File class move method The object returns a File object instance instead
Add clear and optimize:config instructions
Improve the image file type verification of the File class and Validate class
The operation method of the controller supports injection Object instances other than Request
Request class param(true) supports obtaining data with files
The first parameter of the input helper function increases the default value
Validate class adds image Verify rules and improve max min length to support multiple data types
Throw an exception after data encoding fails when outputting json
[Adjustment]
Abolish routing mapping (static routing) Definition
Cancel the url_deny_suffix configuration and change it to the deny_ext parameter setting of the route
The return value of the model save method is changed to the number of affected records, cancel the getId parameter
The Request object controller method returns the camel case Controller name
If the pre-operation method of the controller does not exist, an exception will be thrown.
Loader class db method adds the name identification parameter
The db assistant function adds the third parameter. For the specified connection identifier
The Sqlsrv driver does not convert data table fields to lowercase by default
Remove the sae driver and change it to an extension package
The Oracle driver is removed from the core package
Firebird driver is moved out of the core package
Cancel the alias definition file alias.php
Cancel the environment variable when reading the configuration parameters. Use the Env class when judging whether to read the environment variable
Environment variable definition file is changed to .env from the original PHP array to ini format definition (supports array mode)
The loading order of state configuration and extended configuration is adjusted so that the parameters of extended configuration can be changed in the state configuration file
Cancel domain name binding to route grouping function
The success and error method url parameters of the controller class support passing in empty strings, and no processing will be done
Controller The error success result redirect method does not need to use return
. The permission to create the directory is changed to 0644
.The above is the detailed content of When was ThinkPHP5 released?. For more information, please follow other related articles on the PHP Chinese website!