Conversation
Use versioned php8.4-* Debian packages instead of php-cli (>= 8.4) so PHP 8.5+ can no longer satisfy the dependency; adjust docstring and Windows INSTALL.txt wording from "PHP >= 8.4" to "PHP 8.4".
…ers Release build
…; tag from CHANGELOG version
…LOG-driven releases
…views, code owners, CI gates, linear history)
…itter / nginx-only / Apache), generates from platform domains + CLI apply
…ver config, sync to /etc/hosts (edge:hosts, --no-hosts)
…ect base_path); document EDGE_* env in template
…blic, fpm|swoole via proj.json) with injected run-env (APP_ENV/HKM_USERDATA_DIR/PSP_GLOBAL_AUTOLOAD/HKM_KERNEL_HOME)
…son); add --all for the whole registry
…(multi-PHP hosts); show php/fpm binding in edge:status
…rotection (#23) * Initial commit * remove module common-type-alias * remove module bind-it * add submodules for bind-it, php-io-cli, and module-template * feat(module): add commands for managing git submodules - Implemented `module:add` command to add a git submodule and configure it as a Composer path package. - Implemented `module:remove` command to fully remove a git submodule and clean up all traces from the repository. - Created a bash script `module.sh` for adding and removing modules with similar functionality. - Added scaffolding for module structure including `src/` directory and `composer.json`. - Updated root `composer.json` to include new modules as path repositories. - Added error handling and user confirmation prompts for destructive actions. * fix(common-type-alias): update subproject commit to indicate dirty state * d * remove module orchestrator * Add unit tests for I18n, Pageflow, Support, and Validation plugins; introduce Zig build system - Created `TranslatorTest` to validate translation functionality including key resolution and interpolation. - Implemented `PageflowResponderTest` to ensure correct rendering of pages and handling of requests. - Added `CollectionTest` to test collection operations and array helper functions. - Developed `ResourceTest` to verify resource transformation and serialization. - Established `ValidatorTest` to check validation rules and error handling. - Introduced Zig build configuration with `build.zig`, `config.zig`, and `main.zig` for project management. * fix(pulse-engine): update subproject commit to indicate dirty state * feat(routes): implement project-level route handling and manifest compilation * feat(cookie): introduce cookie management with configuration and helpers - Added cookie configuration file and helper functions for managing cookies. - Implemented CookieJar for queuing and reading cookies, including encryption support. - Created tests for cookie functionality, ensuring correct behavior for setting, reading, and deleting cookies. feat(http): enhance request handling with RequestAware interface - Introduced RequestAware interface for controllers to hold the active Request. - Updated ExecuteStage to set the Request on controllers implementing RequestAware. feat(http): implement route filters for declarative behavior - Added FilterRegistry to map route-filter aliases to pipeline stages. - Implemented RouteFilterStage to execute filters declared on routes. feat(view): compile view manifest for structured view resolution - Created CompileViewManifestStage to compile view paths with priority handling. - Ensured project views take precedence over plugin views. feat(api): create base controllers for JSON and HTML responses - Developed ApiController for JSON endpoints with standardized response methods. - Created ViewController for rendering HTML views with integrated cookie management. feat(task): add example plugin with JSON filter and view rendering - Implemented RequireJsonStage to enforce JSON response expectations. - Added a welcome view for the Task plugin demonstrating view rendering. * refactor(routes): enhance project route handling with additional validation and state management * feat(storage): add storage configuration and local storage adapter - Introduced a new storage configuration file to manage storage settings via environment variables. - Implemented a LocalStorageAdapter for handling file storage operations, including storing, retrieving, and deleting files. - Added tests for LocalStorageAdapter to ensure functionality and edge cases are covered. feat(session): implement session management traits and tests - Created HasRequest and InteractsWithSession traits for managing request and session data in controllers. - Developed unit tests for session management, ensuring proper functionality of session storage, retrieval, and lifecycle management. test(session): add comprehensive tests for session handling - Added tests for cookie-based session handling, including encryption, tampering, and session expiration scenarios. - Ensured that session management adheres to expected behaviors under various conditions. feat(s3): implement S3 storage adapter with configuration options - Added S3StorageAdapter to support AWS S3 and compatible storage services. - Implemented configuration options for region, credentials, and custom endpoints. - Created tests to validate S3 adapter functionality and credential resolution. * feat(seo): Implement SEO components including RouteCatalog, SeoHead, SitemapGenerator, and SitemapStreamWriter - Added RouteCatalog to manage public routes for sitemaps based on the compiled route manifest. - Introduced SeoHead for assembling comprehensive SEO <head> elements for pages. - Created SitemapGenerator to facilitate sitemap creation from public routes and dynamic URLs. - Developed SitemapSource to combine static and dynamic URLs for sitemaps. - Implemented SitemapStreamWriter for efficient streaming of large sitemaps, supporting gzip compression. - Added SitemapUrlProvider interface for dynamic route pattern expansion into concrete URLs from data stores. * Refactor code structure for improved readability and maintainability * Add integration tests for OAuth2 functionality - Implement OAuth2HttpIntegrationTest to cover HTTP interactions with OAuth2 controllers, including token issuance, introspection, and discovery. - Implement OAuth2PersistenceIntegrationTest to validate the behavior of repositories and services against an in-memory SQLite database, focusing on authorization code flow, refresh token rotation, and client CRUD operations. * feat: Implement DataConverter for hydration between DB and Domain objects - Added DataConverter class to handle conversion between raw DB data and PHP Domain objects. - Introduced methods for data extraction and reconstruction with type casting support. feat: Create Resource and ResourceCollection for API response transformation - Added Resource class to map domain objects to API response shapes. - Introduced ResourceCollection to handle lists of resources and their transformations. feat: Add Str utility class for string manipulation - Implemented various string utility methods including studly, camel, snake, kebab, and slug. test: Add unit tests for RequireTenantStage and RouteFilterStage - Implemented tests to ensure tenant requirements are enforced in HTTP request handling. - Verified correct behavior of route filters in the pipeline. test: Add TenantAdminService tests for tenant management functionality - Created tests to validate tenant creation, provisioning, and authorization checks. test: Implement FeedbackService tests for user feedback submission and retrieval - Added tests to ensure proper handling of feedback submissions and access control. test: Add UserSettingsService tests for user preferences management - Implemented tests to verify user settings updates and validation rules. * Refactor code structure for improved readability and maintainability * feat: Add native launcher and install script for HKM kernel with dependency resolution * feat: Implement seeder command structure with run, fresh, and status functionalities * feat: Add versioning and upgrade command for kernel management * feat: Add upgrade command for kernel updates and implement versioning in binaries * feat: Add unit tests for exception handling, request, response, identity, and security verdict functionalities * Update PHP version requirement to 8.4 across various scripts - Updated the minimum PHP version requirement from 8.2 to 8.4 in bundle.sh, ensuring compatibility with the latest features. - Modified the doctor.zig command to check for PHP version 8.4, reflecting the updated requirement. - Adjusted install-kernel.sh to require PHP 8.4, providing clearer instructions for users. - Updated installation instructions for Debian/Ubuntu to install PHP 8.4 and its extensions. * feat: Add PHPUnit configuration file for unit testing * feat: Update CI workflows to use self-hosted Zig toolchain and improve macOS bundle process * docs: rewrite README as a full framework guide (concepts, lifecycle, usage) * ci(release): auto-tag new CHANGELOG version on merge to main -> triggers Release build * ci(release): auto-release on merge to main via workflow_call (no PAT); tag from CHANGELOG version * docs(readme): document master->main branch model and automatic CHANGELOG-driven releases * ci(security): CODEOWNERS + main branch protection script (required reviews, code owners, CI gates, linear history) * feat(edge): host-aware web-server config plugin (nginx SNI stream splitter / nginx-only / Apache), generates from platform domains + CLI apply * feat(edge): classify .local/.test as local domains — exclude from server config, sync to /etc/hosts (edge:hosts, --no-hosts) * fix(edge): resolve project registry from global kernel home (not project base_path); document EDGE_* env in template * feat(edge): project-aware config — per-project vhosts (docroot app/public, fpm|swoole via proj.json) with injected run-env (APP_ENV/HKM_USERDATA_DIR/PSP_GLOBAL_AUTOLOAD/HKM_KERNEL_HOME) * feat(edge): default commands to the CURRENT project (base_path/proj.json); add --all for the whole registry * feat(edge): auto-resolve PHP-FPM socket to match the CLI PHP version (multi-PHP hosts); show php/fpm binding in edge:status * feat(userconfig): resolve config path for non-root sudo users --------- Co-authored-by: Hakeem Shamavu <hakimushamavu@gmail.com>
…ption; update documentation
…arlier auto-release misfire)
* Initial commit * remove module common-type-alias * remove module bind-it * add submodules for bind-it, php-io-cli, and module-template * feat(module): add commands for managing git submodules - Implemented `module:add` command to add a git submodule and configure it as a Composer path package. - Implemented `module:remove` command to fully remove a git submodule and clean up all traces from the repository. - Created a bash script `module.sh` for adding and removing modules with similar functionality. - Added scaffolding for module structure including `src/` directory and `composer.json`. - Updated root `composer.json` to include new modules as path repositories. - Added error handling and user confirmation prompts for destructive actions. * fix(common-type-alias): update subproject commit to indicate dirty state * d * remove module orchestrator * Add unit tests for I18n, Pageflow, Support, and Validation plugins; introduce Zig build system - Created `TranslatorTest` to validate translation functionality including key resolution and interpolation. - Implemented `PageflowResponderTest` to ensure correct rendering of pages and handling of requests. - Added `CollectionTest` to test collection operations and array helper functions. - Developed `ResourceTest` to verify resource transformation and serialization. - Established `ValidatorTest` to check validation rules and error handling. - Introduced Zig build configuration with `build.zig`, `config.zig`, and `main.zig` for project management. * fix(pulse-engine): update subproject commit to indicate dirty state * feat(routes): implement project-level route handling and manifest compilation * feat(cookie): introduce cookie management with configuration and helpers - Added cookie configuration file and helper functions for managing cookies. - Implemented CookieJar for queuing and reading cookies, including encryption support. - Created tests for cookie functionality, ensuring correct behavior for setting, reading, and deleting cookies. feat(http): enhance request handling with RequestAware interface - Introduced RequestAware interface for controllers to hold the active Request. - Updated ExecuteStage to set the Request on controllers implementing RequestAware. feat(http): implement route filters for declarative behavior - Added FilterRegistry to map route-filter aliases to pipeline stages. - Implemented RouteFilterStage to execute filters declared on routes. feat(view): compile view manifest for structured view resolution - Created CompileViewManifestStage to compile view paths with priority handling. - Ensured project views take precedence over plugin views. feat(api): create base controllers for JSON and HTML responses - Developed ApiController for JSON endpoints with standardized response methods. - Created ViewController for rendering HTML views with integrated cookie management. feat(task): add example plugin with JSON filter and view rendering - Implemented RequireJsonStage to enforce JSON response expectations. - Added a welcome view for the Task plugin demonstrating view rendering. * refactor(routes): enhance project route handling with additional validation and state management * feat(storage): add storage configuration and local storage adapter - Introduced a new storage configuration file to manage storage settings via environment variables. - Implemented a LocalStorageAdapter for handling file storage operations, including storing, retrieving, and deleting files. - Added tests for LocalStorageAdapter to ensure functionality and edge cases are covered. feat(session): implement session management traits and tests - Created HasRequest and InteractsWithSession traits for managing request and session data in controllers. - Developed unit tests for session management, ensuring proper functionality of session storage, retrieval, and lifecycle management. test(session): add comprehensive tests for session handling - Added tests for cookie-based session handling, including encryption, tampering, and session expiration scenarios. - Ensured that session management adheres to expected behaviors under various conditions. feat(s3): implement S3 storage adapter with configuration options - Added S3StorageAdapter to support AWS S3 and compatible storage services. - Implemented configuration options for region, credentials, and custom endpoints. - Created tests to validate S3 adapter functionality and credential resolution. * feat(seo): Implement SEO components including RouteCatalog, SeoHead, SitemapGenerator, and SitemapStreamWriter - Added RouteCatalog to manage public routes for sitemaps based on the compiled route manifest. - Introduced SeoHead for assembling comprehensive SEO <head> elements for pages. - Created SitemapGenerator to facilitate sitemap creation from public routes and dynamic URLs. - Developed SitemapSource to combine static and dynamic URLs for sitemaps. - Implemented SitemapStreamWriter for efficient streaming of large sitemaps, supporting gzip compression. - Added SitemapUrlProvider interface for dynamic route pattern expansion into concrete URLs from data stores. * Refactor code structure for improved readability and maintainability * Add integration tests for OAuth2 functionality - Implement OAuth2HttpIntegrationTest to cover HTTP interactions with OAuth2 controllers, including token issuance, introspection, and discovery. - Implement OAuth2PersistenceIntegrationTest to validate the behavior of repositories and services against an in-memory SQLite database, focusing on authorization code flow, refresh token rotation, and client CRUD operations. * feat: Implement DataConverter for hydration between DB and Domain objects - Added DataConverter class to handle conversion between raw DB data and PHP Domain objects. - Introduced methods for data extraction and reconstruction with type casting support. feat: Create Resource and ResourceCollection for API response transformation - Added Resource class to map domain objects to API response shapes. - Introduced ResourceCollection to handle lists of resources and their transformations. feat: Add Str utility class for string manipulation - Implemented various string utility methods including studly, camel, snake, kebab, and slug. test: Add unit tests for RequireTenantStage and RouteFilterStage - Implemented tests to ensure tenant requirements are enforced in HTTP request handling. - Verified correct behavior of route filters in the pipeline. test: Add TenantAdminService tests for tenant management functionality - Created tests to validate tenant creation, provisioning, and authorization checks. test: Implement FeedbackService tests for user feedback submission and retrieval - Added tests to ensure proper handling of feedback submissions and access control. test: Add UserSettingsService tests for user preferences management - Implemented tests to verify user settings updates and validation rules. * Refactor code structure for improved readability and maintainability * feat: Add native launcher and install script for HKM kernel with dependency resolution * feat: Implement seeder command structure with run, fresh, and status functionalities * feat: Add versioning and upgrade command for kernel management * feat: Add upgrade command for kernel updates and implement versioning in binaries * feat: Add unit tests for exception handling, request, response, identity, and security verdict functionalities * Update PHP version requirement to 8.4 across various scripts - Updated the minimum PHP version requirement from 8.2 to 8.4 in bundle.sh, ensuring compatibility with the latest features. - Modified the doctor.zig command to check for PHP version 8.4, reflecting the updated requirement. - Adjusted install-kernel.sh to require PHP 8.4, providing clearer instructions for users. - Updated installation instructions for Debian/Ubuntu to install PHP 8.4 and its extensions. * feat: Add PHPUnit configuration file for unit testing * feat: Update CI workflows to use self-hosted Zig toolchain and improve macOS bundle process * docs: rewrite README as a full framework guide (concepts, lifecycle, usage) * ci(release): auto-tag new CHANGELOG version on merge to main -> triggers Release build * ci(release): auto-release on merge to main via workflow_call (no PAT); tag from CHANGELOG version * docs(readme): document master->main branch model and automatic CHANGELOG-driven releases * ci(security): CODEOWNERS + main branch protection script (required reviews, code owners, CI gates, linear history) * feat(edge): host-aware web-server config plugin (nginx SNI stream splitter / nginx-only / Apache), generates from platform domains + CLI apply * feat(edge): classify .local/.test as local domains — exclude from server config, sync to /etc/hosts (edge:hosts, --no-hosts) * fix(edge): resolve project registry from global kernel home (not project base_path); document EDGE_* env in template * feat(edge): project-aware config — per-project vhosts (docroot app/public, fpm|swoole via proj.json) with injected run-env (APP_ENV/HKM_USERDATA_DIR/PSP_GLOBAL_AUTOLOAD/HKM_KERNEL_HOME) * feat(edge): default commands to the CURRENT project (base_path/proj.json); add --all for the whole registry * feat(edge): auto-resolve PHP-FPM socket to match the CLI PHP version (multi-PHP hosts); show php/fpm binding in edge:status * feat(userconfig): resolve config path for non-root sudo users * feat(edge): enhance hosts management with dev mode checks and force option; update documentation * chore(release): v1.0.13 — Edge plugin, PSP_PROJECTS_DIR export, frontend/sudo fixes * chore(release): bump to v1.0.14 (v1.0.13 tag already exists from an earlier auto-release misfire) * chore(release): reclaim v1.0.13 (stale mis-tagged v1.0.13 release/tag deleted) --------- Co-authored-by: Hakeem Shamavu <hakimushamavu@gmail.com>
The EDGE_LOCAL_IN_SERVER flag was defined but never read, so a project whose domains are all local rendered an empty vhost. Dev mode (HKM_DEV=1) now folds local domains into the generated nginx/Apache vhost; production runs keep them out (DNS). Local domains still sync to /etc/hosts either way.
…ntains its content)
* Initial commit * remove module common-type-alias * remove module bind-it * add submodules for bind-it, php-io-cli, and module-template * feat(module): add commands for managing git submodules - Implemented `module:add` command to add a git submodule and configure it as a Composer path package. - Implemented `module:remove` command to fully remove a git submodule and clean up all traces from the repository. - Created a bash script `module.sh` for adding and removing modules with similar functionality. - Added scaffolding for module structure including `src/` directory and `composer.json`. - Updated root `composer.json` to include new modules as path repositories. - Added error handling and user confirmation prompts for destructive actions. * fix(common-type-alias): update subproject commit to indicate dirty state * d * remove module orchestrator * Add unit tests for I18n, Pageflow, Support, and Validation plugins; introduce Zig build system - Created `TranslatorTest` to validate translation functionality including key resolution and interpolation. - Implemented `PageflowResponderTest` to ensure correct rendering of pages and handling of requests. - Added `CollectionTest` to test collection operations and array helper functions. - Developed `ResourceTest` to verify resource transformation and serialization. - Established `ValidatorTest` to check validation rules and error handling. - Introduced Zig build configuration with `build.zig`, `config.zig`, and `main.zig` for project management. * fix(pulse-engine): update subproject commit to indicate dirty state * feat(routes): implement project-level route handling and manifest compilation * feat(cookie): introduce cookie management with configuration and helpers - Added cookie configuration file and helper functions for managing cookies. - Implemented CookieJar for queuing and reading cookies, including encryption support. - Created tests for cookie functionality, ensuring correct behavior for setting, reading, and deleting cookies. feat(http): enhance request handling with RequestAware interface - Introduced RequestAware interface for controllers to hold the active Request. - Updated ExecuteStage to set the Request on controllers implementing RequestAware. feat(http): implement route filters for declarative behavior - Added FilterRegistry to map route-filter aliases to pipeline stages. - Implemented RouteFilterStage to execute filters declared on routes. feat(view): compile view manifest for structured view resolution - Created CompileViewManifestStage to compile view paths with priority handling. - Ensured project views take precedence over plugin views. feat(api): create base controllers for JSON and HTML responses - Developed ApiController for JSON endpoints with standardized response methods. - Created ViewController for rendering HTML views with integrated cookie management. feat(task): add example plugin with JSON filter and view rendering - Implemented RequireJsonStage to enforce JSON response expectations. - Added a welcome view for the Task plugin demonstrating view rendering. * refactor(routes): enhance project route handling with additional validation and state management * feat(storage): add storage configuration and local storage adapter - Introduced a new storage configuration file to manage storage settings via environment variables. - Implemented a LocalStorageAdapter for handling file storage operations, including storing, retrieving, and deleting files. - Added tests for LocalStorageAdapter to ensure functionality and edge cases are covered. feat(session): implement session management traits and tests - Created HasRequest and InteractsWithSession traits for managing request and session data in controllers. - Developed unit tests for session management, ensuring proper functionality of session storage, retrieval, and lifecycle management. test(session): add comprehensive tests for session handling - Added tests for cookie-based session handling, including encryption, tampering, and session expiration scenarios. - Ensured that session management adheres to expected behaviors under various conditions. feat(s3): implement S3 storage adapter with configuration options - Added S3StorageAdapter to support AWS S3 and compatible storage services. - Implemented configuration options for region, credentials, and custom endpoints. - Created tests to validate S3 adapter functionality and credential resolution. * feat(seo): Implement SEO components including RouteCatalog, SeoHead, SitemapGenerator, and SitemapStreamWriter - Added RouteCatalog to manage public routes for sitemaps based on the compiled route manifest. - Introduced SeoHead for assembling comprehensive SEO <head> elements for pages. - Created SitemapGenerator to facilitate sitemap creation from public routes and dynamic URLs. - Developed SitemapSource to combine static and dynamic URLs for sitemaps. - Implemented SitemapStreamWriter for efficient streaming of large sitemaps, supporting gzip compression. - Added SitemapUrlProvider interface for dynamic route pattern expansion into concrete URLs from data stores. * Refactor code structure for improved readability and maintainability * Add integration tests for OAuth2 functionality - Implement OAuth2HttpIntegrationTest to cover HTTP interactions with OAuth2 controllers, including token issuance, introspection, and discovery. - Implement OAuth2PersistenceIntegrationTest to validate the behavior of repositories and services against an in-memory SQLite database, focusing on authorization code flow, refresh token rotation, and client CRUD operations. * feat: Implement DataConverter for hydration between DB and Domain objects - Added DataConverter class to handle conversion between raw DB data and PHP Domain objects. - Introduced methods for data extraction and reconstruction with type casting support. feat: Create Resource and ResourceCollection for API response transformation - Added Resource class to map domain objects to API response shapes. - Introduced ResourceCollection to handle lists of resources and their transformations. feat: Add Str utility class for string manipulation - Implemented various string utility methods including studly, camel, snake, kebab, and slug. test: Add unit tests for RequireTenantStage and RouteFilterStage - Implemented tests to ensure tenant requirements are enforced in HTTP request handling. - Verified correct behavior of route filters in the pipeline. test: Add TenantAdminService tests for tenant management functionality - Created tests to validate tenant creation, provisioning, and authorization checks. test: Implement FeedbackService tests for user feedback submission and retrieval - Added tests to ensure proper handling of feedback submissions and access control. test: Add UserSettingsService tests for user preferences management - Implemented tests to verify user settings updates and validation rules. * Refactor code structure for improved readability and maintainability * feat: Add native launcher and install script for HKM kernel with dependency resolution * feat: Implement seeder command structure with run, fresh, and status functionalities * feat: Add versioning and upgrade command for kernel management * feat: Add upgrade command for kernel updates and implement versioning in binaries * feat: Add unit tests for exception handling, request, response, identity, and security verdict functionalities * Update PHP version requirement to 8.4 across various scripts - Updated the minimum PHP version requirement from 8.2 to 8.4 in bundle.sh, ensuring compatibility with the latest features. - Modified the doctor.zig command to check for PHP version 8.4, reflecting the updated requirement. - Adjusted install-kernel.sh to require PHP 8.4, providing clearer instructions for users. - Updated installation instructions for Debian/Ubuntu to install PHP 8.4 and its extensions. * feat: Add PHPUnit configuration file for unit testing * feat: Update CI workflows to use self-hosted Zig toolchain and improve macOS bundle process * docs: rewrite README as a full framework guide (concepts, lifecycle, usage) * ci(release): auto-tag new CHANGELOG version on merge to main -> triggers Release build * ci(release): auto-release on merge to main via workflow_call (no PAT); tag from CHANGELOG version * docs(readme): document master->main branch model and automatic CHANGELOG-driven releases * ci(security): CODEOWNERS + main branch protection script (required reviews, code owners, CI gates, linear history) * feat(edge): host-aware web-server config plugin (nginx SNI stream splitter / nginx-only / Apache), generates from platform domains + CLI apply * feat(edge): classify .local/.test as local domains — exclude from server config, sync to /etc/hosts (edge:hosts, --no-hosts) * fix(edge): resolve project registry from global kernel home (not project base_path); document EDGE_* env in template * feat(edge): project-aware config — per-project vhosts (docroot app/public, fpm|swoole via proj.json) with injected run-env (APP_ENV/HKM_USERDATA_DIR/PSP_GLOBAL_AUTOLOAD/HKM_KERNEL_HOME) * feat(edge): default commands to the CURRENT project (base_path/proj.json); add --all for the whole registry * feat(edge): auto-resolve PHP-FPM socket to match the CLI PHP version (multi-PHP hosts); show php/fpm binding in edge:status * feat(userconfig): resolve config path for non-root sudo users * feat(edge): enhance hosts management with dev mode checks and force option; update documentation * chore(release): v1.0.13 — Edge plugin, PSP_PROJECTS_DIR export, frontend/sudo fixes * chore(release): bump to v1.0.14 (v1.0.13 tag already exists from an earlier auto-release misfire) * chore(release): reclaim v1.0.13 (stale mis-tagged v1.0.13 release/tag deleted) * chore(release): v1.0.14 * chore: align CHANGELOG to released v1.0.13 (drop phantom 1.0.14) * fix(edge): serve local .local/.test domains in dev mode (--dev) The EDGE_LOCAL_IN_SERVER flag was defined but never read, so a project whose domains are all local rendered an empty vhost. Dev mode (HKM_DEV=1) now folds local domains into the generated nginx/Apache vhost; production runs keep them out (DNS). Local domains still sync to /etc/hosts either way. --------- Co-authored-by: Hakeem Shamavu <hakimushamavu@gmail.com>
…26) Adds per-run TLS mode selection (ssl|none|both), an APP_ENV-derived cache profile, and a full OpenSwoole reverse-proxy runtime alongside PHP-FPM. Added - --tls=ssl|none|both (+ --no-ssl) and --ssl-cert/--ssl-key on edge:apply. - Cache profiles from APP_ENV: local/development disable browser caching entirely; production keeps dynamic responses uncached and serves fingerprinted assets immutable for a year. Unknown envs fall back to DEVELOPMENT, never production. - Environment flags --local/--dev, --development/-d, --production (scoped to the edge commands, not launcher-global). - OpenSwoole runtime via proj.json "edge": { "runtime": "openswoole" }: dedicated upstream (least_conn, max_fails/fail_timeout, keepalive pool, multi-worker via "ports"), $connection_upgrade map, /ws WebSocket location, optional /health, and CF-Connecting-IP forwarded upstream. - edge:service command generating the systemd unit (or supervisor block) that supervises a project's OpenSwoole server. - Brotli/gzip resolved per server from that server's own capability, HSTS on TLS modes only, and an opt-in http-context prelude (log_format, rate-limit zones, Cloudflare real-IP ranges). Changed - The cache profile is no longer inferred from the kernel mode; nothing in vhost generation reads HKM_DEV, so kernel selection and app environment are independent. - All generated paths derive from the project root, and the OpenSwoole entry script defaults to app/swoole/index.php — matching what `hkm run --swoole` executes. - Security headers are repeated inside locations that set their own add_header, which nginx would otherwise drop. Fixed - Generated nginx failed `nginx -t`: `location = /index.php` was nested inside `location ~ \.php$`, which nginx rejects. - `.well-known` was denied by a blanket dotfile rule, breaking ACME/Let's Encrypt issuance and renewal. - Apache vhosts failed configtest: ServerTokens is not valid inside <VirtualHost>. - Apache no longer emits directives for modules that are not loaded; HSTS and compression degrade to what the host actually supports. Co-authored-by: Hakeem Shamavu <hakimushamavu@gmail.com>
…profiles, OpenSwoole runtime)
…e git hooks - Remove alfacode-team/pulse-engine and module-template submodules (composer require, path repos, .gitmodules, lock) - Bump guzzlehttp/guzzle to ^7.15.1 (clears 4 medium advisories; audit clean) - Auto-wire core.hooksPath=.githooks via composer post-install/update; broaden commit-msg trailer stripper; document in README
…ity policy, and code of conduct
…mgrep, PHPStan); add docs + plugin issue templates
…ids advanced-config conflict)
…gate - phpstan.neon.dist: analyse src/plugins/projects at level 5, scan modules/, exclude __dev__ - phpstan-baseline.neon: capture 542 pre-existing errors so only NEW issues fail CI - php-analysis.yml: PHPStan job now blocking (was continue-on-error) - fix(auth): correct stale \HKMCode\ docblock namespace in Driver port Excluded pending real-bug fixes (tracked separately): MigrateListCommand extends non-existent AbstractMigrateCommand; OutboxWriter does not satisfy OutboxPort
- MigrateListCommand extended a non-existent AbstractMigrateCommand (fatal on load) -> extend LetMigrateCommand like its sibling migrate commands - OutboxWriter now satisfies OutboxPort: write() returns the new row id via lastInsertId(); implement the missing markDispatched(int) to set status=1 - Remove both files from the PHPStan excludePaths now that they analyse cleanly
… composer audit flag - PHPStan CI had no Swoole ext, so the runtime-guarded OpenSwoole/Swoole Coroutine calls (CurlHttpClient backoff, PageflowStream) reported as undefined/impossible-type. Ignore them by pattern — behaviour is correct at runtime (class_exists/method_exists guarded). Verified green with AND without the extension loaded. - composer audit: drop invalid '--no-dev=false' (the flag takes no value)
…example - LICENSE: replace Apache-2.0 text with MIT to match composer.json (was a license mismatch); copyright Hakeem Shamavu (AlfaCode Team) - composer.json: add php ">=8.4" + required ext-* platform requirements, keywords, homepage, support links; remove duplicate license key - composer.lock: re-resolved (composer update -W) so it is in sync; audit clean - .env.example: curated core + common-plugin env template (copy to .env) - protect-main.sh: require PHPStan + composer audit checks alongside PHPUnit/Zig
📝 WalkthroughWalkthroughThe change adds a complete environment template, updates package and repository policies, consolidates Pageflow and security HTTP stages, and adds configurable tenancy path exemptions. ChangesProject configuration
Pageflow pipeline
Security response pipeline
Tenancy request exemptions
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant Request
participant PageflowStage
participant PageflowResponder
participant SessionPort
Request->>PageflowStage: Submit Pageflow request
PageflowStage->>PageflowResponder: Share responder props
PageflowStage->>SessionPort: Flash validation errors when available
PageflowStage-->>Request: Return Pageflow response
sequenceDiagram
participant Client
participant SecurityHeadersStage
participant HTTPPipeline
Client->>SecurityHeadersStage: Send request with Origin
SecurityHeadersStage->>HTTPPipeline: Continue non-preflight request
HTTPPipeline-->>SecurityHeadersStage: Return response
SecurityHeadersStage-->>Client: Add CORS and security headers
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
- Renamed PageflowSharerContract implementation to PageflowStage and merged the functionality of the previous PageflowShareStage, PageflowValidationStage, PageflowVersionStage, and PageflowPrecognitionStage into a single class. - Updated references throughout the codebase to reflect the new PageflowStage class. - Removed unused stage classes (PageflowShareStage, PageflowValidationStage, PageflowVersionStage, PageflowPrecognitionStage, and CorsStage). - Introduced SecurityHeadersStage to handle both CORS and security headers in a single stage. - Updated the Provider class to register the new PageflowStage and SecurityHeadersStage. - Adjusted helper functions and documentation to align with the new structure.
There was a problem hiding this comment.
Actionable comments posted: 7
🧹 Nitpick comments (1)
plugins/Pageflow/Http/PageflowStage.php (1)
68-79: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick winDoc comment claims route-scoping that the code doesn't implement.
The class doc says shared props run "when the route has it in scope" (lines 31-32), but the guard only checks
$container->has(PageflowResponder::class)and$container->has(PageflowSharerContract::class)— both bound unconditionally inProvider::register(). Since this stage is hooked globally atafter.load(seeProvider.phpline 112),$sharer->share()(and everypageflow_share()callback, e.g.PageflowAuth::resolve()) runs on every request through the pipeline, not just Pageflow-tagged page loads. Either the comment is inaccurate or an actual scope check (e.g.$this->isPageflow($request)) is missing.♻️ Option: gate by Pageflow request
- $container = $request->container(); - if ($container !== null + $container = $request->container(); + if ($this->isPageflow($request) + && $container !== null && $container->has(PageflowResponder::class) && $container->has(PageflowSharerContract::class) ) {🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@plugins/Pageflow/Http/PageflowStage.php` around lines 68 - 79, Update the shared-props block in PageflowStage so it only executes for Pageflow requests by applying the existing isPageflow($request) check alongside the container bindings. Keep resolving PageflowResponder and PageflowSharerContract and calling share() unchanged for matching requests, while skipping the entire sharing flow for non-Pageflow requests.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.env.example:
- Line 60: Update AUTH_SESSION_TTL in the environment template and its auth.php
consumer to use consistent units; preserve the intended 14-day remember-me
duration by setting the value to 14 when consumed as ttl_days, or convert both
configuration and consumption to seconds.
In @.github/CODEOWNERS:
- Line 5: Update the CODEOWNERS generation logic in protect-main.sh so it no
longer overwrites the tracked owner list with only the login and optional
collaborator; either stop generating .github/CODEOWNERS or preserve and validate
all required owners, including `@hakeemRash`, `@Alshatri`, and `@craftdevscommunity`.
In `@plugins/Pageflow/Http/PageflowStage.php`:
- Around line 99-105: Normalize the flashed errors in the session handling of
PageflowStage so the value consumed by Provider.php’s errors shared prop has one
predictable shape whether X-Pageflow-Error-Bag is present or absent. Update the
ERROR_FLASH_KEY payload construction while preserving field-to-message mappings
and ensuring useForm receives the expected flat error map.
- Around line 60-66: Update the rollback assignment in PageflowStage’s
precognition handling to parse PAGEFLOW_PRECOGNITION_ROLLBACK using a
boolean-aware parser, so string values such as “false” evaluate to false while
preserving the existing default when unset.
In `@plugins/SecurityFilters/Infrastructure/Http/Stages/SecurityHeadersStage.php`:
- Around line 121-140: Update resolveAllowedOrigin() so a wildcard
CORS_ALLOWED_ORIGINS configuration never reflects the request origin when
allowsCredentials() is enabled. Fail closed by returning no allowed origin for
that combination, or otherwise ensure corsHeaders() omits credentialed access;
preserve the existing wildcard response for non-credentialed requests and
explicit allow-list matching.
- Around line 76-88: Update SecurityHeadersStage so CORS responses add Origin to
Vary whenever the request includes an Origin header, not only when allowOrigin
is non-null. Before withHeaders(), merge this value with the response’s existing
Vary entries, preserving upstream values such as Accept-Encoding and avoiding
duplicates.
In `@plugins/Tenancy/Infrastructure/Http/Stages/TenantContextStage.php`:
- Around line 76-79: Reject bare "*" entries while parsing the tenancy exemption
configuration so empty wildcard prefixes are never accepted; update the relevant
parser near the path-matching logic and add a regression test proving this
configuration fails closed without bypassing tenant identification or database
rebinding.
---
Nitpick comments:
In `@plugins/Pageflow/Http/PageflowStage.php`:
- Around line 68-79: Update the shared-props block in PageflowStage so it only
executes for Pageflow requests by applying the existing isPageflow($request)
check alongside the container bindings. Keep resolving PageflowResponder and
PageflowSharerContract and calling share() unchanged for matching requests,
while skipping the entire sharing flow for non-Pageflow requests.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: a5f14c57-93ab-4d66-950e-4e7207c5a2c5
⛔ Files ignored due to path filters (1)
composer.lockis excluded by!**/*.lock
📒 Files selected for processing (19)
.env.example.github/CODEOWNERSLICENSEcomposer.jsonplugins/Pageflow/API/Contracts/PageflowSharerContract.phpplugins/Pageflow/Http/CompositePageflowSharer.phpplugins/Pageflow/Http/PageflowPrecognitionStage.phpplugins/Pageflow/Http/PageflowShareStage.phpplugins/Pageflow/Http/PageflowStage.phpplugins/Pageflow/Http/PageflowValidationStage.phpplugins/Pageflow/Http/PageflowVersionStage.phpplugins/Pageflow/Provider.phpplugins/Pageflow/Support/helpers.phpplugins/SecurityFilters/Infrastructure/Http/Stages/CorsStage.phpplugins/SecurityFilters/Infrastructure/Http/Stages/SecureHeadersStage.phpplugins/SecurityFilters/Infrastructure/Http/Stages/SecurityHeadersStage.phpplugins/SecurityFilters/Provider.phpplugins/Tenancy/Infrastructure/Http/Stages/TenantContextStage.phptools/ci/protect-main.sh
💤 Files with no reviewable changes (6)
- plugins/SecurityFilters/Infrastructure/Http/Stages/CorsStage.php
- plugins/Pageflow/Http/PageflowPrecognitionStage.php
- plugins/Pageflow/Http/PageflowShareStage.php
- plugins/SecurityFilters/Infrastructure/Http/Stages/SecureHeadersStage.php
- plugins/Pageflow/Http/PageflowVersionStage.php
- plugins/Pageflow/Http/PageflowValidationStage.php
…gle PageflowStage
|
done reviewing |
Summary
Closes #
Type of change
master→main, includes a CHANGELOG version bump)Target branch
master(development), ormaster→mainrelease PR and adds a## [x.y.z] - YYYY-MM-DDsection toCHANGELOG.md.How has this been tested?
Checklist
declare(strict_types=1);.module.json/proj.json, not in PHP.config[].\PDOException/SDK exceptions escape).## [Unreleased]entry toCHANGELOG.md.Screenshots / notes (optional)
Summary by CodeRabbit
New Features
Documentation & Chores