kawtharstudios/sf15to18 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

kawtharstudios/sf15to18

最新稳定版本:1.0.2

Composer 安装命令:

composer require kawtharstudios/sf15to18

包简介

A PHP package to convert a 15 digit Salesforce ID to 18 digits

README 文档

README

Packagist Packagist Downloads Made With

Convert 15-character Salesforce IDs to their 18-character case-insensitive form.

Salesforce “classic” IDs are 15 chars and case-sensitive. The 18-char form adds a 3-character suffix so the ID becomes case-insensitive, which is safer for spreadsheets, exports, and integrations.

Requirements

  • PHP: 8.0+
  • Illuminate Support: illuminate/support ^9 or ^10

Installation

composer require kawtharstudios/sf15to18

Usage

<?php

use KawtharStudios\SF15to18;

$id18 = SF15to18::convert('001550V000WOQZi');
// 001550V000WOQZiACP

Behavior

  • 18-character input: returned unchanged
  • 15-character input: converted to 18 characters
  • Invalid input: throws Exception
<?php

use KawtharStudios\SF15to18;

SF15to18::convert('001550V000WOQZiACP'); // unchanged
SF15to18::convert('not-a-salesforce-id'); // throws

Laravel

This package ships with a Laravel service provider and supports package auto-discovery.

If you’ve disabled discovery, add the provider manually:

KawtharStudios\KawtharStudiosServiceProvider::class,

Testing

./vendor/bin/phpunit

Contributing

  • Bugs: include a minimal reproduction + expected vs actual result
  • PRs: keep changes focused, add/update tests, and update docs when behavior changes

License

MIT — see LICENSE.md.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-03-08