承接 prestige-solution/ts-x-php-framework 相关项目开发

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

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

prestige-solution/ts-x-php-framework

Composer 安装命令:

composer require prestige-solution/ts-x-php-framework

包简介

A modern, refactored PHP framework for Teamspeak 3 and Teamspeak 6 servers, offering full SSH support and extensive unit tests.

README 文档

README

PHP-CS-Fixer PHPUnit Coverage

Caution

IMPORTANT CHANGE
With Version 3.x we refactored to integrate phpseclib3. This changes affects how TCP connections are established. The "raw" mode was removed, and the support for only ssh mode was established to handel Teamspeak 3 and Teamspeak 6 Server API connections.

The X stands for a non-specific Teamspeak Server Version. So we would handle all current and future Versions from a Teamspeak Server.

Unfortunately, the original repository is no longer up to date and has not been maintained for 3 years. This is the reason why this project is being created.
The main goal is to bring the framework up to date and to equip it with extended unit tests which can also be carried out with tests for a live server.
The ideal is that this version can be integrated into your own project and the main functionalities can be tested with your Teamspeak server.

Installation

With the Refactoring at Version 3.x, the Framework has a lot of changes. But most functionalities and namespaces are the same.

PHP Required Extensions
apt install php8.3 php8.3-{common,mbstring,ssh2} -y

Via Composer
Current Version:
composer require prestige-solution/ts-x-php-framework

or with a specific release
composer require prestige-solution/ts-x-php-framework:latest
composer require prestige-solution/ts-x-php-framework:3.0.0-beta

or with a specific branch
composer require prestige-solution/ts-x-php-framework:dev-ts-x-refactoring-dev

If your teamspeak 3 server is not running with version 3.x, check the rsa host key situation

Check out the documentation make-ts3-ssh-compatible.md
There you can find instructions to set up a compatible rsa host key. It should work with docker and non-docker versions.

New test routines for future developments and improvements with live server testing

Prepare your Environment
Before you start UnitTests, make sure that you have set the environment variables. You find more information's at testing-live-server

Permissions for Query User
The best way to test all functionalities is to use the serveradmin query user.
The serveradmin is != Server Admin there you can find in your Teamspeak Client UI.

serveradmin (Query) Server Admin (GUI)
Max. permission value: 100 (=grant) Max. permission value: 75 (=grant)

You can find more information in the Documentation testing-live-server

Additional Node

  • We know the serveradmin (query user) is a high-security risk if you use it over the internet. We would try to find a better solution with SSH public key authentication.
  • Currently, you can improve fail2ban, query_ip_whitelist and query_ip_blacklist.

Run Tests
To run all tests use composer test.

Build Factory URI

Default URI Options

Options Default Value
timeout 10

If you build the serverquery without the above parameter, then their options will be set by default.
Note: don't set timeout to 0. Further Information's at php.net

Examples

  • URI Example
'serverquery://<user>:<pass>@<host>:<port>/?server_port=9987&no_query_clients=0&timeout=30&nickname=<bot_name>'
  • Contains Username or Password special chars like + then you can use
'serverquery://'.rawurlencode(<user>).':'.rawurlencode(<password>) .'@<host>:<port>/?server_port=9987&no_query_clients=0&timeout=30'

In my opinion, you should don't use specials chars. Better, create a new QueryLogin Password and / or Username.

  • You can use IPv4, IPv6 or DNS. Implement the following Example in your Project.
if (filter_var($host, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4) || filter_var(gethostbyname($host), FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) {
    $validatedHost = $host;
} elseif (filter_var($host, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6) || filter_var(gethostbyname($host), FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) {
    $validatedHost = '['.$host.']';
} else {
    return false;
}

Important note

We have no intention of abandoning the original repository altogether. We will keep the namespace so that an update to the original PlanetTeamspeak repository can be considered as far as possible and the Support from the Maintainer is back.

prestige-solution/ts-x-php-framework 适用场景与选型建议

prestige-solution/ts-x-php-framework 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 130 次下载、GitHub Stars 达 1, 最近一次更新时间为 2025 年 03 月 16 日, 在 PHP 生态内属于活跃度较高的组件。

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

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

围绕 prestige-solution/ts-x-php-framework 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPL-3.0
  • 更新时间: 2025-03-16