All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Tests for PHP 8.3 and 8.4
- Upgraded GitHub build library versions:
actions/checkout
andactions/cache
- Tests for PHP 8.0, 8.1, and 8.2
- Tests for PHP 5.5 - 7.1
- Upgraded phpUnit to v8.5
- Prevent deprecation errors on PHP8 and newer (thanks @tikaszvince)
- Ensure that other time zones besides UTC are converted to UTC (thanks @rudolfbyker)
- Renamed method:
retrieveBatch
->retrieveNextBatch
- Exposed
RecordIterator::retrieveNextBatch
as a public method
- Parameter in
reset
method to optionally preserve the resumptionToken - GitHub Actions build status badge in
README.md
- Automatic SVG badge generation for code coverage
.travis.yml
build support (switched to Github Actions)
- Added PHPUnit Cache file to
.gitignore
- Upgraded to PHPUnit v5
- Ensured support for Guzzle v7
.travis.yml
now includes tests for more modern versions of PHP (not PHP v7.4 though)
- BUGFIX:
RecordIterator::getTotalRecordCount()
now returns count for single-page requests (thanks @asmecher!) - Minor code adjustments
- Implement PSR-12 (require
squizlabs/php_codesniffer: "^3.5"
incomposer.json
)
- Fix compatibility with PHP 7.4 by removing curly bracket usage (thanks @danez)
- Support for Symfony v5 in
composer.json
- Addressed CVE-2019-10910 by requiring Symfony DI v3.4.26 or newer
- Removed build test for PHP v5.5
- Upgraded from PSR-0 to PSR-4
- Require PHP5.5 or newer (hint: upgrade to PHP7, since PHP5 support is
beingdeprecated) - Change all
DateTime
references and type-hints toDateTimeInterface
- Renamed
httpClient
variables and proprties tohttpAdapter
for consistency in naming - Improved README and documentation
- Added
composer test
command - Automatic code coverage reports into
build
directory when - Object graph methods:
ClientInterface::getHttpAdapter()
andRecordIterator::getClient()
- Added PHP CodeSniffer to auto-correct PSR-2 issues
- Additional tests (
testGetRecordWithNamespaces
)
- Removed
Endpoint::setUrl()
andClient::setUrl()
methods. URL in client should be immutable. If you need to change the Endpoint URL, best practice is to create a new Client and Endpoint instance. - Removed
EndpointCurlTest
that performed HTTP calls against an actual OAI-PMH endpoint (slow and not useful) - Removed
RecordIterator::getTotalRecordsInCollection()
in favor ofRecordIterator::getTotalRecordCount()
- Removed automatic 'short name' class detection in
OaiPmhException
- Removed
bootstrap.php
from tests directory, in favor of simply using composer autoloader
- Added Travis CI tests for PHP 7.2
- Minor tweaks to
composer.json
dependencies
- Ensure support for Symfony 4.x libraries in
composer.json
- Fixed
RcordIterator
bug for PHP 7.2 (thanks @mengidd)
- Added
Endpoint::build($url)
constructor for convenience - Added Travis CI tests for PHP 7.0 and 7.1
- Documentation for
RecordIterator::getTotalRecordCount()
RecordIterator::getExpirationDate()
method to get record set expiration, if it is supplied by the serverRecordIteratorInterface
andClientInterface
, and updated method signatures
- Added Symfony v3 library compatibility in
composer.json
- Made Guzzle v6 the default development dependency (v5 still supported)
- Updated and fixed a whole bunch of stuff in the README file
- Changed constructor signatures to use new interfaces instead of concrete classes
- Deprecated
RecordIterator::getTotalRecordsInCollection()
in favor ofRecordIterator::getTotalRecordCount()
Endpoint::setUrl()
andClient::setUrl()
. These should be set in constructor and be immutable. If URL needs to change, simply create a new instance.
- Removed tests for PHP v5.4 in Travis CI. It should still work, but is no longer officially supported.
- Fixed issue where XML namespace settings get lost in the iterator (thanks @vbuch)
- Added new parameter to
Phpoaipmh\EndpointInterface
andPhpoaipmh\RecordIterator
to allow passing resumption token (thanks @sblommaert)
- Fixed example OAI URL in example implementation code
- Ability to pass custom request parameters at runtime for cURL adapter
- Documentation for customizing request parameters in README.md
- Support arbitrary query parameters in
Client
class when making requests (thanks (@scheb) - New
Phpoaipmh\EndpointInterface
to make decorating the Endpoint class easier - Scrutinizer support
- Fixed Deprecated warning bug for
until
inEndpoint
class (thanks @igor-kamil) - Fixed date/time format in new
Granularity
helper (thanks @scheb)
- Improved error handling; if well-formed OAI-PMH errors accompany HTTP error codes, a
OaiPmhException
is thrown instead ofHttpException
(thanks @scheb)
- Unset the
RecordIterator
resumption token if end of list is reached so that last page is not repeated indefinitely - Fixed syntax errors fixed in
Endpoint
class when using date/time constraints - Fixed installation instructions in
README.md
(use correct version in Composer)
Endpoint
constructor now accepts optionalgranularity
string parameter to specify date/time granularity for record retrievalEndpoint
will now attempt to automatically fetch date/time granularity from the OAI-PMH provider if not explicitly specified- Added
Granularity
helper class to define allowed date/time granularity levels - Added
.gitattributes
,.scrutinizer
, andCONTRIBUTING.md
files - Sending strings to
Endpoint
class for temporal (from
,until
) parameters will trigger a deprecation warning - Added additional unit tests
- Changed test code to use OpenScholarship repository (the previously-used NSDL endpoint is not working)
- PSR-2 code style improvements
- Removed
.idea
directory
- Bumped PHP requirement to v5.4 or newer
- Renamed
Phpoaipmh\Http
classes toHttpAdapter
for better clarity - Updated Guzzle HTTP adapter to use Guzzle version 5
- Renamed
ResponseList
class toRecordIterator
and made it implement theIterator
interface - Refactored Exception classes to make more sense
Endpoint
class now usesDateTime
objects instead of strings for temporal parameters- Lots of minor PHPDoc comment improvements
- Improved documentation
- Added
getTotalRecordsInCollection
method inRecordIterator
- Added
reset
method toRecordIterator
- Added folder with example scripts
- Removed
processList
method inEndpoint
class, sinceRecordIterator
itself is now an iterator
- Added this changelog
- Fixed bug when the client class is instantiated without passing an HTTP Client
- Fixed Guzzle include to only accept <v4.0 in the composer.json
- Cleaned up API comments
- Added base exception
- Fixed bug in GetRecord Endpoint call
- Added additional tests
- Added type-hinting for request() method in Client class
- Hello, World.