Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
MGatner committed Jan 6, 2022
1 parent 02b8e72 commit 67da616
Show file tree
Hide file tree
Showing 29 changed files with 544 additions and 924 deletions.
18 changes: 18 additions & 0 deletions UPGRADING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Upgrade Guide

## Version 2 to 3
***

Version 3 focuses on simplifying the code and making each class align more logically with what it does.

* `Handlers` has been refactored into `BaseManager`; read more below
* Related, the following have been removed: Handlers service, helper file, and command files
* The `$attributes` property and accessor methods have been replaced by a single static method: `attributes()`
* Identification of handlers is now handled via the static method `handlerId()` instead of the "name" or "uid" attributes, or the class itself

### `BaseManager`

`Handlers` is no longer a library with service and helper. The core of this library is now
centered around an abstract class `BaseManager` with the same discovery and lookup methods
that were previously on `Handlers`. Other libraries needing handler discovery should extend
this class and provide the required `getPath(): string` method.
1 change: 0 additions & 1 deletion phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ parameters:
- src/Config/Routes.php
- src/Views/*
ignoreErrors:
- '#Call to an undefined static method Config\\Services::[A-Za-z]+\(\)#'
universalObjectCratesClasses:
- CodeIgniter\Entity
- Faker\Generator
Expand Down
27 changes: 0 additions & 27 deletions src/BaseHandler.php

This file was deleted.

0 comments on commit 67da616

Please sign in to comment.