Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

开发手册 #1

Open
rookiejin opened this issue Aug 21, 2017 · 0 comments
Open

开发手册 #1

rookiejin opened this issue Aug 21, 2017 · 0 comments

Comments

@rookiejin
Copy link
Owner

rookiejin commented Aug 21, 2017

项目环境

  • ^php7 + swoole + inotify 扩展 , 由于swoole没有windows版本,最好选用mac || ubuntu 来开发,本人是一台本地主机装了ubuntu , 搭好了环境,本地跑的Windows,phpstorm 开启sftp同步功能,直接开发。
  • 热重启 开发插件
  • 开发结构如下:
.
├── swoole   # 框架源码文件夹 
│   ├── composer.json
│   ├── README.md
│   └── src
├── swoole_tools  # 热重启文件夹
│   ├── composer.json
│   ├── README.md
│   └── src
├ test                           # 本地实际项目 
├── app                      # 应用文件夹
│   ├── Controller       # 控制器文件夹
│   │   └── Home.php #控制器
│   ├── helper.php      # 自定义函数
│   └── Model             # 模型
├── composer.json  
├── composer.lock
├── config                  # 配置文件夹
│   ├── app.php         # app 配置  Application::getInstance('config')->app ['xxx'] 获取
│   ├── router.php     # 路由配置
│   └── server.php     # 服务器配置
├── index.php           # 服务器端入口脚本
├── reload.php         # 热重启脚本
└── vendor               # composer商店目录  vendor 文件夹的内容会自动生成 执行 composer install 就行了。
    ├── autoload.php
    ├── bin
    ├── composer
    │   ├── autoload_classmap.php
    │   ├── autoload_files.php
    │   ├── autoload_namespaces.php
    │   ├── autoload_psr4.php
    │   ├── autoload_real.php
    │   ├── autoload_static.php
    │   ├── ClassLoader.php
    │   ├── installed.json
    │   └── LICENSE
    ├── eaglewu
    │   └── swoole-ide-helper
    ├── psr
    │   └── container
    ├── rookiejin         #  软连接指向项目目录  不要手动生成,composer install 自动生成。
    │   ├── swoole -> ../../../swoole
    │   └── swoole_tools -> ../../../swoole_tools
    └── symfony        
        ├── polyfill-mbstring
        └── var-dumper
//  swoole  && swoole_tools && test 属于平级文件夹 
// test 里面的composer.json结构: 

 {
  "name": "rookiejin/test",
  "require": {
    "rookiejin/swoole": "*",
    "rookiejin/swoole_tools":"*",
    "psr/container": "^1.0"
  },
  "autoload":{
    "psr-4":{
      "App\\":"app/"
    },
    "files":[
      "app/helper.php"
    ]
  },
  "repositories": [
    {
      "type": "path",
      "url": "../swoole"
    },{
      "type":"path",
      "url":"../swoole_tools"
    }
  ],
  "require-dev": {
    "eaglewu/swoole-ide-helper": "dev-master",
    "symfony/var-dumper": "^3.3"
  }
}

// swoole_ tools 直接克隆下来就行了 
// swoole 框架文件夹也直接克隆  然后在项目里面修改 vendor/rookiejin/swoole 文件夹的代码。 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant