Explorar o código

refactor(middleware): 移除 MacroPageMiddleware 中间件依赖

runphp hai 1 mes
pai
achega
9f36b8bd05

+ 0 - 1
CHANGELOG.md

@@ -45,7 +45,6 @@ This is the first complete release of the SixShop Maker Bundle with full functio
 #### Controller Generation
 - **Dual Architecture**: Separate API and Admin controller generation
 - **Modern Request Handling**: Uses `SixShop\Core\Request` with dependency injection
-- **Middleware Integration**: MacroPageMiddleware support for admin controllers  
 - **Response Helpers**: Integration with `page_response()` and `success_response()` functions
 - **User Authentication**: Built-in `$request->userID` pattern for user context
 - **Parameter Processing**: Proper handling of GET, POST, PUT request data

+ 0 - 1
QUALITY_REPORT.md

@@ -54,7 +54,6 @@ The SixShop Maker Bundle is a comprehensive, production-ready code generation to
 ### ✅ Controller Generation
 - **Dual Architecture**: Separate API and Admin controllers
 - **Modern Request Handling**: SixShop\Core\Request with dependency injection
-- **Middleware Integration**: MacroPageMiddleware support for admin controllers
 - **Response Helpers**: page_response() and success_response() functions
 - **User Authentication**: Built-in $request->userID pattern
 - **Parameter Processing**: Proper GET/POST/PUT parameter handling

+ 0 - 4
templates/src/Controller/Admin/Controller.php.tpl.php

@@ -6,7 +6,6 @@ namespace <?= $namespace ?>Controller\Admin;
 use <?= $namespace ?>Model\<?= $modelName ?>;
 use <?= $namespace ?>Entity\<?= $entityName ?>;
 use SixShop\Core\Request;
-use SixShop\System\Middleware\MacroPageMiddleware;
 use think\Response;
 use think\Route;
 use function SixShop\Core\page_response;
@@ -20,9 +19,6 @@ use function SixShop\Core\success_response;
  */
 class <?= $controllerName ?>{
 
-    protected array $middlewares = [
-        MacroPageMiddleware::class
-    ];
     /**
      * Display a listing of the resource
      * GET /{resource}

+ 0 - 3
tests/Unit/Generator/ControllerGeneratorTest.php

@@ -142,9 +142,6 @@ class ControllerGeneratorTest extends TestCase
         // Test class name
         $this->assertStringContainsString('class ProductController', $content);
         
-        // Test middleware usage
-        $this->assertStringContainsString('use SixShop\Core\MacroPageMiddleware;', $content);
-        
         // Test entity usage
         $this->assertStringContainsString('use TestExtension\Entity\ProductEntity;', $content);