Skip to content

Releases: dshafik/bag

Support named and positional arguments when instantiating a Bag

30 Sep 04:45
0054e5b
Compare
Choose a tag to compare

New Features

With this release Bag now supports the ability to create new instances by passing in named or positional arguments. (docs)

To get auto-complete in your editor, you will need to add @method phpdocs to your bag class. This can be automated using artisan make:bag <Bag> --docs --update. (docs)

Full Changelog: 1.2.2...1.3.0

Fix null support for Magic Casts

26 Sep 07:00
Compare
Choose a tag to compare

Fixes

  • Fix an issue where MagicCast would error when casting to Bag objects, and would be less strict when casting to other types (i.e. it would act like strict_types was off, null -> int = 0)

Full Changelog: 1.2.1...1.2.2

Add support for Unique and Exists Validation Rules

14 Sep 04:13
Compare
Choose a tag to compare

New Features

This release adds support for Laravel's Unique and Exists database-based validations.

Migrated to Pest tests, Initial PHP 8.4 support

12 Sep 12:15
Compare
Choose a tag to compare

New Features

Pest Tests Migration

This release migrates the test suite to use the Pest test framework, with support for both Pest 2 and Pest 3 (specifically for coverage annotations).

Initial Support for PHP 8.4

With the impending release of PHP 8.4, Bag can now be installed on PHP 8.4, however you must use composer update --ignore-platform-reqs as many dependencies don't yet officially support it. This is primarily to aid in testing on PHP 8.4.

Changes

  • Default fromJsonString transformer — in order to support both Laravel 10 and 11 properly it was necessary to add a default fromJsonString transformer, you can read more here

Fixes

  • Eloquent Model support now works correctly on Laravel 10
  • You can now pass in Bag objects directly when creating a collection instead of just an array of bag values
  • Faker can now be used in Factories outside of Laravel

Full Changelog: 1.1.0...1.2.0

Add artisan make:bag command

23 Aug 00:17
Compare
Choose a tag to compare

New Features

Artisan make:bag command

This release adds support for a new artisan make:bag command to make creating Bag Value objects, Collections, and especially Factories quicker.

Learn more in the documentation.

Full Changelog: 1.0.0...1.1.0

Bag 1.0

19 May 02:05
Compare
Choose a tag to compare

This is the initial release of Bag.

New Contributors

Full Changelog: https://github.com/dshafik/bag/commits/1.0.0