beromir/neos-ray
Composer 安装命令:
composer require beromir/neos-ray
包简介
Debug your Neos site with the Ray app.
关键字:
README 文档
README
Debug your Neos site with the Ray app.
Ray is a debugger app from Spatie. You can find more information about Ray on https://myray.app/.
Official Ray docs: https://spatie.be/docs/ray/v1/introduction.
Installation
Run the following command in your site package:
composer require --no-update beromir/neos-ray
Then run composer update in your project root.
Requirements
You need to have the Ray app installed and a valid license. You can download the app here: https://spatie.be/docs/ray/v1/the-ray-desktop-app/download-the-free-demo.
Configuration
Create the configuration file ray.php in your Neos site root directory.
Configuration options: https://spatie.be/docs/ray/v1/configuration/framework-agnostic-php.
Configuration options when you use Docker: https://spatie.be/docs/ray/v1/environment-specific-configuration/docker.
Usage
You can use all Ray functions from https://spatie.be/docs/ray/v1/usage/framework-agnostic-php-project.
Reference list (just the PHP specific functions): https://spatie.be/docs/ray/v1/usage/reference.
To use the functions, you must add them as key-value pairs in Fusion.
If the function does not require any parameters, you can use null, false or an empty string as the value.
To pass parameters, add them as a value.
valueToDebug = 'Show this text in the Ray app.'
valueToDebug.@process.debug = Beromir.Ray:Debug {
// Show a label in the Ray app
label = 'Text'
// Colorize the output
red = ''
// Show the output as large text
large = ''
}
valueToDebug = 'Show this text in the Ray app.'
valueToDebug.@process.debug = Beromir.Ray:Debug {
// Show a label in the Ray app
label = 'Text'
// Only send a payload once when in a loop
once = ${node}
}
Debug a Fusion expression:
valueToDebug = 'Show this text in the Ray app.' valueToDebug.@process.debug = Beromir.Ray:Debug
Alternative ways:
// Debug the current node
debug = Beromir.Ray:Debug {
value = ${node}
}
renderer = afx`
{props.debug}
`
renderer = afx` <Beromir.Ray:Debug value={node}/> `
Debug multiple values:
debug = Beromir.Ray:Debug {
// Pass the values as an array
value = ${[node, site]}
}
renderer = afx`
{props.debug}
`
Use Debug Actions to debug NodeTypes:
// Display the NodeType name of the node
debug = Beromir.Ray:Debug {
value = ${node}
debugAction = 'nodeTypeName'
}
renderer = afx`
{props.debug}
`
// Display the properties of the current node and the site node
debug = Beromir.Ray:Debug {
value = ${[node, site]}
debugAction = 'properties'
}
renderer = afx`
{props.debug}
`
You can use the following Debug Actions for NodeTypes:
| Debug Action | Description |
|---|---|
nodeTypeName |
Display the NodeType name of a node |
context |
Display the context of a node |
contextPath |
Display the context path of a node |
properties |
Display the properties of a node |
Eel Helper
You can also use the Ray Eel helper to debug your site.
{Beromir.Ray.debug(node)}
{Beromir.Ray.debug([node, site])}
The second parameter can be used to set a debug action for NodeTypes.
{Beromir.Ray.debug(node, 'properties')}
beromir/neos-ray 适用场景与选型建议
beromir/neos-ray 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 884 次下载、GitHub Stars 达 3, 最近一次更新时间为 2021 年 10 月 04 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「flow」 「debugging」 「Neos」 「ray」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 beromir/neos-ray 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 beromir/neos-ray 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 beromir/neos-ray 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
An improved history backend module for Neos
Put images nicley in a row
Create link to static resources with cache-breaking segment based on md5 of the file
A PHP package that takes a snapshot of your application and allows you to retrieve it later to help with debugging.
Laravel Database Query Logger and debug helper.
Allows changing uploaded asset filenames in Neos CMS
统计信息
- 总下载量: 884
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 8
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-3.0
- 更新时间: 2021-10-04