Skip to content

Releases: tigusigalpa/cryptopanic-php

Release list

v1.1.0

Choose a tag to compare

@tigusigalpa tigusigalpa released this 11 Sep 07:39

cryptopanic-php v1.1.0

This release strengthens retry handling, improves protection of API credentials, and adds a more complete CI and quality pipeline.

Highlights

  • Added retry_max_delay and CRYPTOPANIC_RETRY_MAX_DELAY to cap retry wait times (30 seconds by default).
  • Added support for both Retry-After formats: delay seconds and HTTP dates.
  • Added early validation for API URLs, plans, timeouts, and retry settings.
  • API error messages now redact the configured authentication token, including URL-encoded variants.
  • cURL requests no longer follow redirects automatically, preventing an API token in the query string from being forwarded to another host.
  • cURL now respects sub-second timeouts and retries only failures likely to be transient.
  • Retry backoff is capped safely, including when a large retry count is configured.

Quality and CI

  • Added a GitHub Actions matrix for PHP 8.1 core SDK checks, Laravel 12, and Laravel 13.
  • Added PCOV coverage reporting and Codecov upload.
  • Added CodeQL scanning for GitHub Actions workflows.
  • Added Dependabot updates for Composer dependencies and GitHub Actions.
  • Improved test realism by replacing duplicated client logic with a queue-backed PSR-18 test client.

Compatibility

  • Requires PHP 8.1 or later.
  • Laravel integration is tested with Laravel 12 and Laravel 13.

Upgrade

composer update tigusigalpa/cryptopanic-php

No breaking API changes are introduced in this release.

v1.0.0

Choose a tag to compare

@tigusigalpa tigusigalpa released this 29 Jul 09:24

v1.0.0 — Initial Release

tigusigalpa/cryptopanic-php — A framework-agnostic PHP SDK for the CryptoPanic API with a first-class Laravel bridge.

Features

  • Core clientCryptoPanicClient with a clean, framework-neutral design
  • Immutable configurationCryptoPanicConfig with fromArray() and fromEnv() factory methods
  • Typed query builderPostsQuery immutable value object with fluent with() builder and validate()
  • Endpoints:
    • posts(PostsQuery $query): PostsPage — GET /posts/
    • portfolio(): PortfolioResponse — GET /portfolio/ (opaque raw JSON)
    • postsRss(PostsQuery $query): RSSResponse — GET /posts/?format=rss
    • newsRss(): RSSResponse — GET /news/rss/
  • Typed response modelsPost, PostSource, PostInstrument, PostVotes, PostContent, PostAuthor, PostsPage, PortfolioResponse, RSSResponse
  • EnumsPlan, Filter, Kind, PanicPeriod, PanicSort
  • Rich exception hierarchyCryptoPanicException, ApiException, ConfigurationException, ValidationException, UnauthorizedException, ForbiddenException, RateLimitException, ServerException, TransportException, DecodingException
  • Retry with backoff — Bounded GET retry with Retry-After header support and exponential backoff for transport-level failures
  • Token redaction — Auth tokens redacted in pagination URLs and error messages
  • Dual transport — cURL (default) or any PSR-18 compatible HTTP client
  • Laravel bridgeCryptoPanicServiceProvider, CryptoPanic facade, publishable config/cryptopanic.php
  • Environment configurationCRYPTOPANIC_AUTH_TOKEN, CRYPTOPANIC_API_PLAN, CRYPTOPANIC_BASE_URL, CRYPTOPANIC_TIMEOUT, CRYPTOPANIC_RETRY_ATTEMPTS, CRYPTOPANIC_RETRY_DELAY

Requirements

  • PHP 8.1+
  • ext-json, ext-curl
  • PSR-18 / PSR-17 / PSR-7 (for alternative transport)

Quality

  • 57 tests passing (unit + feature)
  • PHPStan level 5 clean
  • composer validate --strict passing
  • GitHub Actions CI