Skip to content

v1.0.0-alpha.2

Choose a tag to compare

@nabeghe nabeghe released this 11 Oct 14:44
· 9 commits to main since this release

πŸš€ What's New in v1.0.0-alpha.2

This release introduces flexible SSL verification configuration across HTTP transports (GuzzleHttpClient and CurlHttpClient), making it easier to work in environments with self-signed certificates, corporate proxies, or custom CA bundles.


✨ Features & Improvements

  • SSL Verification Option (verify_ssl / verifySsl):
    • Added verifySsl configuration to Config and ConfigBuilder.
    • Supports both bool and string types:
      • false (default): Disables SSL certificate validation (useful for local development, corporate proxies, or restricted networks).
      • true: Enables standard SSL verification against system CA certificates.
      • string: Path to a custom CA bundle file (e.g. /path/to/cacert.pem).
  • HTTP Transport Integration:
    • Guzzle: Configured via 'verify' => $config->verifySsl ?? false.
    • cURL: Sets CURLOPT_SSL_VERIFYPEER / CURLOPT_SSL_VERIFYHOST and applies CURLOPT_CAINFO when a CA bundle path is provided.
  • Application Orchestrator Support:
    • Added verify_ssl key support in App configuration array and .env.
  • Documentation & LLM Hub:
    • Updated API catalog cards in docs/guide/configuration.md.
    • Regenerated llms-full.txt and downloadable offline skill package (tueen-telegram-bot-api-sdk.zip).
  • Test Suite:
    • Added dedicated unit tests in GuzzleHttpClientTest and updated TelegramClientTest / Php85FeaturesTest.

πŸ’» Usage Example

use Tueen\Telegram\Telegram;

// 1. Disable SSL verification (default behavior)
$bot = Telegram::create('YOUR_BOT_TOKEN')
    ->withVerifySsl(false)
    ->client();

// 2. Enable standard SSL verification
$bot = Telegram::create('YOUR_BOT_TOKEN')
    ->withVerifySsl(true)
    ->client();

// 3. Use a custom CA bundle file
$bot = Telegram::create('YOUR_BOT_TOKEN')
    ->withVerifySsl('/etc/ssl/certs/custom-ca.pem')
    ->client();

Or via direct configuration / config.php:

return [
    'token' => 'YOUR_BOT_TOKEN',
    'verify_ssl' => false, // bool or path string
];

πŸ“¦ Full Changelog

Full Changelog: https://github.com/tueen/telegram/compare/v1.0.0-alpha.1...v1.0.0-alpha.2