Home  >  Article  >  Backend Development  >  QueryPHP V1-beta.5 improves ORM design experience

QueryPHP V1-beta.5 improves ORM design experience

藏色散人
藏色散人forward
2019-09-16 11:17:261640browse

QueryPHP v1.0.0-beta.5, this version mainly improves ORM and optimizes a lot of details.

About QueryPHP

QueryPHP is a modern, high-performance PHP progressive coroutine framework. We are still mainly oriented to traditional PHP-FPM scenarios and focus on engineer user experience. The historical mission is to provide every PHP application with a good framework.

One hundred percent unit test coverage faces bugs, the core of the framework is implemented based on Zephir, and business performance is improved by relying on Swoole coroutines. It will gradually improve in the future. Our vision is to USE LEEVEL WITH SWOOLE DO BETTER, allowing your business to support more user services.

https://github.com/hunzhiwange/queryphp

https://gitee.com/dyhb/queryphp

https://www.queryphp.com

Update log

[framework] Split the underlying redis service and register it to IOC For containers, you can easily use

[framework] to delete your own dd and dump debugging functions. Symfony comes with it and you don’t need to do it anymore.

[framework] Remove the global function app, hl helper function, implement App (alias Leevel) by static proxy, App::path (), App can access the method App::make () in the IOC container 'request').

[framework] Delete all interface designs in the proxy \Leevel\Kernel\Proxy\IApp, delete the Proxy in the component, and use @method to implement the IDE helper instead, and build in a tool for automatically generating such commands. generate.

[framework] Optimize swoole hot reload code to facilitate testing.

[framework] Improve the system exception handling component, change the system's built-in exceptions to abstract to facilitate the business layer inheritance to better handle exceptions, add a business processing exception\Leevel\Kernel\Exception\BusinessException, and the exception response is also Will be processed by middleware.

[framework] The core kernel and routing support the processing of CORS options requests, using custom middleware to easily handle cross-domain access issues, splitting the routing binding parsing method, and making the code clearer.

[framework] Association model, improve the special processing of ORM association query source value being empty, no longer execute subsequent queries, reduce database queries, and fix the bug that the nested association preload query is not executed.

[framework] Add a static access to each component helper function, split each kumite function into a separate file for easy f call.

[framework] Add more const entities such as CONSTRUCT_PROP_WHITE, MIDDLE_SOURCE_KEY to avoid hard-coding some agreed names of entities.

[framework] Database PDO query improvement, return numbers when they are numbers, and no longer return all strings.

[framework] Query adds support for where ('foo', '=', null) to handle very special scenarios. In the past, errors were reported directly.

[framework] Improve the entity \Leevel\Database\Ddd\Entity toArray design, now null will be automatically ignored.

[framework] Improve the design related to entity \Leevel\Database\Ddd\Entity properties, access withProps,withProp,hasProp,prop.

[framework] Improve the design related to soft deletion of entity\Leevel\Database\Ddd\Entity. Once an entity is defined with const DELETE_AT, system query and deletion will automatically be soft-deleted. Data containing soft deletion can also be queried through withSoftDeleted. forceDelete force delete.

[framework] Improve the query entity find ($id) in Entity\Leevel\Database\Ddd\Entity to findEntity ($id), which is easier to understand. Exceptions can avoid conflicts with the use of find () query understanding. .

[framework] Fix the redis connection pool connection and the PHPRedis driver supports reconnection.

[framework] The validator will automatically convert the validation parameters not_between:1,5 to int and float, so that the framework can achieve the overall direction of a unified strong type. Exception database unique verification\Leevel\Validate\UniqueRule automatically recognizes int. and float to avoid conversion types in database queries without using indexes to affect performance.

[framework] Improve the entity\Leevel\Database\Ddd\Entity query design, remove the query magic method, __call and ___callStatic are blocked, all queries need to go through the static entry select (alias find, retained to pay tribute to QeePHP habits ), meta (retaining the habit of paying tribute to QeePHP) initiated, coupled with ide helper support, perfectly supports IDE.

[framework] Improved entity connection \Leevel\Database\Ddd\Entity cut library design, each entity implements withConnect and connect by itself, which is more updated and controllable, and provides cut library security sandbox connectSandbox.

[framework] Use PDOStatement->debugDumpParams () to obtain the final SQL, and at the same time write the SQL to the log in the debug component to facilitate development and debugging.

[framework] Transaction work unit \Leevel\Database\Ddd\UnitOfWork adds support for soft deletion and strong deletion, and also includes warehousing adjustments to \Leevel\Database\Ddd\Repository.

[framework] Fix and delete the flushed feature in entities and repositories that has already refreshed data. It is unnecessary.

[tests] Added more than 10 swoole-related test cases and others, more than 3080 unit tests, and 10000 assertions.

[application] QueryPHP itself is a standard backend based on IViewUI, with its own resource-based permission system. Due to a large number of adjustments to the framework, the backend has been adjusted accordingly to facilitate operation.

[application] QueryPHP itself mainly introduces Workflow to improve curd operations and incorporate queries into services.

RoadMap

[framework] Beta 4-6 mainly provides perfect support for the latest version of Swoole 4 coroutines.

[framework] The RC version will freeze the planning function and only fix bugs, unit tests and improve documentation.

[framework] The official version of v1.0.0 will be released with PHP 7.4 at https://wiki.php.net/todo/php74, and is planned to be released in 2019.12.

Contact

https://www.queryphp.com

Help Us

QueryPHP was released in October 2016 It was developed based on DoYouHaoBaby framework, an early PHP framework I started in July 2010.

If you think it is possible, you can recommend a friend to give it a try and follow it. I hope to attract interested people to develop together. The document is relatively simple to automate based on unit tests and comments.

The above is the detailed content of QueryPHP V1-beta.5 improves ORM design experience. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:learnku.com. If there is any infringement, please contact admin@php.cn delete