tanoconsulting/ezdbintegritybundle
Composer 安装命令:
composer require tanoconsulting/ezdbintegritybundle
包简介
Validates database data and binary file storage of eZPlatform 3 (aka Ibexa OSS/DXP)
关键字:
README 文档
README
This bundle is the 'eZPlatform 3 port' of the eZDBIntegrity extension for eZPublish/eZPlatform 1 and 2.
Goals
Allow checking integrity of data in the eZPlatform database:
- foreign keys
- generic data integrity rules which can not expressed as foreign key
- content fields values according to their content type field definition (not yet implemented)
Allow checking integrity of the eZPlatform storage files (images, media and binary files from content).
Requirements
eZPlatform 3, running on MySQL/MariaDB
Installation
Install via Composer: composer require "tanoconsulting/ezdbintegritybundle:1.0.0-beta2" "tanoconsulting/datavalidatorbundle >=1.0.0-BETA1"
Getting started
All this bundle does is to add some cli commands. To get you started, try running:
php bin/console ezdbintegrity:check:schema --dry-run
php bin/console ezdbintegrity:check:schema
php bin/console ezdbintegrity:check:schema --display-data
php bin/console ezdbintegrity:check:storage
php bin/console ezdbintegrity:check:storage --check-db-orphans
php bin/console ezdbintegrity:check:storage --check-db-orphans --display-data
All of the commands do print out more information about what is going on, and more details about the violations found,
when they are run with the -v option.
Tips
-
To avoid excessive memory usage from large queries, when running Symfony in "debug mode", such as commonly for "dev" envs, add the
--no-debugoption to your commands. If possible, use a non-debug Symfony env. -
If you still get an 'allowed memory size' fatal error, run the commands with
php -d memory_limit=-1. -
The best way to troubleshoot "missing images" is to identify only those missing image files which correspond to a currently published content version, and which are not auto-generated aliases. In the same way, for missing binary files, it is useful to identify only those hich correspond to a currently published content version.
This can be achieved by filtering the list of all missing files using the following command:
php bin/console ezdbintegrity:check:storage --check-db-orphans --display-data -v | grep -v '"v_status":null' | grep -v '"alias":true' -
If you have lots of images and variations, it might be worth pruning all empty directories from the image storage folder from time to time, esp. before executing a backup or if your disk is running out of inodes. A quick one-liner to find all empty subdirectories of the current directory is:
find . -type d -emptyand to remove them:
find . -type d -empty -delete
Still to be done
- validation of content fields data
- allow users to add constraint definitions for their own custom tables
- test if checks work with multi-repository setups
- test if checks work with ezdfs setups
- test if this bundle could work with ezplatform 2
- improvements in output formatting and ability to run a subset of checks
- improvements to storage checks:
- look harder for candidate replacement files available on disk for missing images (eg. look for {$file}_reference.jpg)
- validation of image variation files (ie. check existing aliases without an original file)
DISCLAIMER
!!! DO NOT BLINDLY DELETE ANY DATA IN THE DB WHICH IS REPORTED AS FOREIGN KEY VIOLATION !!!
!!! DO NOT BLINDLY DELETE ANY STORAGE FILE WHICH IS REPORTED AS ORPHAN !!!
We take no responsibility for consequences if you do. You should carefully investigate the reason for such violations. There is a good chance that the problem lies within this extension and not your data - the FK definitions provided have been reverse-engineered from existing codebase and databases, and are not cast in stone.
tanoconsulting/ezdbintegritybundle 适用场景与选型建议
tanoconsulting/ezdbintegritybundle 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 6 次下载、GitHub Stars 达 0, 最近一次更新时间为 2021 年 03 月 01 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「database」 「ezplatform」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 tanoconsulting/ezdbintegritybundle 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 tanoconsulting/ezdbintegritybundle 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 tanoconsulting/ezdbintegritybundle 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Dibi is Database Abstraction Library for PHP
Store your language lines in the database, yaml or other sources
Novactive eZ 2FA Bundle is an Ibexa bundle that provides two-factor authentication for your Ibexa project
A package for automatically encrypting and decrypting Eloquent attributes in Laravel 5.5+, based on configuration settings.
UI Interface for several system activities and user history for eZ Platform Ibexa 4+
A PSR-7 compatible library for making CRUD API endpoints
统计信息
- 总下载量: 6
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0
- 更新时间: 2021-03-01