AthenaeumAthenaeum
Packages
  • next
  • current
  • v9.x
  • v8.x
  • v7.x
  • v6.x
  • v5.x
  • v4.x
  • v3.x
  • v2.x
  • v1.x
Changelog
GitHub
Packages
  • next
  • current
  • v9.x
  • v8.x
  • v7.x
  • v6.x
  • v5.x
  • v4.x
  • v3.x
  • v2.x
  • v1.x
Changelog
GitHub
  • Version 6.x

    • Release Notes
    • Upgrade Guide
    • New to this...
    • Contribution Guide
    • Security Policy
    • Code of Conduct
    • Origin
  • ACL

    • Introduction
    • How to install
    • Setup
    • Permissions
    • Roles
    • Users
    • Cached Permissions
  • Audit

    • Audit
    • How to install
    • Setup
    • Recording
    • Events
  • Circuits

    • Circuits
    • How to install
    • Setup
    • Usage
    • Events
  • Collections

    • Collections
    • How to install
    • Summation

      • Summation Collection
      • Items Processor
  • Config

    • Configuration Loader
    • How to install
    • Setup
    • Load Configuration Files
    • Custom File Parsers
  • Console

    • Command and Schedule Registration
    • How to install
    • Setup
    • Commands
    • Schedules
  • Container

    • IoC Service Container
    • How to install
    • Container
    • List Resolver
  • Core

    • Athenaeum Core Application
    • How to install
    • Setup
    • Usage

      • Configuration
      • Service Providers
      • Service Container
      • Events
      • Caching
      • Logging
      • Console
      • Task Scheduling
      • Exception Handling
      • Extending Core Application
      • Testing
  • Database

    • Introduction
    • How to install
    • Models

      • Instantiatable
      • Sluggable
    • Query

      • Criteria (Query Filter)
  • Dto

    • Data Transfer Object (DTO)
    • How to install
    • Create Interface
    • Implement DTO
    • How to use
    • Populate
    • Export
    • Json
    • Serialization
    • Nested DTOs
    • Array DTO
  • ETags

    • ETags
    • How to install
    • Setup
    • Usage
    • Generators

      • Default Generator
      • Custom Generator
    • Eloquent Models
    • Macros
  • Events

    • Register Listeners and Subscribers
    • How to install
    • Setup
    • Listeners
    • Subscribers
  • Filters

    • Search Filter Utilities
    • Prerequisites
    • How to install
    • Setup
    • Processor
    • Filters Builder
    • Predefined Resources

      • Search Processor
      • Sorting Processor
      • Constraints Processor
      • Matching Processor
    • Tip: Create a base builder
  • Flysystem

    • Introduction
    • Database Adapter

      • Introduction
      • How to install
      • Setup
      • Data Deduplication
      • MIME-Type Detection
  • Http

    • Api

      • Http API
      • How to install
      • Setup
      • Resources

        • Introduction
        • Timestamps
        • Self-Link
        • Relations
        • Registrar
      • Middleware

        • Introduction
        • Request Must Be Json
        • Capture Fields To Select
    • Clients

      • Http Clients
      • How to install
      • Setup
      • Basic Usage
      • Available Methods

        • Fluent Api
        • Protocol Version
        • Base Uri
        • Http Method and Uri
        • Headers
        • Accept & Content-Type
        • Authentication
        • Http Query
        • Payload Format
        • Payload
        • Attachments
        • Cookies
        • Response Expectations
        • Middleware
        • Conditions
        • Criteria
        • Redirects
        • Timeout
        • Debugging
        • Logging
        • Driver Options
        • Driver
      • Http Query Builder

        • Introduction
        • Select
        • Where
        • Dates
        • Include
        • Pagination
        • Sorting
        • Raw Expressions
        • Custom Grammar
    • Cookies

      • Http Cookies
      • How to install
      • Usage
    • Messages

      • Http Messages
      • How to install
      • Serializers
  • Maintenance

    • Modes

      • Maintenance Modes
      • How to install
      • Setup
      • Basic Usage
      • Available Drivers
  • Mime Types

    • MIME-Types
    • How to install
    • Setup
    • Usage
    • Drivers

      • Available Drivers
      • File Info
  • Properties

    • Properties Overload
    • How to install
    • Usage
    • Naming Convention
    • Properties Visibility
  • Redmine

    • Redmine Api Client
    • How to install
    • Setup
    • General Usage

      • Supported Operations
      • Fetch list of resources
      • Find
      • Fetch
      • Create new record
      • Update existing record
      • Delete existing record
      • Relations
    • Available Resources

      • Predefined Resources
      • Attachments
      • Enumerations
      • Issue Relations
      • Users
      • User Groups
      • Roles
      • Project Memberships
      • Versions (Milestones)
      • Issue Categories
      • Trackers
  • Service

    • Service Registrar
    • How to install
    • How to use
  • Streams

    • Streams
    • How to install
    • Setup
    • How to use

      • Introduction
      • Open and Close
      • Raw Resource
      • Seeking
      • Reading
      • Writing
      • Size
      • Truncate
      • Flush
      • Hash
      • MIME-Type
      • Output
      • Locking
      • Transactions
      • Meta
      • Misc
  • Support

    • Introduction
    • How to install
    • Laravel Aware-of Helpers

      • How to use
      • Enforce Via Interface
      • Custom Default
      • Pros and Cons
      • Available Helpers
    • Aware-of Properties

      • Generator
      • Available Aware-of Helpers
    • Live Templates
  • Testing

    • Introduction
    • How to install
    • Test Cases
    • Testing Aware-of Helpers
  • Utils

    • Introduction
    • How to install
    • Array
    • Duration
    • Json
    • Math
    • Memory
    • Method Helper
    • Invoker
    • Populatable
    • String
    • Version
  • Validation

    • Introduction
    • How to install
    • Setup
    • Rules

      • Alpha-Dash-Dot
      • Semantic Version
