Skip to content

Latest commit

 

History

History
171 lines (118 loc) · 5.57 KB

CHANGELOG.md

File metadata and controls

171 lines (118 loc) · 5.57 KB

Release Notes

Changed

  • Replaced PHP CS Fixer with Laravel Pint

Added

  • Added support for Laravel 11

Deprecated

  • Dropped support for Laravel 5.x - 8
  • Dropped support for PHP 7.4 - 8.0

Added

  • Added support for Laravel 10

Added

  • Added support for Laravel 9
  • Added PHP 8.1 tests for Laravel 8 + 9

Added

  • Added primary key to entities relation table
  • Added extra query scopes for Vouchers:
    Voucher::withoutPrefix()
    Voucher::withoutSuffix()
    Voucher::withoutStarted()
    Voucher::withoutExpired()
    Voucher::withoutRedeemed()
    Voucher::withoutRedeemable()
  • Added missing type hints where possible

Changed

  • Replaced Travis with Github Actions

Deprecated

  • Dropped support for PHP 7.1 - 7.3

Added

  • Added callback to Vouchers::redeemable() for conditional checks

This release adds an owner field to vouchers, changing a lot of the handling around related entities.
Please read the upgrade guide for implications of this change.

Added

  • Added strict types declaration to all files
  • Added owner field to vouchers
  • Added query scopes for Voucher owner:
    Voucher::withEntities()
    Voucher::withOwnerType()
    Voucher::withOwner()
    Voucher::withoutOwner()
  • Added migration command vouchers:migrate for converting owning related entities to proper owners

Changed

  • Changed voucher scopes to use table prefix in where clauses

Update

  • Updated morph map handling to use Model::getMorphClass()
  • Updated PHP CS Fixer configuration

Deprecated

  • Removed deprecated methods HasRedeemers::getRedeemers() and HasVouchers::getVouchers()

Added

  • Added support for PHP 8

Added

  • Added support for Laravel 8
  • Added PHP CS Fixer configuration

Fixed

  • Fixed PHPUnit 9.1+ deprecation warning
  • Fixed morph maps not working with Voucher::getEntities()

Optimization

  • Prefixed non-namespaced function calls with backslash

Deprecated

  • Trigger explicit errors on deprecated methods

Added

  • Added support for Laravel 7
  • Added support for PHPUnit 9
  • Added matrix testing in Travis for relevant Laravel and PHP combinations

Added

  • Added PHP 7.4 to Travis
  • Added Voucher model helpers: Voucher::hasPrefix() and Voucher::hasSuffix()
  • Added query scopes for all Voucher helpers:
    Voucher::withPrefix()
    Voucher::withSuffix()
    Voucher::withStarted()
    Voucher::withExpired()
    Voucher::withRedeemed()
    Voucher::withRedeemable()

Fixed

  • Fixed PHP 7.1 regression

Added

  • Added code coverage using PHP Debugger (phpdbg) - see testing for usage
  • Added HasVouchers::createVoucher() and HasVouchers::createVouchers() convenience methods

Added

  • Added Voucher::$redeemer which will hold the active redeemer during events
    Enables vouchers to only be redeemed by related redeemer (#1, #2)

Added

  • Added proper vouchers relationship with HasVouchers::vouchers()

Deprecated

  • Deprecated HasRedeemers::getRedeemers() - use relationship instead
  • Deprecated HasVouchers::getVouchers() - use relationship instead

Added

  • Added support for Laravel 6 (#3)

Changed

  • Replaced array and string helpers with facade calls

Fixed

  • Fixed bug with incorrect return type

Added

  • Added support for Laravel 5.8

Added

  • Added support for Laravel 5.7

Initial development release.