sympress/profiler
Composer 安装命令:
composer require sympress/profiler
包简介
Profiler and web debug toolbar for the WordPress kernel.
README 文档
README
Profiler and web debug toolbar for SymPress WordPress kernel applications.
The package records request, runtime, WordPress, and rendering data during development and exposes it through an in-browser toolbar and profiler pages. It is distributed as a Composer-powered WordPress MU plugin and integrates with the SymPress kernel service container.
Installation
composer require sympress/profiler
The package requires PHP 8.5, WordPress 6.9 or newer, and sympress/kernel.
Features
- Symfony-style web debug toolbar for WordPress frontoffice requests
- Profiler pages with searchable stored profiles
- Request, response, performance, memory, and PHP error collection
- WordPress data collectors for hooks, templates, blocks, assets, REST/AJAX, options, cache, cron, plugins, themes, queries, and localization
- HTTP client, database, security, kernel, and runtime diagnostics
- Filesystem profile storage under the kernel cache directory
- Development-only access by default with filter-based overrides
- Optional
SAVEQUERIESactivation for local debug environments - Bundled toolbar icons, styles, templates, and font assets
Usage
When the SymPress kernel discovers the package, it registers
SymPress\Profiler\ProfilerBundle and loads profiler/profiler.php as the MU
plugin entry point.
The profiler collects frontoffice requests in local and development environments by default. The toolbar links each request to a stored profile with all collector panels.
<?php add_filter('profiler.collect', static fn (bool $collect): bool => $collect);
Collection can also be controlled through the service parameters in
Resources/config/services.yaml:
parameters: profiler.storage_dir: '%kernel.project_dir%/var/cache/%kernel.environment%/profiler' profiler.collect: true profiler.collect_parameter: '' profiler.toolbar.ajax_replace: false
Access Control
Profiler access is enabled automatically for local and development
environments. To enable access outside development, return true from the
profiler.enable_outside_development filter. Users must still be able to manage
WordPress options.
<?php add_filter( 'profiler.enable_outside_development', static fn (bool $enabled, string $environment): bool => $environment === 'staging', 10, 2, );
Development
composer install
composer test
composer cs:analyze
composer cs
Use composer cs:fix to apply automatic style fixes.
License
This package is licensed under GPL-2.0-or-later.
sympress/profiler 适用场景与选型建议
sympress/profiler 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 55 次下载、GitHub Stars 达 1, 最近一次更新时间为 2026 年 06 月 10 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 sympress/profiler 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 sympress/profiler 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 55
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 44
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0-or-later
- 更新时间: 2026-06-10