Skip to content

Implement version statement

Compare
Choose a tag to compare
@reindert-vetter reindert-vetter released this 22 Aug 22:50

A Version statement file looks like this:

<?php
declare(strict_types=1);

namespace App\VersionControl\Orders;

use ReindertVetter\ApiVersionControl\Concerns\VersionStatement;

class ValidateZipCode
{
    use VersionStatement;
}

If the file contains the trait ReindertVetter\ApiVersionControl\Concerns\VersionStatement, then you can do the following in your source code:

if (ValidateZipCode::permitted()) {
    (...)
}