PHPackages                             six-shop/app - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. six-shop/app

ActiveProject[Framework](/categories/framework)

six-shop/app
============

the new thinkphp framework

04PHP

Since Sep 30Pushed 7mo agoCompare

[ Source](https://github.com/runphp/sixshop-app)[ Packagist](https://packagist.org/packages/six-shop/app)[ RSS](/packages/six-shop-app/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

SixShop应用
=========

[](#sixshop应用)

这是一个纯净版的ThinkPHP项目，基于ThinkPHP8.1开发，添加了DDEV开发环境的配置。

我们的目标是你的项目就是目前这一个项目，只需要安装扩展即可完成开发，不需要修改项目代码，你的业务逻辑应该在某个扩展中完成。

欢迎PHP开发者加入我们，一起开发SixShop扩展。

安装依赖
----

[](#安装依赖)

```
ddev composer install
```

运行应用
----

[](#运行应用)

```
ddev start
ddev launch # 或者访问 https://app.ddev.site/
```

SixShop扩展特性
-----------

[](#sixshop扩展特性)

SixShop扩展旨在为ThinkPHP开发者们开发出更易维护的项目

每个项目都是不同的扩展组合而成，对ThinkPHP应用的扩展只需要通过`composer require` 进行安装（包括数据的迁移脚本）

最终你只需要寻找现成合适的扩展进行安装，然后自己自行开发部分扩展

支持私有仓库进行扩展模块开发，保护用户定制开发的代码

支持应用市场扩展开发模式

项目依赖
----

[](#项目依赖)

```
"php": ">=8.3",
"topthink/framework": "^8.1",
"topthink/think-orm": "^4.0"

```

扩展列表
----

[](#扩展列表)

SixShop扩展开发指南
-------------

[](#sixshop扩展开发指南)

扩展模块开发流程：

1. 先创建git项目
2. 项目clone到本地`runtime/extension`目录下,也可以其他没有版本控制的目录下

    ```
    cd backend/runtime/extension
    git clone git@github.com:runphp/sixshop-hello.git
    ```
3. 在`composer.json`中添加path仓库(下面以hello为例)

    ```
    {
        "repositories": [
            {
                "type": "path",
                "url": "runtime/extension/sixshop-hello",
                "options": {
                    "symlink": true,
                    "versions": {
                        "six-shop/hello": "v0.2.9"
                    }
                }
            }
        ]
    }
    ```
4. 安装你的扩展模块

    ```
    ddev composer require  "six-shop/hello:^v0.2.0"
    ```

    上面的版本是假如最新版本的`six-shop/hello`是`v0.2.0`,那么我们的开发版本比它大的版本就好了，我们可以设置成`v0.2.9`

    成功处理的话可以看到

    ```
    Package operations: 1 install, 0 updates, 0 removals
      - Installing six-shop/hello (v0.2.9): Symlinking from runtime/extension/sixshop-hello
    ```

    现在你就可以在`runtime/extension`或`vendor`目录下修改代码了
5. 私有扩展模块认证说明

    在 `~/.composer/auth.json` 中添加认证信息

    ```
    {
       "custom-headers": {
         "packagist.jd29.com": {
             "X-API-KEY": "5f280c17d5958****************************************0893f506ca01acef704"
         }
      }
    }
    ```

    说明: ddev环境对应的auth.json文件为`~/.ddev/homeadditions/.composer/auth.json`

    当然你可以做软连接过去

    ```
    mkdir -p ~/.ddev/homeadditions/.composer && ln -s ~/.composer/auth.json ~/.ddev/homeadditions/.composer/auth.json
    ```

    然后需要`ddev start`重启下容器，可以通过`ddev composer config -l`查看是否生效 最后你可以参考`doc/auth.json`这份示例文件,进行修改，这些设置也可以直接在`composer.json`文件设置，最终使用方式请参考composer官方文档。
6. 扩展模块的composer.json 参考其他扩展，不同地方是添加了`"type": "sixshop-extension"`，然后就是

    ```
    {
      "extra": {
        "sixshop": {
          "id": "hello",
          "class": "SixShop\\Hello\\Extension"
        }
      }
    }
    ```

    id为扩展模块的标识符,需要唯一，class为扩展模块的类名，实现了`SixShop\Extension\ExtensionInterface`接口
7. 扩展模块的sql安装脚本使用cakephp的migration，在模块的`database/migrations`目录添加
8. 扩展路由在`route`目录下添加路由文件 默认会加载`admin.php`和`api.php`两个文件, 对应的是admin和api应用，你也可以实现`SixShop\Extension\ExtensionInterface`的`getRoutes`接口
9. 扩展模块的事件监听，可以说使用`SixShop\Core\Attribute\Hook`实现，具体请查看`SixShop\Core\Attribute\Hook`类，在模块的`src/Hooks`目录下添加，然后实现`SixShop\Extension\ExtensionInterface`的`getHooks`接口
10. 扩展模块的异步任务实现你可以继承`SixShop\Core\Job\BaseJob`即可，具体请查看`SixShop\Core\Job\BaseJob`类 使用示例

```
\app\api\job\IndexJob::dispatch(); // 异步任务
\app\api\job\IndexJob::dispatch()->delay(10); // 延迟10s执行
```

11. 扩展定时任务,使用`SixShop\Core\Attribute\Cron`注解, 并且需要实现`SixShop\Extension\ExtensionInterface`的`getCronJobs`接口 参考`\SixShop\System\Cron\SystemCron`类
12. 扩展命令行 注册命令行请实现`SixShop\Extension\ExtensionInterface`的`getCommands`接口 ，默认自动加载扩展目录下`command.php`文件 可以参考`backend/vendor/six-shop/system/command.php`
13. 扩展的配置，默认自动加载扩展目录下`config.php`文件，可以参考`backend/vendor/six-shop/hello/config.php`统一配置的实现目前需要安装`six-shop/system`，后续会单独的扩展包，目前配置的实现是使用 [form-create](https://form-create.com/v3/designer/) 生成配置表单即可，支持子表单组件

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance44

Moderate activity, may be stable

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity13

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/3b47e66f85ea289c0c6d69efd5848c7d667010267e281e60dbfd0c3a4ab9bc99?d=identicon)[runphp](/maintainers/runphp)

---

Top Contributors

[![runphp](https://avatars.githubusercontent.com/u/1510812?v=4)](https://github.com/runphp "runphp (7 commits)")

### Embed Badge

![Health badge](/badges/six-shop-app/health.svg)

```
[![Health](https://phpackages.com/badges/six-shop-app/health.svg)](https://phpackages.com/packages/six-shop-app)
```

###  Alternatives

[laravel/passport

Laravel Passport provides OAuth2 server support to Laravel.

3.4k85.0M532](/packages/laravel-passport)[nolimits4web/swiper

Most modern mobile touch slider and framework with hardware accelerated transitions

41.8k177.2k1](/packages/nolimits4web-swiper)[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k36.7M259](/packages/laravel-dusk)[laravel/prompts

Add beautiful and user-friendly forms to your command-line applications.

712181.8M596](/packages/laravel-prompts)[cakephp/chronos

A simple API extension for DateTime.

1.4k47.7M121](/packages/cakephp-chronos)[laravel/pail

Easily delve into your Laravel application's log files directly from the command line.

91545.3M590](/packages/laravel-pail)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
