avolle/cakephp-deadlinks
Composer 安装命令:
composer require avolle/cakephp-deadlinks
包简介
CakePHP Plugin to search database entries for dead links
README 文档
README
Scan links inside your database records to make sure they're not dead.
The links you once inserted into your database may not work in the future. This plugin makes sure all your links are well and alive. If any links are found to be dead, the results can be ouput through various methods.
Output methods:
- Terminal
- Log file
Version map:
| Plugin | Branch | Cake | PHP |
|---|---|---|---|
| 2.x | main | 5.x | ^8.1 |
| 1.x | 1.x | 4.x | ^7.4 | ^8.0 |
Installation
composer require avolle/cakephp-deadlinks
Usage
Add a config file in your app config folder, describing which tables and fields to scan. Optionally you can insert an email recipient to receive results when selecting the mail ouput method.
Example config file (/config/deadlinks.php):
This config file will scan the following tables and fields:
- Files
- linkOne
- linkTwo
- Links
- link
- Resources
- link
<?php return [ 'Deadlinks' => [ /* * Mail Recipient. Person to receive results when mail output is selected */ 'mailRecipient' => 'cakephp-plugins@avolle.com', /* * Tables to scan and their fields */ 'tables' => [ 'Files' => [ 'fields' => [ 'linkOne', 'linkTwo', ], ], 'Links' => [ 'fields' => [ 'link', ], ], 'Resources' => [ 'fields' => [ 'link', ], ], ], ], ];
Add the plugin in your src/Application.php file. Put it inside the bootstrapCli method
protected function bootstrapCli(): void { $this->addPlugin('Avolle/Deadlinks'); }
To run the scanner, execute this command in your terminal
- Output in terminal:
bin\cake scan -t - Output to log file:
bin\cake scan -l - Output to an email:
bin\cake scan -m
You can also ouput several methods. For both terminal and log file, run bin\cake scan -t -l.
For help, run bin\cake scan -h
avolle/cakephp-deadlinks 适用场景与选型建议
avolle/cakephp-deadlinks 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 634 次下载、GitHub Stars 达 1, 最近一次更新时间为 2021 年 07 月 11 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 avolle/cakephp-deadlinks 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 avolle/cakephp-deadlinks 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 634
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 9
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-07-11