Commit Graph

396 Commits

Author SHA1 Message Date
8b1cde874e test: trigger build with build override fix 2025-11-04 15:33:06 +01:00
2e539ed330 fix(deployment): explicitly override build sections with null in production
Added 'build: null' to web, php, and queue-worker services in docker-compose.production.yml
to explicitly remove build sections inherited from base config.

This fixes 'lstat /home/deploy/deployment/stacks/application/docker/php: no such file or directory'
error during deployment, as production servers only have docker-compose files, not build context.

Registry-based deployment should pull pre-built images, not attempt to build on production server.
2025-11-04 15:32:36 +01:00
3644621b00 test: trigger build with updated IMAGE_TAG fix 2025-11-04 15:22:39 +01:00
08f6f64d72 fix(ci): use stable git-SHA tag for deployment instead of timestamp
Changed IMAGE_TAG output from timestamp-based format to stable git-SHA format to ensure
deployment can reliably pull the image that was actually pushed to the registry.

Before: IMAGE_TAG="6c7040e-1762265632" (changes with time)
After: IMAGE_TAG="git-6c7040e" (stable, matches pushed tag)

This fixes deployment manifest not found errors.
2025-11-04 15:20:34 +01:00
6c7040e049 test: trigger production deployment pipeline 2025-11-04 15:10:07 +01:00
0b342c68bb fix(ci): change docker build to load then push tags sequentially
Docker registry was getting overwhelmed with concurrent pushes of
multiple tags and cache layers, resulting in 499 status code
(Client Closed Request).

Changes:
- Build with --load instead of --push to save image locally first
- Push each tag sequentially (latest, timestamp, git-sha) instead of all at once
- Reduce cache targets from 2 to 1 (keep only buildcache)
- Add progress logging for each push operation

This approach:
1. Reduces concurrent write pressure on registry
2. Allows better error handling per tag
3. Provides clearer progress feedback
4. Prevents registry timeouts from concurrent uploads

Related to: Status 499 error during docker push
2025-11-04 15:04:57 +01:00
f97863af40 fix(deployment): add image references to docker-compose.production.yml
Production deployment was failing because docker-compose.production.yml
had build: sections but no image: references. This caused Docker Compose
to attempt building on the server, which failed because the docker/
directory doesn't exist in the deployment location.

Changes:
- Add image: git.michaelschiemer.de:5000/framework:latest to web, php, and queue-worker services
- Removed build: section from php service (no longer needed)
- Remove test comment from ShowHome.php

The deployment script's sed command (line 1259-1260 in build-image.yml)
now successfully finds and updates the image: tags with the correct
version from the registry.

