tintnaingwin/kuu-pyaung
Composer 安装命令:
composer require tintnaingwin/kuu-pyaung
包简介
Laravel package to convert resource files and database from zawgyi to unicode
README 文档
README
Kuu Pyaung Package converts resources files and databases from zawgyi to unicode.
If the context is unicode, don't worry about the conflict context, Kuu Pyaung hasn't converted unicode context to unicode again.
Requirements
version-1.x
version-2.x
version-3.x
version-4.x
version-5.x
Laravel Version Compatibility
| Laravel | Package | PHP |
|---|---|---|
| 5.2.x | 1.x | >=5.6.4 |
| 5.3.x | 1.x | >=5.6.4 |
| 5.4.x | 1.x | >=5.6.4 |
| 5.5.x | 2.x | >=7.0.0 |
| 5.6.x | 2.x | >=7.1.3 |
| 5.7.x | 2.x | >=7.1.3 |
| 5.8.x | 3.x | >=7.2.0 |
| 6.x | 3.x | >=7.2.0 |
| 7.x | 3.x | >=7.2.5 |
| 8.x | 4.x | >=7.4 |
| 9.x | 5.x | >=8.1 |
| 10.x | 5.x | >=8.1 |
Installation and usage
For Laravel 8.x
composer require tintnaingwin/kuu-pyaung:"~4.0"
For Laravel 5.8|6.x|7.x
composer require tintnaingwin/kuu-pyaung:"~3.0"
For Laravel 5.5|5.6|5.7
composer require tintnaingwin/kuu-pyaung:"~2.0"
For Laravel 5.2|5.3|5.4
composer require tintnaingwin/kuu-pyaung:"~1.0"
For laravel >=5.5 that's all. This package supports Laravel new Package Discovery.
If you are using Laravel < 5.5, you also need to add the service provider class to your project's config/app.php file:
Service Provider
Tintnaingwin\KuuPyaung\KuuPyaungServiceProvider::class,
You can publish the config-file with:
php artisan vendor:publish --provider="Tintnaingwin\KuuPyaung\KuuPyaungServiceProvider"
Artisan commands
You can convert your app by running:
php artisan kuupyaung:run
If you would like to convert only the files, run:
php artisan kuupyaung:run --only-files
If you would like to convert only the database, run:
php artisan kuupyaung:run --only-database
Configuration
Kuu Pyaung can be configured directly in /config/kuu-pyaung.php.
This is the contents of the published config file:
return [ /* * These resource directories only will be convert. */ 'include_files' => [ 'views', 'lang', // lang/my ], /* * These database tables will be excluded from the convert. */ 'exclude_tables' => [ 'password_resets', 'migrations', 'failed_jobs', 'telescope_entries', 'telescope_entries_tags', 'telescope_monitoring', ], /* * These database table columns will be excluded from the convert. * * The value of the some columns may be filenames or you don't want to convert. * Eg - 'table_name' => [ 'exclude_column', 'exclude_column' ] */ 'exclude_table_columns' => [ 'users' => [ 'profile_pic', 'file_path' ], 'orders' => [ 'invoice_path' ] ] ];
Files Convert
This package convert only folder under the resource directories. You can determine which resource files will be convert.
/* * These resource directories only will be convert. */ 'include_files' => [ 'views', 'lang', // lang/my ],
Database Convert
Exclude Tables - Kuu Pyaung converts only string data types from the database. You can determine which tables will be excluded from the convert. In addition,
if your table does not have primary key (id or UUID), this table will not be converted.
/* * These database tables will be excluded from the convert. */ 'exclude_tables' => [ 'password_resets', 'migrations', 'failed_jobs', 'telescope_entries', 'telescope_entries_tags', 'telescope_monitoring', ],
Exclude Columns - If the value of some columns is maybe zawgyi filenames or file paths. you can add these columns in the exclude_table_columns at the config file.
/* * These database table columns will be excluded from the convert. * * The value of the some columns may be filenames that you don't want to convert. * Eg - 'table_name' => [ 'exclude_column', 'exclude_column' ] */ /* 'exclude_table_columns' => [ 'users' => [ 'profile_pic', 'file_path' ], 'orders' => [ 'invoice_path' ] ] */
We highly recommend that you should use maintenance mode when you convert the database tables in production server.
Supported databases
- MySQL
- PostgreSQL
- SQLite
Troubleshoot
You can convert with kuu-pyaung in the following situations,
The first thing if you are using the laravel <5.2
The second thing you don't want to install current project.
- First, create the new laravel project
- Make sure to join the database.
- Make sure to install the kuu-pyaung
- After that you can convert with kuu-pyaung
Testing
Run the tests with:
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
License
The MIT License (MIT). Please see License File for more information.
tintnaingwin/kuu-pyaung 适用场景与选型建议
tintnaingwin/kuu-pyaung 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 58 次下载、GitHub Stars 达 15, 最近一次更新时间为 2019 年 09 月 27 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「database」 「convert」 「unicode」 「resource」 「zawgyi」 「myanmar-font」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 tintnaingwin/kuu-pyaung 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 tintnaingwin/kuu-pyaung 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 tintnaingwin/kuu-pyaung 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Dibi is Database Abstraction Library for PHP
Provides a simple decimal/roman number converter
A library that provides a simple infrastructure to create your own converters and to perform any conversion you want
A Laravel 5 Package for Using & Working With Emojis
Store your language lines in the database, yaml or other sources
PHP Unicode library
统计信息
- 总下载量: 58
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 15
- 点击次数: 15
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-09-27