Releases: tigusigalpa/cryptopanic-php
Releases · tigusigalpa/cryptopanic-php
Release list
v1.1.0
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_delayandCRYPTOPANIC_RETRY_MAX_DELAYto cap retry wait times (30 seconds by default). - Added support for both
Retry-Afterformats: 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-phpNo breaking API changes are introduced in this release.
v1.0.0
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 client —
CryptoPanicClientwith a clean, framework-neutral design - Immutable configuration —
CryptoPanicConfigwithfromArray()andfromEnv()factory methods - Typed query builder —
PostsQueryimmutable value object with fluentwith()builder andvalidate() - Endpoints:
posts(PostsQuery $query): PostsPage— GET/posts/portfolio(): PortfolioResponse— GET/portfolio/(opaque raw JSON)postsRss(PostsQuery $query): RSSResponse— GET/posts/?format=rssnewsRss(): RSSResponse— GET/news/rss/
- Typed response models —
Post,PostSource,PostInstrument,PostVotes,PostContent,PostAuthor,PostsPage,PortfolioResponse,RSSResponse - Enums —
Plan,Filter,Kind,PanicPeriod,PanicSort - Rich exception hierarchy —
CryptoPanicException,ApiException,ConfigurationException,ValidationException,UnauthorizedException,ForbiddenException,RateLimitException,ServerException,TransportException,DecodingException - Retry with backoff — Bounded GET retry with
Retry-Afterheader 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 bridge —
CryptoPanicServiceProvider,CryptoPanicfacade, publishableconfig/cryptopanic.php - Environment configuration —
CRYPTOPANIC_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 --strictpassing- GitHub Actions CI