承接 niladam/salette 相关项目开发

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

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

niladam/salette

Composer 安装命令:

composer require niladam/salette

包简介

🚀Easily build API integrations into your legacy application.

README 文档

README

A legacy focus backport of Saloon

Salette

The power of Saloon - for PHP 7.4

Downloads Tests PHP 7.4 License

Salette is a port of the Saloon PHP package, tailored specifically for legacy applications that require PHP 7.4 compatibility.

This package exists with permission from the original author Sam Carré and aims to mirror and ensure the functionality and developer experience of Saloon as closely as possible within the limitations of PHP 7.4.

Tip

If your application uses PHP 8.0 or higher, you should use the official Saloon package instead.

What is Salette?

Salette helps you build clean, reusable API integrations and SDKs in PHP 7.4, in the same way you would do using Saloon.

It organizes your requests into structured classes, centralizing your API logic and making your codebase more maintainable.

Key Features

  • 🚀 PHP 7.4 Compatible - Built specifically for legacy applications
  • 🔧 Simple & Modern - Easy-to-learn, clean API for building integrations
  • 🏗️ Built on Guzzle - Leverages the most popular and feature-rich HTTP client
  • 🧪 Built-in Testing - Mock responses, request recording, and test your integrations easily
  • 🔐 Authentication - Support for OAuth2, Basic Auth, Token Auth, and more
  • 📦 Request/Response Handling - Built-in support for JSON, XML, Form data, and more
  • 🔄 Advanced Features - Request concurrency, caching (soon), Dto support
  • 🎯 Team-Friendly - Provides a standard everyone can follow
  • 🏢 Framework Agnostic - Vanilla PHP or any PHP framework that supports composer :)
  • 📚 Laravel Support - Full Laravel integration and support (soon)
  • Lightweight - Few dependencies, fast performance

Quick Start

1. Install the package

composer require niladam/salette

2. Generate a Working Example

The fastest way to get started is to generate a ready-to-use integration:

php vendor/niladam/salette/examples/create-integration.php

Or, in code:

use Salette\Helpers\Stub;

Stub::create(); // Instantly creates a JsonPlaceholder integration you can use and modify

This will create:

  • app/Http/Integrations/JsonPlaceholder/JsonPlaceholderConnector.php
  • app/Http/Integrations/JsonPlaceholder/Requests/GetPostsRequest.php
  • app/Http/Integrations/JsonPlaceholder/Requests/CreatePostRequest.php

You can use these classes right away, and just change the URL, endpoints, or request bodies to match your API.

3. Using Your Integration

use App\Http\Integrations\JsonPlaceholder\JsonPlaceholderConnector;
use App\Http\Integrations\JsonPlaceholder\Requests\GetPostsRequest;
use App\Http\Integrations\JsonPlaceholder\Requests\CreatePostRequest;

$connector = new JsonPlaceholderConnector();

// GET /posts
$response = $connector->send(new GetPostsRequest());
$data = $response->json();

// POST /posts
$response = $connector->send(new CreatePostRequest());
$data = $response->json();

For advanced usage, options, and customization, see:

Credits

niladam/salette 适用场景与选型建议

niladam/salette 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 72 次下载、GitHub Stars 达 11, 最近一次更新时间为 2025 年 07 月 21 日, 在 PHP 生态内属于活跃度较高的组件。

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

围绕 niladam/salette 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-07-21