oplatform-club/platform-serialised-fields
Composer 安装命令:
composer require oplatform-club/platform-serialised-fields
包简介
Oro Platform Serialized Fields
README 文档
README
This document contains a little introduction into "Oro Entity Serialized Fields" package, information on how to download and install.
Table of content
Fundamentals
ORO Platform provides ability to have custom entities or extend entities with new custom fields.
The package allows to avoid schema update when you create custom field. Although this field come with some restrictions.
Such fields data stores in serialized_data column as serialized array. Field serialized_data is hidden from UI in entity config page.
Not supported features:
- grid filtering and sorting
- segments and reports
- charts
- search
- relations, enums and option set field types
- data audit
- usage of such fields in Doctrine query builder
After installation (described below) a new field called Storage Type appears within New field creation page where you will be offered to choose between two storage types:
Table Columnoption will allow to create custom field as usual;Serialized fieldoption means that you can avoid schema update and start to use this field imediately, but should take into account, that field types are limited in this case to:- string
- integer
- smallint
- bigint
- boolean
- decimal
- date
- datetime
- text
- float
- money
- percent
To create a serialized field via migration the SerializedFieldsExtension can be used. Here is an example:
<?php namespace Acme\Bundle\AppBundle\Migrations\Schema\v1_1; use Doctrine\DBAL\Schema\Schema; use Oro\Bundle\EntityExtendBundle\EntityConfig\ExtendScope; use Oro\Bundle\EntitySerializedFieldsBundle\Migration\Extension\SerializedFieldsExtension; use Oro\Bundle\EntitySerializedFieldsBundle\Migration\Extension\SerializedFieldsExtensionAwareInterface; use Oro\Bundle\MigrationBundle\Migration\Migration; use Oro\Bundle\MigrationBundle\Migration\QueryBag; class AddSerializedFieldMigration implements Migration, SerializedFieldsExtensionAwareInterface { /** @var SerializedFieldsExtension */ protected $serializedFieldsExtension; /** * {@inheritdoc} */ public function setSerializedFieldsExtension(SerializedFieldsExtension $serializedFieldsExtension) { $this->serializedFieldsExtension = $serializedFieldsExtension; } /** * {@inheritdoc} */ public function up(Schema $schema, QueryBag $queries) { $this->serializedFieldsExtension->addSerializedField( $schema->getTable('my_table'), 'my_serialized_field', 'string', [ 'extend' => [ 'owner' => ExtendScope::OWNER_CUSTOM, ] ] ); } }
Requirements
OroEntitySerializedFieldsBundle requires OROPlatform(BAP) and PHP 7.0 or above.
Installation
Package is available through Oro Package Manager. For development purposes it might be cloned from github repository directly.
git clone git@github.com:orocrm/OroEntitySerializedFieldsBundle.git
git submodule init
git submodule update
Update your composer.json with
"autoload": {
"psr-0": {
...
"Oro\\Bundle": ["src/Oro/src", "src/OroPackages/src"],
...
}
},
php composer.phar update
php app/console oro:platform:update --force
Run unit tests
To run unit tests for this package:
phpunit -c PACKAGE_ROOT/phpunit.xml.dist
oplatform-club/platform-serialised-fields 适用场景与选型建议
oplatform-club/platform-serialised-fields 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 2 次下载、GitHub Stars 达 0, 最近一次更新时间为 2017 年 12 月 31 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「entity」 「platform」 「fields」 「ORO」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 oplatform-club/platform-serialised-fields 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 oplatform-club/platform-serialised-fields 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 oplatform-club/platform-serialised-fields 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Runn Me! Value Objects Library
LinkedIn API PHP SDK with OAuth 2.0 & CSRF support. Can be used for social sign in or sharing on LinkedIn. Examples. Documentation.
generates php entities from openapi spec
LinkedIn API PHP SDK with OAuth 2.0 & CSRF support. Can be used for social sign in or sharing on LinkedIn. Examples. Documentation.
Register advanced custom fields with object oriented PHP
DCSDynamicDiscriminatorMapBundle simplifies the use of Doctrine Single Table Inheritance mapping strategy in Symfony2.
统计信息
- 总下载量: 2
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 4
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: OSL-3.0
- 更新时间: 2017-12-31