Download the PHP package luoxiaojun1992/laravel-tars without Composer

On this page you can find all versions of the php package luoxiaojun1992/laravel-tars. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-tars

Laravel Tars Driver

中文版

描述

Tars driver for laravel.

Laravel集成微服务治理框架Tars

功能

限制

环境依赖

  1. Laravel/Lumen5.x
  2. Tars-PHP

安装

  1. 创建项目

    创建Tars项目目录结构(scripts、src、tars),Laravel/Lumen项目放在src目录下

  2. 安装Laravel Tars包

    更新Composer依赖

    或添加 requirement 到 composer.json

    添加ServiceProvider,编辑src/bootstrap/app.php

    初始化Laravel Tars

  3. 修改配置文件src/config/tars.php文件proto字段,替换appName、serverName、objName

  4. 如果使用http协议,且需要自动注册到网关(目前仅支持Kong),修改配置文件src/config/tars.php

  5. 配置中心(TarsConfig)、日志服务(TarsLog)

    服务启动时会自动拉取配置,如果需要记录日志,可以使用类似

    如果需要指定TarsLog记录的最低日志级别,修改配置文件src/config/tars.php

  6. 如果使用http协议,按框架原生方式编写代码

  7. 如果使用tars协议

    在tars目录下编写tars接口描述文件,修改配置文件src/config/tars文件proto字段,新增tarsFiles

    在scripts目录执行编译脚本生成接口代码

    在src/app/Tars/impl目录下创建接口实现类,编写业务逻辑代码

    修改src/config/tars.php文件services字段,替换接口和接口实现命名空间

  8. 搭建Tars-PHP开发环境

    如果使用http协议,请参考TARS-PHP-HTTP服务端与客户端开发

    如果使用tars协议,请参考TARS-PHP-TCP服务端与客户端开发

  9. 在Tars-PHP开发环境下打包项目(在src目录下执行)

  10. 在Tars管理后台发布项目,请参考TARS-PHP-TCP服务端与客户端开发),测试

使用示例

Laravel请参考 https://github.com/luoxiaojun1992/laravel-tars-demo

Lumen请参考 https://github.com/luoxiaojun1992/lumen-tars-demo

集成部署

Jenkins Pipeline 配置示例(根据实际情况修改)

Laravel:

Lumen:

Jenkins部署过程

PHP框架集成Tars

TARS如何集成到PHP框架


All versions of laravel-tars with dependencies

PHP Build Version
Package Version
Requires illuminate/console Version ~5
illuminate/support Version ~5
illuminate/contracts Version ~5
vlucas/phpdotenv Version ~2|~3
phptars/tars-server Version ~0.6
phptars/tars-deploy Version ~0.1
phptars/tars2php Version ~0.1
phptars/tars-log Version ~0.1
laravelista/lumen-vendor-publish Version 2.1.0
guzzlehttp/guzzle Version ^6
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package luoxiaojun1992/laravel-tars contains the following files

Loading the files please wait ....