Upgrade Guide

From version 7.x to 8.x

PHP version 8.2 required

You need PHP v8.2 or higher to run Athenaeum packages.

Note: PHP v8.3 is supported!

Laravel v11.x

Please read Laravel's upgrade guideopen in new window, before continuing here.

Anti-Virus Default Scanner

In version Athenaeum v7.x, a NullScanner was returned as the default scanner, when no profile was specified. The default scanner has now been changed to ClamAv, when no profile is specified.

use Aedart\Antivirus\Facades\Antivirus;

$scanner = Antivirus::profile(); // ClamAv

You can change this behaviour by editing your config/antivirus.php configuration file.

Validated API Request after()

The ValidatedApiRequest no longer overwrites Laravel's "class based after() validation rules". #168open in new window, #167open in new window. Now, you need to overwrite the afterValidation(), if you wish to perform post validation logic.

❌ previously

namespace Acme\Requests;

use Illuminate\Foundation\Http\FormRequest;

class ListUsersRequest exends FormRequest
{
    public function after(Validator $validator)
    {        
        // ...not shown
    }
}

✔️ Now

namespace Acme\Requests;

use Illuminate\Foundation\Http\FormRequest;

class ListUsersRequest exends FormRequest
{
    public function afterValidation(Validator $validator)
    {        
        // ...not shown
    }
}

Flysystem

The RecordTypes and Visibility interface has been converted into an enumopen in new window, in \Aedart\Contracts\Flysystem\Db (contributed by Trukesopen in new window). This change should not affect your existing code, unless you are directly dependent on previous const values in the defined interfaces. If that is the case, then you might have to explicitly require the enum case's valueopen in new window.

❌ previously

use Aedart\Contracts\Flysystem\Visibility;

$visibility = Visibility::PRIVATE; // private

✔️ Now

use Aedart\Contracts\Flysystem\Visibility;

$visibility = Visibility::PRIVATE->value; // private

Validation

The AlphaDashDot and SemanticVersion validation rules now inherit from BaseValidationRule, in \Aedart\Validation\Rules. If you are extending these validation rules, then you may have to adapt your code.

Additionally, if you have validation rules that inherit from \Aedart\Validation\Rules\BaseRule (removed), then you must upgrade them to inherit from the new BaseValidationRule.

❌ previously

use Aedart\Validation\Rules\BaseRule;

class MyValidationRule extends BaseRule
{
    // ...not shown...
}

✔️ Now

use Aedart\Validation\Rules\BaseValidationRule;

class MyValidationRule extends BaseValidationRule
{
    // ...not shown...
}

See the source code and Laravel Validation Rulesopen in new window for additional information.

Trait Tester

The TraitTester in \Aedart\Testing\Helpers has been reworked to use Mockeryopen in new window, instead of the previous trait testing utilities offered by PHPUnit. This change should not affect you, unless you are extending / overwriting this testing utility.

Password Rehashing Action

Automatic password rehashing has become a default part of Laravel, since version v11.x (see Laravel documentationopen in new window for details). For this reason, the RehashPasswordIfNeeded action and PasswordWasRehashed, in \Aedart\Auth\Fortify, have been deprecated and will be removed in the next major version.

Random Int

The Math::randomInt, in \Aedart\Utils, has been deprecated. Please use Math::randomizer()->int() instead.

Removed Deprecated Components

Several deprecated components have been removed. Please review the CHANGELOG.md for details.

Onward

More extensive details can be found in the changelogopen in new window.