Skip to content

v3.0.0

Latest
Compare
Choose a tag to compare
@jonjomckay jonjomckay released this 25 Nov 12:10
· 6 commits to master since this release
b382365

Breaking Changes

  • Made the minimum supported version PHP 7.3
  • Introduced a value object for scan result (#38)

The previous array-based structure returned by scan results has been changed to a strictly-typed object. See the README.md for more details, or check out this snippet:

// Result is an instance of \Xenolope\Quahog\Result.
$result = $quahog->scanFile('/tmp/virusfile');
// A result id of a session that was used.
$result->getId();
// The file name of the scanned file.
$result->getFilename();
// The reason why a scan resulted in a failure. Returns null if the scan was successful.
$result->getReason();
// A boolean value that is true, in case the scan was successful.
$result->isOk();
// A boolean value that is true, in case the scan failed. This is the opposite of isOk().
$result->hasFailed();
// A boolean value that is true, if a virus was found.
$result->isFound();
// A boolean value that is true, if an error happened.
$result->isError();

Improvements

  • Added missing documentation for using startSession and endSession (#29)
  • Added missing documentation for using a TCP socket (#36)
  • Fixed PHPDoc return types (#31)
  • Fixed incompatibility with Composer 2.0
  • Added PHP 7.3 to the tested versions matrix (#37)
  • Added PHP 7.4 to the tested versions matrix (#41)
  • Added PHP 8.0 to the tested versions matrix (#43)
  • Replaced Travis CI with GitHub Actions (#42)

Thanks

Big thanks to all who contributed towards this long-awaited release!