Home Backend Development PHP Tutorial QueryPHP V1-beta.5 improves ORM design experience

QueryPHP V1-beta.5 improves ORM design experience

Sep 16, 2019 am 11:17 AM

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 of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Explain JSON Web Tokens (JWT) and their use case in PHP APIs. Explain JSON Web Tokens (JWT) and their use case in PHP APIs. Apr 05, 2025 am 12:04 AM

JWT is an open standard based on JSON, used to securely transmit information between parties, mainly for identity authentication and information exchange. 1. JWT consists of three parts: Header, Payload and Signature. 2. The working principle of JWT includes three steps: generating JWT, verifying JWT and parsing Payload. 3. When using JWT for authentication in PHP, JWT can be generated and verified, and user role and permission information can be included in advanced usage. 4. Common errors include signature verification failure, token expiration, and payload oversized. Debugging skills include using debugging tools and logging. 5. Performance optimization and best practices include using appropriate signature algorithms, setting validity periods reasonably,

Describe the SOLID principles and how they apply to PHP development. Describe the SOLID principles and how they apply to PHP development. Apr 03, 2025 am 12:04 AM

The application of SOLID principle in PHP development includes: 1. Single responsibility principle (SRP): Each class is responsible for only one function. 2. Open and close principle (OCP): Changes are achieved through extension rather than modification. 3. Lisch's Substitution Principle (LSP): Subclasses can replace base classes without affecting program accuracy. 4. Interface isolation principle (ISP): Use fine-grained interfaces to avoid dependencies and unused methods. 5. Dependency inversion principle (DIP): High and low-level modules rely on abstraction and are implemented through dependency injection.

How to automatically set permissions of unixsocket after system restart? How to automatically set permissions of unixsocket after system restart? Mar 31, 2025 pm 11:54 PM

How to automatically set the permissions of unixsocket after the system restarts. Every time the system restarts, we need to execute the following command to modify the permissions of unixsocket: sudo...

Explain the concept of late static binding in PHP. Explain the concept of late static binding in PHP. Mar 21, 2025 pm 01:33 PM

Article discusses late static binding (LSB) in PHP, introduced in PHP 5.3, allowing runtime resolution of static method calls for more flexible inheritance.Main issue: LSB vs. traditional polymorphism; LSB's practical applications and potential perfo

How to send a POST request containing JSON data using PHP's cURL library? How to send a POST request containing JSON data using PHP's cURL library? Apr 01, 2025 pm 03:12 PM

Sending JSON data using PHP's cURL library In PHP development, it is often necessary to interact with external APIs. One of the common ways is to use cURL library to send POST�...

Framework Security Features: Protecting against vulnerabilities. Framework Security Features: Protecting against vulnerabilities. Mar 28, 2025 pm 05:11 PM

Article discusses essential security features in frameworks to protect against vulnerabilities, including input validation, authentication, and regular updates.

How to debug CLI mode in PHPStorm? How to debug CLI mode in PHPStorm? Apr 01, 2025 pm 02:57 PM

How to debug CLI mode in PHPStorm? When developing with PHPStorm, sometimes we need to debug PHP in command line interface (CLI) mode...

See all articles