承接 drop-in-gaming/carbonphp 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

drop-in-gaming/carbonphp

Composer 安装命令:

composer require drop-in-gaming/carbonphp

包简介

A PHP 8.1+ tool kit featuring RESTFUL ORM, sockets, session management, and routing.

README 文档

README

PHP Version GitHub Release Packagist Version License Size Documentation CarbonPHP Feature Test Suit Monthly Downloads Monthly Downloads All Downloads All Downloads Star

UPDATE - Repository location change

Some badges above are duplicated to show the true stats across Packagist.

New installation

composer require carbonorm/carbonphp

Note - the old location composer require richardtmiles/carbonphp should continue to work but is considered deprecated

CarbonPHP Tool Kit and Performance Library

CarbonPHP has grown into the CarbonORM Public Organization. There you can find documentation over the front end process of using the ORM. C6 now refers to any of Carbon* prefixed CarbonORM packages.

CarbonPHP.com

CarbonPHP has reached a stable level of trust in its own features through PHPUnit Tests + GitHub Actions but is still in active development. CarbonPHP is being used in production environments. Anyone, or team, who attempts using this code will find support on GitHub through issues and forums. We generally expect any issue you many encountered to be minor. If you edit the codebase, please consider submitting those changes on GitHub! C6 uses Semantic Versioning 2.0.0. Generally: MAJOR version when you make incompatible API changes, MINOR version when you add functionality in a backwards compatible manner, and PATCH version when you make backwards compatible bug fixes. Changes to function/class/etc will be called out in the Changelog with every minor release. Please read the changelog or code changes carefully when updating. Refer to the guide at carbonphp.com

Introduction - The ORM of your dreams & Wordpress Compatable

CarbonPHP is a PHP 7.4+ library to simplify the building of custom, dynamic web applications. Its main focus is to make webapps run ridiculously fast, with performance and high-traffic scalability being the absolute highest concern. CarbonPHP has clocked in with impressive statistics, sometimes doubling the traffic that small servers with MySQL-intensive sites can handle. C6 works as a standalone backbone for your dev needs or in the corporation with other popular frameworks like Wordpress or Laravel. CarbonPHP's other goals include portability; allowing your webapps to be installed on servers with different operating systems (Windows, Mac, and Linux Support). Full MySQL ORM REST generator, and php written database tools designed around the MySQL. Windows PHP currently lacks a library capable of forking. Should your development require Windows computers look into Websocketd.com and the file name "./programs/Websocketd.php". I have written a few wiki's in the repo above explaining how to Use sockets in this way. I hope to contribute a php library written in C (PHP is written in C) to support this task, however time is a factor. Should you feel compelled to help in this goal please contact me at Richard@Miles.Systems. Please see the documentation at Carbonphp.com for more information. For the rest of us who live outside windows Hell C6 has a Websocket Library Class for Standard use and Wordpress use.

Quick Start

Existing projects

composer require carbonorm/carbonphp

Standards

C6 should follow the PHP Standards Recommendations listed below.

PSR-4

PSR-12

SEMVAR

Requirements

CarbonPHP currently requires PHP 8.2 or later. We try to stay up-to-date with PHP's Supported Versions. It makes use of return type object notation, and should not be ported back to earlier PHP versions. CarbonPHP will always try to stay upto date with the latest version of PHP. Use of an opcode cache such as XCache is highly recommended, as Carbon is able to run entirely without stat() calls when paired with an opcode cache. Also recommended (but optional) is a RAM-caching engine such as memcached. PHP8, if not already supported, will receive support WITH C6's FIRST Backwards Compatible Release. Plans to drop 7.4 are currently scheduled for the summer of 2022.

Documentation

All function should have PHPDoc-style documentation in the code. CarbonPHP.com also has full explanations of the codebase. ssed to MVC. Please ensure your namespace mappings are correct!";

RESTFUL ORM

CarbonPHP's largest feature is the MySQL ORM. By running a customizable CLI command our program will analyze your database schema and generate powerful classes used to manipulate your tables. The auto generated files may be used in conjunction for an incredibly pleasing RESTFUL semantics structure. Below are examples for using the REST ORM. You can see the generated source here.

    $id = Users::Post([
            Users::USER_TYPE => 'Athlete',
            Users::USER_IP => '127.0.0.1',
            Users::USER_SPORT => 'GOLF',
            Users::USER_EMAIL_CONFIRMED => 1,
            Users::USER_USERNAME => Config::ADMIN_USERNAME,
            Users::USER_PASSWORD => Config::ADMIN_PASSWORD,
            Users::USER_EMAIL => 'richard@miles.systems',
            Users::USER_FIRST_NAME => 'Richard',
            Users::USER_LAST_NAME => 'Miles',
            Users::USER_GENDER => 'Male'
        ]);

Joining across multiple tables.

    Users::Get($user, $uid, [
            Users::SELECT => [
                Users::USER_USERNAME,
                Carbon_Locations::STATE
            ],
            Users::JOIN => [
                Users::INNER => [
                    Carbon_Location_References::TABLE_NAME => [
                        Users::USER_ID => Carbon_Location_References::ENTITY_REFERENCE
                    ],
                    Carbon_Locations::TABLE_NAME => [
                        Carbon_Locations::ENTITY_ID => Carbon_Location_References::LOCATION_REFERENCE
                    ]
                ]
            ],
            Users::PAGINATION => [
                Users::LIMIT => 1,
                Users::ORDER => [Users::USER_USERNAME => Users::ASC]
            ]
        ]);

Using the ORM from the Frontend. This example showcases multiple table joins, as well as the use of aggregate function(s) GROUP_CONCAT.

    const { axios } = this.props;

    axios.get('/rest/' + C6.carbon_users.TABLE_NAME, {
      params: {
        [C6.SELECT]: [
          C6.carbon_users.USER_USERNAME,
          C6.carbon_users.USER_FIRST_NAME,
          C6.carbon_users.USER_LAST_NAME,
          C6.carbon_users.USER_ID,
          [C6.GROUP_CONCAT, C6.carbon_features.FEATURE_CODE],
          [C6.GROUP_CONCAT, C6.carbon_groups.GROUP_NAME]
        ],
        [C6.JOIN]: {
          [C6.LEFT]: {
            [C6.carbon_user_groups.TABLE_NAME]: [
              C6.carbon_users.USER_ID,
              C6.carbon_user_groups.USER_ID
            ],
            [C6.carbon_groups.TABLE_NAME]: [
              C6.carbon_user_groups.GROUP_ID,
              C6.carbon_groups.ENTITY_ID
            ],
            [C6.carbon_feature_group_references.TABLE_NAME]: [
              C6.carbon_groups.ENTITY_ID,
              C6.carbon_feature_group_references.GROUP_ENTITY_ID
            ],
            [C6.carbon_features.TABLE_NAME]: [
              C6.carbon_features.FEATURE_ENTITY_ID,
              C6.carbon_feature_group_references.FEATURE_ENTITY_ID
            ]
          }
        },
        [C6.PAGINATION]: {
          [C6.LIMIT]: 100
        }
      }
    }).then(response => this.setState({ users: (response.data.rest || []) }));

Builtin Command Line Interface

Much like laravel's artisan, any file that invokes CarbonPHP from the command line will execute the CLI Interface. I plan to make a system in place for user commands in Beta. See all available commands with:

php index.php help

Support

Informal support for CarbonPHP is currently offered on https://github.com/RichardTMiles/CarbonPHP.

Legal

Use of CarbonPHP implies agreement with its software license, available in the LICENSE file. This license is subject to change from release to release, so before upgrading to a new version of C6, please review its license.

Credits

CarbonPHP was created by Richard Tyler Miles, the BDFL, and inspired by Tom Frost's Hydrogen.

Contributors can be found in the GitHub Contributor Listing.

NOTES

Common TSX types

something: PropTypes.arrayOf(PropTypes.node)
****classes: PropTypes.object.isRequired,
message: PropTypes.node.isRequired,

To update the version number on the FED

  1. update the header menu

    view/assets/react/src/components/HeaderTop/HeaderLinks.tsx components/HeaderTop/HeaderLinks.tsx

  2. version number

    variables/carbonphp.jsx

drop-in-gaming/carbonphp 适用场景与选型建议

drop-in-gaming/carbonphp 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 319 次下载、GitHub Stars 达 0, 最近一次更新时间为 2023 年 10 月 23 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「routing」 「sockets」 「io」 「session」 「pipes」 「carbon」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 drop-in-gaming/carbonphp 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 drop-in-gaming/carbonphp 我们能提供哪些服务?
定制开发 / 二次开发

基于 drop-in-gaming/carbonphp 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 319
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 21
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-10-23