Skip to content

Releases: alwaysblank/brief

3.0.1

06 Feb 22:55
b4dbfd4
Compare
Choose a tag to compare

Minor bugfixes and increased test coverage.

3.0.0

30 Jan 23:41
5b1898b
Compare
Choose a tag to compare
  • Add ArrayAccess
  • Improve some internals
  • Bump allowed PHP version

Version 2

25 Jul 03:02
81828bd
Compare
Choose a tag to compare

A refactoring of the internals to make things a bit cleaner, and some external improvements as well.

Big change is this release:

Properties that don't exist now return null, not false!

This has been changed to better reflect that

  1. They don't exist (which is...what null means)
  2. Sometimes the value you want is false

Given PHP's weak typing you may not need to update previous code that uses the earlier version, but it never hurts to be careful.

Fix dynamic key bug

21 May 16:34
6bef94f
Compare
Choose a tag to compare
Fix dynamic key bug Pre-release
Pre-release

This fixes a fairly serious bug where the following would happens:

$b = Brief::make([]);
$b->some_key = "some value";
echo $b->some_key; // "some value"
echo $b->literally_any_key_not_already_set; // "some value" <-- uh oh

This was the result of bad handling of collapsing alias chains on new dynamic keys. It had no effect on Briefs that were instantiated w/ a full array and didn't dynamically set keys, but for ones that did the result was clearly not desirable.

Additionally this release includes some formatting updates to the code that have no effect on functionality or behavior.

Alpha Release for 2.0

21 Apr 16:29
Compare
Choose a tag to compare
Alpha Release for 2.0 Pre-release
Pre-release

This should be usable, but I'm not doing a formal release before I've had an opportunity to test it a bit in semi-real-world situations.

Add `find` method

30 Sep 17:15
caa0b45
Compare
Choose a tag to compare

The find method opens up some interesting possibilities when dealing with keyed arrays. It is called like so:

$Brief = new Brief(['key2' => 'value']);
echo $Brief->find('key1', 'key2');
// value

It receives an array of keys, and will return the value for the first key it can match, going from left to right. With a little work, this can allow you to do things like alias keys (i.e. item => itemprop) or set defaults by extending the Brief class, or creating "base" Brief instances and then copying and modifying them.

Initial Release

29 Jul 23:27
081f353
Compare
Choose a tag to compare
1.0.0

feat(construction): allow passing of null/bool values