8000 Releases · alwaysblank/brief · GitHub
[go: up one dir, main page]

Skip to content

Releases

3.0.1

Choose a tag to compare

@alwaysblank alwaysblank released this 06 Feb 22:55
b4dbfd4

Minor bugfixes and increased test coverage.

3.0.0

Choose a tag to compare

@alwaysblank alwaysblank released this 30 Jan 23:41
5b1898b
  • Add ArrayAccess
  • Improve some internals
  • Bump allowed PHP version

Version 2

Choose a tag to compare

@alwaysblank alwaysblank released this 25 Jul 03:02
81828bd

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

Fix dynamic key bug Pre-release
Pre-release

Choose a tag to compare

@alwaysblank alwaysblank released this 21 May 16:34
6bef94f

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

Alpha Release for 2.0 Pre-release
Pre-release

Choose a tag to compare

@alwaysblank alwaysblank released this 21 Apr 16:29

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

Choose a tag to compare

@alwaysblank alwaysblank released this 30 Sep 17:15
caa0b45

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

Choose a tag to compare

@alwaysblank alwaysblank released this 29 Jul 23:27
081f353
1.0.0

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