You are viewing documentation for an outdated version. It is no longer supported!

Release Notes

  • Support Policy
  • v6.x Highlights
    • PHP v8 and Laravel v9.x
    • Improved Documentation
    • Union Types support in DTO
    • Streams
    • MIME-types detection
    • Maintenance Modes
    • Where not in slug...
    • Validate JSON
    • Memory Util
    • Purpose change of Core Application
  • Changelog

Support Policy

Athenaeum attempts to follow a release cycle that matches closely to that of Laravel. However, due to limited amount of project maintainers, no guarantees can be provided.

VersionPHPLaravelReleaseSecurity Fixes Until
7.x8.1 - 8.2v10.x~1st Quarter 2023February 2024
6.x*8.0 - 8.1v9.xApril 5th, 2022February 2023
5.x7.4v8.xOctober 4th, 2020N/A
4.x7.4v7.xApril 15th, 2020N/A
< 4.x--See CHANGELOG.mdN/A

*: current supported version.

TBD: "To be decided".

v6.x Highlights

These are some the new features of Athenaeum v6.x.

PHP v8 and Laravel v9.x

Athenaeum has been upgraded to usePHP v8.0 and Laravel v9.x. Furthermore, PHP v8.1 is also supported.

Improved Documentation

Several improvements have been made throughout the documentation. From version 6.x, a Security Policy, Code of Conduct and an improved Contribution Guide is made available.

Union Types support in DTO

The Dto and ArrayDto now support union types for their properties. When populating a DTO, the most suitable match will bre chosen.

class Person extends ArrayDto
{
    protected array $allowed = [
        'name' => 'string|null',
    ];
}

class Organisation extends Dto
{
    protected array $allowed = [
        'name' => 'string|null',
        'slogan' => 'string|null',
    ];
}

class Record extends Dto
{    
    protected array $allowed = [
        'reference' => ['string', Person::class, Organisation::class, 'null'],
    ];
}

// ------------------------------------------------------------------------ //

// Reference is a string...
$record->populate([
    'reference' => 'https:://google.com'
]);
echo gettype($record->reference); // string

// Reference becomes a Person...
$record->populate([
    'reference' => [ 'name' => 'Jane Jensen' ]
]);
echo ($record->reference instanceof Person); // true

// Reference becomes an Organisation...
$record->populate([
    'reference' => [ 'name' => 'Acme', 'slogan' => 'Building stuff...' ]
]);
echo ($record->reference instanceof Organisation); // true

See Union Type Handling documentation for additional examples.

Streams

A package that offers an extended version of PSR-7's defined StreamInterface; a wrapper for common stream operations, mostly intended for file streams.

use Aedart\Streams\FileStream;

$stream = FileStream::open('my-file.txt')
    ->put('Hi there');

$more = FileStream::openMemory()
    ->put("\nMore things to show...")
    ->positionToStart();

$stream
    ->append($more);

echo (string) $stream; // Hi there
                       // More things to show...

MIME-types detection

The MIME-types packages offers a way to detect a file's MIME-type based on a small sample of its contents.

use Aedart\MimeTypes\Detector;

$file = fopen('my-picture.jpg', 'rb');
$mimeType = (new Detector())->detect($file);

Maintenance Modes

A new Maintenance Modes package has been added, which offers a few additional drivers that can be used for storing application down state.

Where not in slug...

The \Aedart\Database\Models\Concerns\Slugs concern now offers a whereSlugNotIn() query scope method.

// ...inside your Eloquent model

$result = $query
    ->whereSlugNotIn(['alpha', 'beta', 'gamma'])
    ->get();

Validate JSON

The Json utility has been given a new method, which can be used to determine if a value is a valid JSON encoded string.

use Aedart\Utils\Json;

echo Json::isValid('{ "name": "Sven" }'); // true

Memory Util

A new Memory util component has been added. It offers a few methods to help you deal with conversion and formatting.

use Aedart\Utils\Memory;

$unit = Memory::from('3 MB');
echo $unit->toKibibyte(); // 2929.7

// ...or create from bytes...
echo Memory::unit(482504)->legacyFormat(); // 471.2 kB

See component documentation for more examples.

Purpose change of Core Application

Perhaps a less important highlight, but still worth mentioning, is that the purpose of the Core Application package has changed from Athenaeum v6.x. The Core Application package was originally developed to act as a "bridge" for integrating Laravel components and services into legacy applications. This is no longer the case. Version 6.x requires a minimum of PHP v8.0 and it does not feel right to presume that the Core Application can be used as originally intended (see original motivation in version v4.x).

From version 6.x, the Core Application is intended for the following purposes:

  • Testing
  • Tinkering
  • Development of non-essential standalone applications

If you are using the Core Application, for its original intent, then you are strongly encouraged to consider redesigning your application, e.g. rewrite your application using Laravel or other appropriate framework.

Changelog

Make sure to read the changelog for additional information about the latest release, new features, changes and bug fixes.

Edit page
Last Updated: 16/02/2023, 09:10
Contributors: Alin Eugen Deac, alin
Next
Upgrade Guide