Related to: Production deployment error "docker/php: no such file or directory"
2025-11-04 14:52:45 +01:00
5b5fdeeba7 test: trigger production deployment pipeline 2025-11-04 14:42:24 +01:00
a1b9a53b32 chore: remove temporary CI test file 2025-11-04 14:28:22 +01:00
0b54086851 fix(ci): remove actions/cache step that requires Node.js
- Gitea runner doesn't have Node.js installed
- actions/cache@v4 requires Node.js runtime
- vendor/ caching handled by runner workspace persistence
2025-11-04 14:28:00 +01:00
6263d7ab50 test(ci): trigger CI workflow verification 2025-11-04 14:18:36 +01:00
bfce93ce77 refactor(console, id, config): Dialog mode in Console, consolidated id modul, added config support for ini directives 2025-11-04 13:44:27 +01:00
980714f656 refactor(logging): remove redundant log record creation in DefaultLogger handlers loop 2025-11-04 11:10:51 +01:00
02e4dc9338 feat(local-secrets): introduce unified local secrets management and documentation
- Add example secret files for `app_key`, `db_user_password`, and `redis_password`.
- Introduce `local.vault.yml.example` for Ansible Vault encryption of local secrets.
- Create migration and setup scripts for transitioning from `.env.local` to secrets files.
- Update `docker-compose.local.yml` to adopt Docker Secrets and `_FILE` pattern for local configurations.
- Add deployment playbooks and enhanced logging configurations for local development.
2025-11-04 11:06:21 +01:00
12afbe874d refactor(container): simplify Redis pool initialization flow
- Remove redundant `$container` parameter in `RedisPoolInitializer` instantiation.
- Streamline container interactions for improved clarity and maintainability.
2025-11-04 02:43:45 +01:00
315b54a209 refactor(container): simplify Redis pool initialization flow
- Remove redundant `$container` parameter in `RedisPoolInitializer` instantiation.
- Streamline container interactions for improved clarity and maintainability.
2025-11-04 02:10:15 +01:00
e68c25f004 refactor(redis): refine connection handling and pool singleton initialization
- Mark `RedisConnection::$connected` as read-only with `private(set)`.
- Simplify authentication and database selection logic in `RedisConnection`.
- Comment out DI container singleton registration in `RedisPoolInitializer`.
- Annotate `RedisConnectionPool` with `#[Singleton]` attribute for improved clarity.
2025-11-04 02:00:47 +01:00
e8f6b239c6 refactor(redis, discovery, cache): enhance validation, error handling, and class filtering
- Remove redundant fallback for `RedisConfig` key prefix to enforce explicit configuration.
- Refine `ClassExtractor` with class name validation to exclude invalid identifiers and handle creation errors.
- Improve `AttributeCache` by validating class existence before reflection, preventing unnecessary exceptions and caching empty results on failure.
2025-11-04 01:44:26 +01:00
3606a13ab9 refactor(redis, discovery, cache): streamline configuration defaults, logging, and error handling
- Remove default values for `RedisConfig` constructor to enforce explicit configuration.
- Enhance `FileStreamProcessor` logging by adding `LogContext` with exception details.
- Replace `humanReadable` method call with `toHumanReadable` in `DiscoveryCompletedEvent`.
- Remove redundant error trace logging in `CacheInitializer` for cleaner fallback handling.
2025-11-04 01:26:27 +01:00
f83b61d80f refactor(discovery): improve dependency analysis with enhanced namespace resolution and error handling
- Introduce `normalizeTypeName` to validate and normalize type names during dependency analysis.
- Add `safeCreateClassName` to handle `ClassName` creation errors gracefully.
- Enhance constructor, method, property, and return type dependency edge creation with context-aware namespace resolution.
- Improve logging to capture failure details and provide debugging insights.
2025-11-04 01:08:06 +01:00
1a31ce66c9 refactor(discovery): clarify file processing error message in FileProcessor logging 2025-11-04 01:05:03 +01:00
3085739e34 feat(filesystem): introduce FileOwnership and ProcessUser value objects
- Add `FileOwnership` to encapsulate file owner and group information.
- Add `ProcessUser` to represent and manage system process user details.
- Enhance ownership matching and debugging with structured data objects.
- Include new documentation on file ownership handling and permission improvements.
- Prepare infrastructure for enriched error handling in filesystem operations.
2025-11-04 00:56:49 +01:00
30d15d1b20 refactor(discovery): enhance exception handling and logging context in FileProcessor
- Add `DiscoveryErrorCode` and `FileSystemErrorCode` to improve error classification in `DiscoveryException`.
- Integrate `LogContext` into `FileProcessor` warnings for enriched logging details.
- Simplify `Environment` variable handling by removing redundant condition checks.
2025-11-04 00:22:10 +01:00
56f09b5001 docs(cache): add comprehensive cache configuration and permission handling guides
- Introduce `cache-configuration.md` for detailed instructions on cache setup, permission troubleshooting, and best practices.
- Add `cache-permissions-quick-fix.md` for concise resolutions to common permission errors.
- Include a detailed `FILECACHE_PERMISSION_FIX_PLAN.md` outlining solutions for permission-related issues.
- Enhance `docker-entrypoint.sh` with permission fixes for multi-user caches.
- Update `Makefile` with cache clear commands for local and staging environments.
- Improve `FileCache` for graceful degradation on permission errors, ensuring reliability under multi-user scenarios.
2025-11-03 23:54:27 +01:00
a1242f776e refactor(config): add EnumResolver for cache-backed enum resolution and extend DockerSecretsResolver with caching
- Introduce `EnumResolver` to centralize and cache enum value conversions.
- Enhance `DockerSecretsResolver` with result caching to avoid redundant file reads and improve performance.
- Update `Environment` to integrate `EnumResolver` for enriched enum resolution support and improved maintainability.
- Adjust unit tests to validate caching mechanisms and error handling improvements.
2025-11-03 23:47:08 +01:00
2a0c797051 refactor(cache): improve file handling and introduce robust locking mechanisms
- Refactor `FileCache` methods to enhance file operation consistency and error handling.
- Integrate `LockableStorage` for improved locking with fallback to manual lock implementations.
- Replace `glob` usage with `FileSystem` module for directory operations, improving maintainability and testability.
- Optimize cache file listing, filtering, and expiration handling for better performance and reliability.
- Streamline directory and file deletion logic with additional error resilience.
2025-11-03 23:30:07 +01:00
a071bea39e refactor(view): replace DefaultContainer with Container in TemplateProcessorInitializer
- Simplify constructor dependency by substituting `DefaultContainer` with `Container`.
2025-11-03 22:56:49 +01:00
1af63ed7ec refactor(view): simplify dependency injection for template initializers
- Replace `DefaultContainer` lookups with direct constructor injection in `TemplateProcessorInitializer` and `TemplateRendererInitializer`.
- Streamline method logic by removing redundant operations and ensuring dependencies are passed explicitly.
- Enhance readability and maintainability by reducing unnecessary indirections.
2025-11-03 22:48:27 +01:00
84a5a3fa21 chore(ci): update build workflow for targeted path triggers and concurrency management
- Refine branch and path filters for efficient CI triggers.
- Add concurrency control to avoid overlapping builds.
- Improve runtime base build logic with conditional evaluation and skipping.
- Enhance image info generation with fallback handling and deployment readiness checks.
2025-11-03 22:41:06 +01:00
a93a086ee4 refactor(di): add analysis components for dependency parsing and resolution
- Introduce `CodeParser` to extract dependencies from `container->get()` calls and `return new` statements.
- Add `DependencyPathAnalyzer` for recursive analysis of dependency paths with cycle detection.
- Implement `InitializerFinder` to locate initializers based on naming conventions.
- Include `InterfaceResolver` to determine interface implementations using introspection and initializers.
- Add `NamespaceResolver` for resolving class names from use statements and namespaces.
- Introduce `ReturnTypeAnalyzer` for method and closure return type analysis.
2025-11-03 22:38:06 +01:00
703d9b04fe refactor(di): enhance InitializerDependencyAnalyzer with fallback namespace resolution and improved return type handling
- Add fallback logic to resolve classes in the same namespace from file contents.
- Simplify `getInitializerInvokeReturnType` by reducing redundancy in return type validation.
- Extend support for detecting and resolving full class names from method return statements.
- Introduce named parameter pattern matching for return type extraction.
2025-11-03 22:08:49 +01:00
d0c36b9245 refactor(di): enhance InitializerDependencyAnalyzer with fallback and initializer-based return type analysis
- Add fallback mechanism to resolve return types for closures without explicit return types.
- Introduce methods for discovering initializer classes based on naming conventions and interface analysis.
- Implement functionality to analyze the `__invoke()` method's return types, including actual return class extraction.
- Improve dependency resolution with comprehensive initializer discovery strategies.
2025-11-03 21:56:27 +01:00
ca30385f97 refactor(di): remove debug logging from dependency analyzers
- Eliminate debug logging clutter in `CyclicDependencyException` and `InitializerDependencyAnalyzer` for cleaner production code.
- Simplify and streamline logic by removing unnecessary logs and redundant error tracing.
2025-11-03 21:45:58 +01:00
f4f367bae4 refactor(di): add debug logging for dependency and cycle analysis
- Enhance `CyclicDependencyException` and `InitializerDependencyAnalyzer` with detailed debug logging for improved diagnostics.
- Add logs for cycle detection, dependency path analysis, and interface implementation resolution.
- Refine try-catch blocks and exception handling for more granular error tracing.
2025-11-03 21:30:12 +01:00
f1888b0448 refactor(di): clean up imports and improve formatting in CyclicDependencyException 2025-11-03 21:14:35 +01:00
247a046f51 feat(di, cache): add proactive initializer discovery and caching mechanics
- Introduce `InitializerDependencyAnalyzer` to support dependency analysis during cyclic exceptions.
- Add proactive initializer discovery with `InitializerCacheUpdater` for improved performance.
- Integrate discovery cache updates and error handling for seamless caching of found initializers.
- Extend `CyclicDependencyException` with `InitializerDependencyAnalyzer` for enhanced diagnostics and cycle analysis.
2025-11-03 21:08:20 +01:00
1655248de5 feat(di): implement attribute resolver system for dependency injection
- Introduce `ParameterAttributeResolverInterface` for handling attribute-based parameter resolution.
- Add `EnvAttributeResolver` to inject environment variables with type conversion.
- Add `LogChannelAttributeResolver` to inject channel-specific loggers.
- Create `ParameterAttributeResolverRegistry` to manage available resolvers.
- Update `ParameterResolver` to delegate attribute resolution to the registry.
- Add comprehensive unit tests for all attribute resolvers and registry functionality.
2025-11-03 21:00:04 +01:00
9f0dfd131a refactor(di): enhance CyclicDependencyException with full path analysis and improved messaging
- Add support for full dependency path detection in `CyclicDependencyException` to identify complex cycles.
- Extend `InitializerDependencyAnalyzer` with recursive path analysis up to a maximum depth.
- Update error messages with detailed full path and actionable resolutions for improved debugging.
- Refactor problematic dependency detection to include full path context where applicable.
2025-11-03 20:52:16 +01:00
8919da8a5c refactor(logging, queue): replace RedisQueue with FileQueue for async logging
- Update `LoggerInitializer` to use `FileQueue` instead of `RedisQueue` for async logging, improving local file-based queuing.
- Remove unused `RedisQueue` and related Redis configurations.
- Modify `createQueue` to accept `PathProvider` for file path resolution.
- Revise `AGENTS.md` to add detailed AI agent usage and updated guidelines.
- Refactor `ComponentRegistryInitializer` to use explicit dependency injection for `__invoke` method, ensuring cleaner and more maintainable initialization logic.
2025-11-03 20:09:32 +01:00
f8fb9b5a45 refactor(di): add InitializerDependencyAnalyzer for enhanced dependency analysis and messaging
- Introduce `InitializerDependencyAnalyzer` to analyze constructor and `container->get()` dependencies.
- Enhance `CyclicDependencyException` with warnings for `container->get()` usage and explicit guidance for resolving cycles.
- Improve error messaging with detailed dependency sources and actionable best practices.
2025-11-03 19:51:26 +01:00
522e76e86a refactor(di): enhance CyclicDependencyException with initializer detection and improved messaging
- Extend `CyclicDependencyException` to include detailed initializer cycle analysis.
- Refactor chain message generation with initializer-specific context.
- Add methods for problematic dependency detection and initializer dependency analysis.
- Improve error messages with clearer actionable tips for initializer-related cycles.
2025-11-03 19:02:28 +01:00
da1dee7a01 refactor(di): replace end() with array_last() 2025-11-03 18:46:06 +01:00
12e793b95f refactor(di): implement temporary variable for referencing in end() function 2025-11-03 18:36:42 +01:00
6b5aaf47a4 refactor(di): enhance CyclicDependencyException with detailed chain and cycle context
- Add full dependency chain and pre-cycle segmentation for enhanced error context.
- Improve error messages with clearer formatting, initializer-specific hints, and actionable resolutions.
- Introduce initializer cycle detection to provide targeted solutions for common scenarios.
2025-11-03 18:27:09 +01:00
2b4772a922 refactor(di, cache): improve cyclic dependency handling and enhance error logging
- Refactor `CyclicDependencyException` to streamline cycle extraction logic and variable assignments.
- Improve error message formatting with clearer structure and actionable tips.
- Add detailed stack trace logging in `CacheInitializer` when Redis fails, for better debugging.
2025-11-03 18:17:31 +01:00
0fa163276e refactor(di): improve cyclic dependency handling and error messages
- Replace `FrameworkException` with `ContainerException` in `CyclicDependencyException`
- Add detection logic for cycle start and improved message formatting
- Provide actionable resolution tips in error messages
- Enhance `ClassResolutionException` to reuse `CyclicDependencyException` messages
- Add context for available bindings when a cycle is detected
2025-11-03 18:07:50 +01:00
9cad445aaf feat(di): add proactive initializer finder for interface resolution
- Add ProactiveInitializerFinder to search for initializers when not found in registry
- Add InitializerInfo value object to store initializer metadata
- Implement multi-step search strategy: DefaultImplementation, naming convention, directory, subdirectories, module
- Integrate proactive finder into DefaultContainer for better interface resolution
- Simplify AppBootstrapper by moving initialization logic to DefaultContainer
- Improve error messages in ClassNotInstantiable with proactive finder context
2025-11-03 17:45:47 +01:00
8c264f3781 feat(di): improve initializer error handling with FailedInitializerRegistry
- Add FailedInitializerRegistry to track failed initializers
- Add FailedInitializer value object to store failure context
- Enhance exception messages with failed initializer context
- Improve ClassNotInstantiable and ClassResolutionException with detailed context
- Update InitializerProcessor to register failed initializers
2025-11-03 16:48:13 +01:00
c4a4f6de07 refactor: cleanup debug logs and add explicit exit in error handling flow
- Remove redundant `error_log` statements in `RouterSetup`
- Comment out unused route analysis and subdomain checks
- Add `exit()` after error rendering in `ErrorKernel`
2025-11-03 15:59:32 +01:00
0ca382f80b refactor: add circular dependency detection and error handling in DI container
- Introduce `InitializerCycleException` for detailed cycle reporting
- Enhance `InitializerProcessor` fallback with explicit discovery order handling and logging
- Implement proactive cycle detection in `InitializerDependencyGraph`
- Improve `ClassName` and `MethodName` with `Stringable` support
2025-11-03 15:37:40 +01:00