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 7.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
  • Antivirus

    • Introduction
    • How to install
    • Setup
    • How to use
    • Scanners

      • Introduction
      • ClamAV
      • Null
      • Custom
    • Events
    • PSR
  • Audit

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

    • Introduction
    • How to install
    • Fortify

      • Prerequisites
      • Actions

        • Rehash Password
  • 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

    • Introduction
    • How to install
    • Setup
    • ETags usage

      • How to use
      • Generators

        • Default Generator
        • Custom Generator
      • Eloquent Models
    • Http Request Preconditions

      • Introduction
      • Resource Context
      • Preconditions
      • Actions
      • RFC 9110

        • If-Match
        • If-Unmodified-Since
        • If-None-Match
        • If-Modified-Since
        • If-Range
      • Extensions

        • Introduction
        • Range
      • Range Validator
      • Download Stream
    • 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
        • Caching
        • Registrar
      • Requests

        • Introduction
        • List Resources
        • List Deleted
        • Show Resource
        • Create Resource
        • Update Resource
        • Delete Resource
        • List Related
        • Process Multiple Resources
        • Helpers
      • Middleware

        • Introduction
        • Request Must Be Json
        • Capture Fields To Select
        • Remove Response Payload
    • 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
      • Sync
      • Flush
      • Hash
      • MIME-Type
      • Filename
      • 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
  • Translation

    • Introduction
    • How to install
    • Exporters

      • Introduction
      • Setup
      • How to use
      • Drivers

        • Introduction
        • Array
        • Lang.js (Array)
        • Lang.js (JSON)
        • Cache
  • 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
      • Date Format
      • Semantic Version
You are viewing documentation for an outdated version. It is no longer supported!

Upgrade Guide

From version 6.x to 7.x.

  • From version 6.x to 7.x.
    • PHP version 8.1 required
    • Laravel v10.x
    • Field Criteria
    • Date Filter
    • Api Resource Service Provider
    • Audit Package
    • Changed publicPath() and langPath() in Core Application
    • Removed SearchProcessor::language()
    • Removed Str::tree()
  • Onward

PHP version 8.1 required

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

Note: PHP v8.2 is supported!

Laravel v10.x

Please read Laravel's upgrade guide, before continuing here.

Field Criteria

The \Aedart\Contracts\Database\Query\FieldCriteria::make() and \Aedart\Database\Query\FieldFilter::make() now have optional $field argument. This will allow creating instances of custom filters, without specifying a field. The instance will NOT be applicable, until a field has been set.

use Aedart\Filters\Query\Filters\Fields\BelongsToFilter;

$filter = BelongsToFilter::make();

// ...later in your application
$filter->setField('authors');

Date Filter

The \Aedart\Filters\Query\Filters\Fields\DateFilter::allowedDateFormats() method's visibility has been changed to public (previously protected). The method now returns a default set of supported date formats. These can also be specified via the setAllowedDateFormats() method.

use Aedart\Filters\Query\Filters\Fields\DateFilter;

$filter = DateFilter::make('event_date')
    ->setAllowedDateFormats('Y-m-d');

Api Resource Service Provider

The ApiResourceServiceProvider is now an aggregate service provider, which automatically registers the ETagsServiceProvider and the new JsonResourceServiceProvider (the previous version of ApiResourceServiceProvider).

Audit Package

The Audit package has been slightly refactored. As a result, a few components have been deprecated and replaced with improved versions. However, the dispatched events have undergone some breaking changes.

Deprecations

  • \Aedart\Audit\Traits\RecordsChanges trait. Replaced by \Aedart\Audit\Concerns\ChangeRecording.
  • \Aedart\Audit\Traits\HasAuditTrail trait Replaced by \Aedart\Audit\Concerns\AuditTrail.
  • \Aedart\Audit\Models\Concerns\AuditTrailConfiguration concern. Replaced by \Aedart\Audit\Concerns\AuditTrailConfig.

The deprecated components will be removed in the next major version.

Dispatch Multiple Models Changed

The ModelChangedEvents::dispatchMultipleModelsChanged() no longer skips all models, if the first is marked as "skip next recording" (via model's skipRecordingNextChange()). Instead, models are now filtered by their skip state. Only if the models allow recording, will they be included in the dispatched event.

Multiple Models Changed Event

The public $models attribute can no longer be an array, in MultipleModelsChanged. The attribute must now be a Collection instance.

Model Changed Events (trait)

The \Aedart\Audit\Observers\Concerns\ModelChangedEvents concern/trait has been redesigned. Its methods now accept all supported arguments of ModelHasChanged event. Previously, only $model, event $type and a $message was accepted. Now, the all create / make methods accept the following arguments:

  • Model $model The model that has changed.
  • string $type The event type.
  • array|null $original = null (optional) Original data (attributes) before change occurred. Default's to given model's original data, if none given.
  • array|null $changed = null (optional) Changed data (attributes) after change occurred. Default's to given model's changed data, if none given.
  • string|null $message = null (optional) Eventual user provided message associated with the event. Defaults to model's Audit Trail Message, if available.
  • Model|Authenticatable|null $user = null (optional) The user that caused the change. Defaults to current authenticated user.
  • DateTimeInterface|Carbon|string|null $performedAt = null (optional) Date and time of when the event happened. Defaults to model's "updated at" value, if available, If not, then current date time is used.

Changed publicPath() and langPath() in Core Application

From Laravel v10.x, the \Illuminate\Contracts\Foundation\Application interface defines publicPath() and langPath(), which the Core application inherits from. The method signature has changed and may cause compatible issues, if you overwrite these methods.

Before

// ...In \Aedart\Contracts\Core\Application...

public function publicPath();

public function langPath(string $path = ''): string;

Now

// ...Inherited from \Illuminate\Contracts\Foundation\Application...

public function publicPath($path = '');

public function langPath($path = '');

If you have overwritten these methods, then you must ensure that the method signature is compatible with Laravel's Application interface.

Removed SearchProcessor::language()

The deprecated \Aedart\Filters\Processors\SearchProcessor::language() method has been removed. This features didn't work as intended. No replacement has been implemented.

Removed Str::tree()

\Aedart\Utils\Str::tree() was deprecated in v6.4. It has been replaced by \Aedart\Utils\Arr::tree().

Onward

More extensive details can be found in the changelog.

Edit page
Last Updated: 18/03/2024, 10:45
Contributors: Alin Eugen Deac, alin
Prev
Release Notes
Next
New to this...