2025-12-14 23:10:01 +00:00
|
|
|
{
|
2025-12-21 23:01:10 +00:00
|
|
|
"name": "getphred/phred",
|
|
|
|
|
"description": "Phred Framework",
|
|
|
|
|
"type": "project",
|
|
|
|
|
"require": {
|
|
|
|
|
"php": "^8.2",
|
|
|
|
|
"crell/api-problem": "^3.7",
|
|
|
|
|
"filp/whoops": "^2.15",
|
|
|
|
|
"getphred/eyrie": "dev-main",
|
|
|
|
|
"getphred/flagpole": "dev-main",
|
|
|
|
|
"getphred/pairity": "dev-main",
|
|
|
|
|
"laravel/serializable-closure": "^1.3",
|
|
|
|
|
"lcobucci/jwt": "^5.2",
|
|
|
|
|
"league/flysystem": "^3.24",
|
|
|
|
|
"middlewares/cors": "^0.4.0",
|
|
|
|
|
"monolog/monolog": "^3.5",
|
|
|
|
|
"nyholm/psr7": "^1.8",
|
|
|
|
|
"nyholm/psr7-server": "^1.1",
|
|
|
|
|
"php-di/php-di": "^7.0",
|
|
|
|
|
"relay/relay": "^2.1",
|
|
|
|
|
"symfony/console": "^7.0",
|
|
|
|
|
"vlucas/phpdotenv": "^5.6",
|
|
|
|
|
"zircote/swagger-php": "^4.8"
|
|
|
|
|
},
|
|
|
|
|
"require-dev": {
|
|
|
|
|
"codeception/codeception": "^5.1",
|
|
|
|
|
"codeception/module-asserts": "^3.0",
|
|
|
|
|
"codeception/module-phpbrowser": "^3.0",
|
|
|
|
|
"codeception/module-rest": "^3.3",
|
|
|
|
|
"fakerphp/faker": "^1.23",
|
|
|
|
|
"phpstan/phpstan": "^1.10",
|
|
|
|
|
"phpunit/phpunit": "^10.5"
|
|
|
|
|
},
|
Refactor M7 module scaffolding, route inclusion, and tests; implement providers discovery; fix URL extension negotiation; clean docs
• Add Service Providers loading from config/providers.php and merge with runtime config; ensure AppServiceProvider boots and contributes routes
• Create RouteGroups and guard module route includes in routes/web.php; update Kernel to auto-mount module routes and apply provider routes
• Implement create:module as a console Command (extends Phred\Console\Command):
◦ Args: name, prefix; Flags: --update-composer, --no-dump
◦ Stable root resolution (dirname(DIR, 2)); robust args/flags handling under ArrayInput
◦ Scaffolds module dirs (Controllers, Views, Templates, Routes, Providers, etc.), ensures Controllers exists, adds .gitkeep
◦ Writes Provider, View, Controller, Template stubs (fix variable interpolation via placeholders)
◦ Appends guarded include snippet to routes/web.php
◦ Optional composer PSR-4 mapping update (+ backup) and optional autoload dump
◦ Prevents providers.php corruption via name validation and existence checks
• Add URL extension negotiation middleware tweaks:
◦ Only set Accept for .json (and future .xml), never for none/php
◦ Never override existing Accept header
• Add MVC base classes (Controller, APIController, ViewController, View, ViewWithDefaultTemplate); update ViewController signature and View render contract
• Add tests:
◦ CreateModuleCommandTest with setup/teardown to snapshot/restore routes/web.php and composer.json; asserts scaffold and PSR-4 mapping
◦ ProviderRouteTest for provider-contributed route
◦ UrlExtensionNegotiationTest sets API_FORMAT=rest and asserts content-type behavior
◦ MvcViewTest validates transformData+render
• Fix config/providers.php syntax and add comment placeholder for modules
• Update README: M5/M6/M7 docs, MVC examples, template selection conventions, modules section, URL extension negotiation, and module creation workflow
• Update MILESTONES.md: mark M6/M7 complete; add M8 task for register:orm; note M12 XML extension support
2025-12-16 22:14:22 +00:00
|
|
|
"autoload": {
|
2025-12-21 23:01:10 +00:00
|
|
|
"psr-4": {
|
|
|
|
|
"Phred\\": "src/",
|
|
|
|
|
"App\\": "app/",
|
|
|
|
|
"Modules\\": "modules/",
|
|
|
|
|
"Pairity\\": "vendor/getphred/pairity/src/"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"autoload-dev": {
|
|
|
|
|
"psr-4": {
|
|
|
|
|
"Phred\\Tests\\": "tests/"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"bin": [
|
|
|
|
|
"phred"
|
|
|
|
|
],
|
|
|
|
|
"config": {
|
|
|
|
|
"allow-plugins": {
|
|
|
|
|
"php-http/discovery": true
|
|
|
|
|
}
|
2025-12-14 23:10:01 +00:00
|
|
|
}
|
2025-12-21 23:01:10 +00:00
|
|
|
}
|