Restructure src/ and tests/ from package-by-type to package-by-domain
All checks were successful
CI / Coding Standards (push) Successful in 43s
CI / PHPStan (push) Successful in 52s
CI / Tests (PHP 8.1) (push) Successful in 47s
CI / Tests (PHP 8.2) (push) Successful in 49s
CI / Tests (PHP 8.3) (push) Successful in 37s
CI / No Debug Code (push) Successful in 2s
All checks were successful
CI / Coding Standards (push) Successful in 43s
CI / PHPStan (push) Successful in 52s
CI / Tests (PHP 8.1) (push) Successful in 47s
CI / Tests (PHP 8.2) (push) Successful in 49s
CI / Tests (PHP 8.3) (push) Successful in 37s
CI / No Debug Code (push) Successful in 2s
All classes are now organised by domain (Availability, Booking, Auth). Each domain package contains its value object, repository, admin controller, REST endpoint, and any shortcode pages under a matching sub-namespace. Cross-cutting wiring (Plugin, AdminMenu, RestRegistrar, ShortcodeRegistrar, Schema) lives at src/ root. Tests mirror the domain structure. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Unsupervised\Schedular\Admin;
|
||||
namespace Unsupervised\Schedular;
|
||||
|
||||
use Unsupervised\Schedular\Data\AvailabilityRepository;
|
||||
use Unsupervised\Schedular\Data\BookingRepository;
|
||||
use Unsupervised\Schedular\Roles\RoleManager;
|
||||
use Unsupervised\Schedular\Availability\AvailabilityController;
|
||||
use Unsupervised\Schedular\Availability\AvailabilityRepository;
|
||||
use Unsupervised\Schedular\Auth\RoleManager;
|
||||
use Unsupervised\Schedular\Booking\BookingRepository;
|
||||
use Unsupervised\Schedular\Booking\LessonController;
|
||||
|
||||
class AdminMenu {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Unsupervised\Schedular\Frontend;
|
||||
namespace Unsupervised\Schedular\Auth;
|
||||
|
||||
class LoginPage {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Unsupervised\Schedular\Roles;
|
||||
namespace Unsupervised\Schedular\Auth;
|
||||
|
||||
class RoleManager {
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Unsupervised\Schedular\Admin;
|
||||
namespace Unsupervised\Schedular\Availability;
|
||||
|
||||
use Unsupervised\Schedular\Data\AvailabilityRepository;
|
||||
use Unsupervised\Schedular\Model\AvailabilitySlot;
|
||||
use Unsupervised\Schedular\Roles\RoleManager;
|
||||
use Unsupervised\Schedular\Auth\RoleManager;
|
||||
|
||||
class AvailabilityController {
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Unsupervised\Schedular\Api;
|
||||
namespace Unsupervised\Schedular\Availability;
|
||||
|
||||
use Unsupervised\Schedular\Data\AvailabilityRepository;
|
||||
use Unsupervised\Schedular\Model\AvailabilitySlot;
|
||||
use Unsupervised\Schedular\Roles\RoleManager;
|
||||
use Unsupervised\Schedular\Auth\RoleManager;
|
||||
|
||||
class AvailabilityEndpoint {
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Unsupervised\Schedular\Data;
|
||||
|
||||
use Unsupervised\Schedular\Model\AvailabilitySlot;
|
||||
namespace Unsupervised\Schedular\Availability;
|
||||
|
||||
class AvailabilityRepository {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Unsupervised\Schedular\Model;
|
||||
namespace Unsupervised\Schedular\Availability;
|
||||
|
||||
class AvailabilitySlot {
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Unsupervised\Schedular\Api;
|
||||
namespace Unsupervised\Schedular\Booking;
|
||||
|
||||
use Unsupervised\Schedular\Data\AvailabilityRepository;
|
||||
use Unsupervised\Schedular\Data\BookingRepository;
|
||||
use Unsupervised\Schedular\Model\Lesson;
|
||||
use Unsupervised\Schedular\Roles\RoleManager;
|
||||
use Unsupervised\Schedular\Availability\AvailabilityRepository;
|
||||
use Unsupervised\Schedular\Auth\RoleManager;
|
||||
|
||||
class BookingEndpoint {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Unsupervised\Schedular\Frontend;
|
||||
namespace Unsupervised\Schedular\Booking;
|
||||
|
||||
use Unsupervised\Schedular\Roles\RoleManager;
|
||||
use Unsupervised\Schedular\Auth\RoleManager;
|
||||
|
||||
class BookingPage {
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Unsupervised\Schedular\Data;
|
||||
|
||||
use Unsupervised\Schedular\Model\Lesson;
|
||||
namespace Unsupervised\Schedular\Booking;
|
||||
|
||||
class BookingRepository {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Unsupervised\Schedular\Model;
|
||||
namespace Unsupervised\Schedular\Booking;
|
||||
|
||||
class Lesson {
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Unsupervised\Schedular\Admin;
|
||||
namespace Unsupervised\Schedular\Booking;
|
||||
|
||||
use Unsupervised\Schedular\Data\BookingRepository;
|
||||
use Unsupervised\Schedular\Roles\RoleManager;
|
||||
use Unsupervised\Schedular\Auth\RoleManager;
|
||||
|
||||
class LessonController {
|
||||
|
||||
@@ -3,8 +3,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace Unsupervised\Schedular;
|
||||
|
||||
use Unsupervised\Schedular\Data\Schema;
|
||||
use Unsupervised\Schedular\Roles\RoleManager;
|
||||
use Unsupervised\Schedular\Auth\RoleManager;
|
||||
|
||||
class Installer {
|
||||
|
||||
|
||||
@@ -3,12 +3,9 @@ declare(strict_types=1);
|
||||
|
||||
namespace Unsupervised\Schedular;
|
||||
|
||||
use Unsupervised\Schedular\Admin\AdminMenu;
|
||||
use Unsupervised\Schedular\Api\RestRegistrar;
|
||||
use Unsupervised\Schedular\Data\AvailabilityRepository;
|
||||
use Unsupervised\Schedular\Data\BookingRepository;
|
||||
use Unsupervised\Schedular\Frontend\ShortcodeRegistrar;
|
||||
use Unsupervised\Schedular\Roles\RoleManager;
|
||||
use Unsupervised\Schedular\Auth\RoleManager;
|
||||
use Unsupervised\Schedular\Availability\AvailabilityRepository;
|
||||
use Unsupervised\Schedular\Booking\BookingRepository;
|
||||
|
||||
class Plugin {
|
||||
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Unsupervised\Schedular\Api;
|
||||
namespace Unsupervised\Schedular;
|
||||
|
||||
use Unsupervised\Schedular\Data\AvailabilityRepository;
|
||||
use Unsupervised\Schedular\Data\BookingRepository;
|
||||
use Unsupervised\Schedular\Availability\AvailabilityEndpoint;
|
||||
use Unsupervised\Schedular\Availability\AvailabilityRepository;
|
||||
use Unsupervised\Schedular\Booking\BookingEndpoint;
|
||||
use Unsupervised\Schedular\Booking\BookingRepository;
|
||||
|
||||
class RestRegistrar {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Unsupervised\Schedular\Data;
|
||||
namespace Unsupervised\Schedular;
|
||||
|
||||
class Schema {
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Unsupervised\Schedular\Frontend;
|
||||
namespace Unsupervised\Schedular;
|
||||
|
||||
use Unsupervised\Schedular\Auth\LoginPage;
|
||||
use Unsupervised\Schedular\Booking\BookingPage;
|
||||
|
||||
class ShortcodeRegistrar {
|
||||
|
||||
Reference in New Issue
Block a user