Release Note v0.6

Bazar v0.6 is released. Let's walk through the most important things about this release.

This release conaints quite a big group of changes, bugfixes and improvements. We'll pick the most important ones here. For the complete list of changes, please read the changelog.

Minimum PHP version

The minimum PHP version is increased from 7.3 to 7.4. This was necessary due to the self return type. Using the self as a typehinted return value, gives a more flexible approach when writing interfaces of abstract methods for example.

New Traits

There are two new traits: the HasUuid and the InteractsWithProxy trait. The HasUuid trait can be used for automatic UUID creation when the model is stored in the database. While, the InteractsWithProxy provides methods for the new proxy approach.

Reworked proxies

Before v0.6, proxies were facades, which was working very well, however, it was a bit confusing and not really elegant. Proxies are moved to the model class itself, and not a separate class.

// Before
use Bazar\Proxies\Product;

Product::query()->paginate();

// After
use Bazar\Models\Product;
Product::proxy()->newQuery()->paginate();

By this change, the custom models must extend the default Bazar models.