- Replaced PHP CS Fixer with Laravel Pint
- Added support for Laravel 11
- Dropped support for Laravel 5.x - 8
- Dropped support for PHP 7.4 - 8.0
- Added support for Laravel 10
- Added support for Laravel 9
- Added PHP 8.1 tests for Laravel 8 + 9
- 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
- Replaced Travis with Github Actions
- Dropped support for PHP 7.1 - 7.3
- 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 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 voucher scopes to use table prefix in where clauses
- Updated morph map handling to use
Model::getMorphClass()
- Updated PHP CS Fixer configuration
- Removed deprecated methods
HasRedeemers::getRedeemers()
andHasVouchers::getVouchers()
- Added support for PHP 8
- Added support for Laravel 8
- Added PHP CS Fixer configuration
- Fixed PHPUnit 9.1+ deprecation warning
- Fixed morph maps not working with
Voucher::getEntities()
- Prefixed non-namespaced function calls with backslash
- Trigger explicit errors on deprecated methods
- Added support for Laravel 7
- Added support for PHPUnit 9
- Added matrix testing in Travis for relevant Laravel and PHP combinations
- Added PHP 7.4 to Travis
- Added Voucher model helpers:
Voucher::hasPrefix()
andVoucher::hasSuffix()
- Added query scopes for all Voucher helpers:
Voucher::withPrefix()
Voucher::withSuffix()
Voucher::withStarted()
Voucher::withExpired()
Voucher::withRedeemed()
Voucher::withRedeemable()
- Fixed PHP 7.1 regression
- Added code coverage using PHP Debugger (
phpdbg
) - see testing for usage - Added
HasVouchers::createVoucher()
andHasVouchers::createVouchers()
convenience methods
- Added
Voucher::$redeemer
which will hold the active redeemer during events
Enables vouchers to only be redeemed by related redeemer (#1, #2)
- Added proper vouchers relationship with
HasVouchers::vouchers()
- Deprecated
HasRedeemers::getRedeemers()
- use relationship instead - Deprecated
HasVouchers::getVouchers()
- use relationship instead
- Added support for Laravel 6 (#3)
- Replaced array and string helpers with facade calls
- Fixed bug with incorrect return type
- Added support for Laravel 5.8
- Added support for Laravel 5.7
Initial development release.