Repository navigation
Releases
v1.2.1
Silences PHP 8.4's deprecation notices. Nine parameters were declared implicitly nullable
(Type $x = null), which PHP 8.4 deprecates. Loading the affected classes emitted a notice for each,
and an application running with E_ALL printed them on every request or CLI run that touched the
client.
Fixed
No deprecation notices on PHP 8.4+ (#11).
These parameters are now declared ?Type $x = null:
AdvertBuilder::addLocation():$districtId,$latitude,$longitudeAdvertBuilder::addPrice():$currencyApiResource::request():$endpointThreads::reply():$attachmentsOlxException::__construct():$previousClient::generateToken():$accessCode,$redirectUrl
Upgrading
No code changes required. ?Type $x = null means exactly what Type $x = null did, on every
supported PHP (>=7.4), so signatures and subclasses are unaffected.
Full changelog: 1.2.0...1.2.1
v1.2.0
Restores installability. Since the psr7 1.x branch went EOL and picked up advisories covering
every one of its releases, composer require matasarei/olx-api-client-v2 failed outright on
current Composer — there was no resolvable version of this package at all.
Fixed
The package can be installed again (#9, #10). guzzlehttp/psr7: ^1.9 could only resolve to
1.9.0 or 1.9.1, and every recent psr7 advisory declares an affected range starting at zero
(<2.10.2, <2.12.1, <2.12.3), so Composer refused to load either. The 1.x branch is EOL
and receives no backports.
PHP 7.4 and 8.0 are genuinely supported again. ClientTest::setUp needed
setAccessible(true), which is required below PHP 8.1. This went unnoticed because the old
workflow ran Composer on the matrix PHP version but executed the suite on the runner host, so
those two versions had never actually been tested despite php: >=7.4.
Added
Guzzle 8 support. guzzlehttp/guzzle: ^7.4 || ^8.0 — both major versions work and both are
covered by CI. The old pin additionally held Guzzle back to an ancient 7.4.x patch, because
current 7.x requires psr7 ^2.12.4 or later.
Changed
guzzlehttp/psr7is now^2.13 || ^3.0.- CI proves dependency compatibility rather than assuming it: a
depsmatrix covering the
constraint floor (--prefer-lowest), the Guzzle 7 path and the default resolution; a
composer auditjob;composer updateinstead ofinstallso Composer's advisory policy
actually applies; and PHP 8.3, 8.4 and 8.5 added to the matrix. - README documents
composer auditand uses thecomposer:2image. The previouscomposer:lts
is Composer 2.2, which predates advisory checking and installs vulnerable dependencies
silently — the reason this problem was invisible to maintainers while users could not install
the package.
Upgrading
No code changes required; the public API is unchanged. The only direct psr7 usage in this
package is GuzzleHttp\Psr7\Response, whose API is the same across these versions.
If you pin guzzlehttp/psr7 to ^1.x yourself, you will need to move to ^2.13 || ^3.0. That
is not a practical constraint: modern Composer already refuses to install psr7 1.9.x for the
same advisory reasons, so no working setup can currently be on it.
Full changelog: 1.1.2...1.2.0
v1.1.2
In this release we updated the OLX API client to match the official API specification where responses are wrapped in a data key. The changes include updating test expectations for the Adverts resource, simplifying response body handling in the Client class, and adding usage documentation to the README. Also simplified the Client by replacing Utils::streamFor() with direct string casting for response body handling.
v1.1.1
v1.1.0
Fixed TypeError when OLX API returns HTTP 204 No Content:
- Modified handleResponse() in Client.php to use null coalescing operator, returning an empty array when JSON decode returns null
- Updated test expectations for DELETE and command operations to expect empty arrays