Skip to content

Releases: nowo-tech/PerformanceBundle

Release v2.0.7

02 Feb 07:35

Choose a tag to compare

feat: Enhance access records with route parameters and path

  • Added route_params (JSON) and route_path (VARCHAR 2048) fields to RouteDataRecord for improved access tracking.
  • Updated the Access Records UI to display a clickable Path column and include parameters in CSV/JSON exports.
  • Modified related services, controllers, and message handlers to support the new fields.
  • Updated documentation and changelog to reflect these changes and provide migration instructions.

Changelog

Added

  • Access records: route params and path – Each RouteDataRecord now stores the route parameters (route_params, JSON) and the request path (route_path, VARCHAR 2048) for the specific access. The Access Records table shows a Path column with a clickable link to the exact URL that was hit (e.g. /user/123). When path is not available, params are shown as JSON. CSV and JSON exports include path and params. Run php bin/console nowo:performance:create-records-table --update or nowo:performance:sync-schema after updating.

See UPGRADING for migration steps.


Commits

  • feat: Enhance access records with route parameters and path (089aa83)
  • Merge branch 'main' of github.com:nowo-tech/PerformanceBundle into main (ec11dee)
  • Apply PHP CS Fixer fixes [skip ci] (2657ad1)

Release v2.0.6

02 Feb 06:34

Choose a tag to compare

feat: Add symfony/yaml dependency and enhance cache configuration

  • Added symfony/yaml as a required dependency for loading YAML service configurations.
  • Introduced a dedicated cache configuration option for the performance bundle, allowing users to specify a custom cache pool.
  • Updated documentation to reflect the new cache features and configuration options.
  • Enhanced the changelog and upgrading guide with details on the new cache pool and its usage.

Changelog

Added

  • Dedicated cache pool – The bundle now registers a dedicated filesystem cache pool nowo_performance.cache (TTL 1h) via framework.cache.pools. PerformanceCacheService uses this pool by default instead of cache.app, isolating bundle cache from application cache.
  • Cache configuration – New nowo_performance.cache.pool option to override the cache pool (e.g. cache.app to share with the application). See CONFIGURATION.
  • TableStatusChecker: cache getMissingColumnsgetMissingColumns() results are now cached (filesystem, 5 min TTL) to reduce information_schema queries. Uses CACHE_TTL_SECONDS constant (300s) shared with tableExists and tableIsComplete.
  • symfony/yaml – Added as explicit require dependency for YamlFileLoader when loading services config.

Added (tests)

  • TableStatusCheckerTesttestGetMissingColumnsReturnsCachedValueWhenCacheHit, testTableExistsWhenNoCacheAndDatabaseReturnsTrue, testRecordsTableExistsReturnsFalseWhenConnectionFails, and additional cache/exception path tests.
  • PerformanceExtensionTesttestLoadCustomCachePoolConfiguration.
  • ConfigurationTest – Default cache.pool assertion.
  • RouteDataRecordRepositoryTesttestGetStatisticsByHourWithRouteNameAndStatusCodeFilters.
  • PerformanceAnalysisServiceTest – Correlations, efficiency with null metrics, traffic distribution with single route.
  • RouteDataWithAggregatesTestgetStatusCodes null, getStatusCodeCount for non-existent code, getStatusCodeRatio with empty codes.
  • PerformanceMetricsServiceGetRouteDataAndRoutesByEnvTesttestSetMessageBusAcceptsNull, testSetMessageBusAcceptsObject.

See UPGRADING for migration steps.


Commits

  • feat: Add symfony/yaml dependency and enhance cache configuration (189fe1a)
  • feat: Add cache configuration to performance bundle (060f8b4)
  • test: Enhance unit tests for command help, form submissions, and performance metrics (ee7fdc8)
  • Merge branch 'main' of github.com:nowo-tech/PerformanceBundle into main (9767735)
  • test: Add unit tests for handling stage and test environments (317d80b)
  • Apply PHP CS Fixer fixes [skip ci] (6529834)
  • Merge branch 'main' of github.com:nowo-tech/PerformanceBundle into main (7ad358f)
  • refactor: Update Makefile and PHPUnit configuration for improved test execution (5bd3cd3)
  • Apply PHP CS Fixer fixes [skip ci] (4ba767e)

Release v2.0.5

29 Jan 16:05

Choose a tag to compare

Release 2.0.5: docs and release notes

Changelog

Added

  • Access records: logged-in user – When access records and track_user are enabled, each RouteDataRecord can store the logged-in user: user_identifier (e.g. username, email from UserInterface::getUserIdentifier()) and user_id (stringified ID from User::getId() if present). New columns user_identifier (VARCHAR 255, nullable) and user_id (VARCHAR 64, nullable) on routes_data_records. Config: nowo_performance.track_user (default false). The Access Records UI shows a User column; CSV and JSON exports include both fields. Run php bin/console nowo:performance:create-table --update or nowo:performance:sync-schema after updating.
  • Makefile: validate-translations – New target make validate-translations runs the translation YAML validation script inside the PHP container (starts the container if needed).
  • Translation validation: block-aware duplicate detection – The script scripts/validate-translations-yaml.php now treats duplicate keys only when they appear in the same parent block. The same key under different parents (e.g. statistics.max_queries and filters.max_queries) is no longer reported as a duplicate.

Fixed

  • Security autowiring (Symfony 7/8) – Resolved "Cannot autowire service PerformanceMetricsSubscriber: argument $security has type Symfony\Component\Security\Core\Security but this class was not found." The Security dependency is now optional (?security.helper); the bundle works when SecurityBundle is not installed or when using Symfony 7+ where the old Security class was removed. User tracking is applied only when track_user is true and the security helper is available.

Added (tests)

  • PerformanceMetricsSubscriberSecurityTest – Tests for track_user with security null, with user (identifier/id), and user without getId().
  • ValidateTranslationsYamlTest – Nested-block duplicate detection, three-level nesting, comments/blank lines, default dir when no argument, duplicate at root level.
  • RecordMetricsMessageTest – getUserIdentifier/getUserId getters; RouteDataRecordTest – userIdentifier/userId setters and getters.
  • DeleteRecordsByFilterRequestTest, StatisticsEnvFilterTest, ArrayExtensionTest, PerformanceAlertTest, RecordFiltersTest, NowoPerformanceBundleTest, RouteDataWithAggregatesTest, Event/Twig component tests – Additional edge-case and coverage tests.

See UPGRADING for migration steps.


Commits

  • Release 2.0.5: docs and release notes (4948bba)

Release v2.0.4

29 Jan 11:35

Choose a tag to compare

docs: release 2.0.4 - add HTTP Referer tracking and per-route access record saving option

  • Introduced a new column referer in routes_data_records to store the HTTP Referer header.
  • Added a feature to disable saving access records for individual routes via a checkbox in the review/config modal.
  • Updated documentation to reflect these changes and provided migration steps for upgrading.

Changelog

Added

  • Access records: HTTP Referer – When access records are enabled, each RouteDataRecord now stores the HTTP Referer header (page that linked to the request). New column referer (VARCHAR 2048, nullable) on routes_data_records. The Access Records UI shows a Referer column (with link); CSV and JSON exports include the referer. Run php bin/console nowo:performance:create-table --update or nowo:performance:sync-schema after updating.
  • Per-route: disable saving access records – When access records are enabled, you can now turn off saving access records for individual routes. In the review/config modal for each route (same form as "Mark as reviewed"), a checkbox "Save access records for this route" appears. If unchecked, the bundle still updates aggregate metrics (RouteData) for that route but does not create new RouteDataRecord rows. Useful for high-traffic or internal routes where you want aggregates but not per-request history. New column save_access_records (boolean, default true) on routes_data. Run php bin/console nowo:performance:create-table --update or nowo:performance:sync-schema after updating.

See UPGRADING for migration steps.


Commits

  • docs: release 2.0.4 - add HTTP Referer tracking and per-route access record saving option (bf47c36)
  • Merge branch 'main' of github.com:nowo-tech/PerformanceBundle into main (44bc8a9)
  • Apply PHP CS Fixer fixes [skip ci] (9ab4029)

Release v2.0.3

29 Jan 08:58

Choose a tag to compare

docs: release 2.0.3 - fix getMainRequest compatibility

Changelog

Fixed

  • Request ID on sub-requests – Fixed "undefined method getMainRequest of Request" when running on Symfony or HttpFoundation versions where Request::getMainRequest() does not exist. The subscriber now uses RequestStack::getMainRequest() (or getMasterRequest() on older Symfony) to resolve the main request for sharing the request ID with sub-requests. No schema or config changes.

Commits

  • docs: release 2.0.3 - fix getMainRequest compatibility (d76ed7a)
  • fix: Enhance compatibility for Symfony < 5.3 by using RequestStack to retrieve main request (f6fbc9d)
  • Merge branch 'main' of github.com:nowo-tech/PerformanceBundle into main (6e56f38)
  • Apply PHP CS Fixer fixes [skip ci] (7970621)

Release v2.0.2

29 Jan 08:28

Choose a tag to compare

docs: release 2.0.2 - changelog, upgrading, commands

Changelog

Added

  • Request ID deduplication – When access records are enabled, the bundle assigns a unique request_id per HTTP request (shared between main and sub-requests). At most one RouteDataRecord is created per logical request, avoiding duplicate entries when multiple TERMINATE events fire (e.g. main request + fragment).
  • routes_data_records – New optional column request_id (VARCHAR 64, nullable, unique). Existing records keep request_id = NULL. Run php bin/console nowo:performance:sync-schema or your Doctrine migrations after updating.
  • Translation YAML validation – Script scripts/validate-translations-yaml.php checks translation YAML files for valid syntax and duplicate keys. CI runs it in the test job. Composer: composer validate-translations; included in composer qa.
  • Collector & diagnose: records table status – When enable_access_records is true, the Web Profiler Performance panel shows Access Records Table (exists, complete, missing columns). TableStatusChecker gains recordsTableExists(), recordsTableIsComplete(), getRecordsMissingColumns(), getRecordsTableName(), isAccessRecordsEnabled(). CLI nowo:performance:diagnose includes a Database Tables section (main table + records table) with missing columns. Missing request_id (or any entity column) is detected and the UI suggests running sync-schema or create-records-table --update.

Fixed

  • CreateRecordsTableCommand – Creating the records table from scratch now sets AUTO_INCREMENT on the id column for MySQL/MariaDB. --update now creates missing unique constraints (e.g. uniq_record_request_id on request_id) and uses the same operation order as the main table (Drop → Add → Update).
  • CreateTableCommandaddMissingIndexes() now uses getSchemaManager() for DBAL 2.x compatibility.

See UPGRADING for migration steps.


Commits

  • docs: release 2.0.2 - changelog, upgrading, commands (8547275)
  • chore: Remove 'access_statistics' translation from multiple language files (d139a81)
  • Merge branch 'main' of github.com:nowo-tech/PerformanceBundle into main (03c90d5)
  • Apply PHP CS Fixer fixes [skip ci] (d1101b4)

Release v2.0.1

29 Jan 05:40

Choose a tag to compare

Release 2.0.1: edit review, UI fixes, chart init, docs

Changelog

Added

  • Review system: edit existing review – Routes already marked as reviewed can now be edited. An "Edit review" button (pencil icon) appears for reviewed routes; the same modal opens with the form pre-filled with current values (Queries improved, Time improved). Modal title and submit button label differ when editing ("Edit Review" / "Update Review"). Flash message "Review updated" when saving an existing review. New translation keys in all locales: routes_table.edit_review, review.modal_title_edit, review.edit_review, flash.review_updated.

Fixed

  • Routes table: sort by Memory usage – Sorting by the Memory usage column now uses the numeric value (int bytes). PerformanceController::getSortValue() now includes a memoryUsage case so the table orders correctly instead of falling back to request time.
  • Charts: initialization after DOM – Chart scripts (dashboard Performance Trends, Statistics histograms, Charts component) run inside DOMContentLoaded and check for Chart and canvas before use. Avoids console errors when Chart.js is loaded in {% block scripts %} after the inline script in the content.

Changed

  • Routes table: Status Codes and Access Count – Removed the "Total responses" line from the Status Codes column (same value as Access Count). Status Codes and Access Count columns are now adjacent for easier reading.
  • Routes table: View access records – The link to access records now uses the Symfony UX Icons eye icon (bi:eye) instead of the 👁 emoji.

Commits

  • Release 2.0.1: edit review, UI fixes, chart init, docs (39b19e1)
  • Merge branch 'main' of github.com:nowo-tech/PerformanceBundle into main (d5f26c3)
  • Apply PHP CS Fixer fixes [skip ci] (0af69e6)

Release v2.0.0

28 Jan 14:06

Choose a tag to compare

chore: unify CHANGELOG and docs for v2.0.0 release

Changelog

Breaking: Entity normalization. See V2_MIGRATION.md and ENTITY_NORMALIZATION_PLAN.md.

Removed (from RouteData)

  • totalQueries, requestTime, queryTime, memoryUsage, accessCount, statusCodes, updatedAt — metrics move to aggregates from RouteDataRecord or a dedicated aggregates layer.

Added (RouteDataRecord)

  • totalQueries, queryTime, memoryUsage per access record.

Added

  • Export access records (CSV / JSON) – On the Access Records page, export individual RouteDataRecord rows via Export Records (CSV) and Export Records (JSON). Uses the same filters as the records view (env, date range, route, status code, query time, memory). Requires enable_access_records: true. New routes: nowo_performance.export_records_csv, nowo_performance.export_records_json.
  • Access Records: query time, memory, filters – Access Records page shows columns Queries, Query Time, Memory (formatted). Form filters: min/max query time (s), min/max memory (MB). Export and pagination preserve these filter params. RecordFilters and RouteDataRecordRepository support minQueryTime, maxQueryTime, minMemoryUsage, maxMemoryUsage.
  • Index dashboard: Status Codes column – Routes table shows status codes with percentage and total responses per code (descending), only codes that have records. Total responses and error-rate warning when >10% non-2xx.
  • Schema sync commandnowo:performance:sync-schema syncs both routes_data and routes_data_records with entity metadata (add missing, alter differing, optional drop with --drop-obsolete). Primary key id is never dropped.
  • Drop obsolete option--drop-obsolete for nowo:performance:create-table, nowo:performance:create-records-table, and nowo:performance:sync-schema. Drops columns that exist in DB but not in the entity.
  • Create-records-table column updates--update now also alters existing columns when type, nullable or default differ (previously only added missing columns).
  • Translations – New/updated keys for status codes, total responses, error rate, query time, memory usage, min/max query time and memory in all supported locales.

Changed

  • RouteData only holds identity (env, name, httpMethod, params) and metadata (createdAt, lastAccessedAt, reviewed, reviewedAt, reviewedBy, queriesImproved, timeImproved). Dashboard, API, notifications and exports use aggregated data or records instead of RouteData getters for metrics.
  • Collector diagnostics when disabled – Web Profiler Performance panel shows full diagnostics even when tracking is disabled (route, request time, query count, query time, environment, processing mode, table status, dependency status). Subscriber always sets configured_environments, current_environment, and route_name in the collector before any early return.
  • RebuildAggregatesCommand updates RouteData lastAccessedAt from RouteDataRecord; metrics live in records.

Fixed

  • Advanced Performance Statistics – Histograms not rendering: chart script moved to scripts_extra block so Chart.js is loaded before use; creation wrapped in IIFE with typeof Chart !== 'undefined' check.
  • Access statistics with empty route filter – When route= was present in the URL, the controller passed an empty string and no rows matched. Empty route is now normalized to null so statistics are returned for all routes.

Added (tests)

  • Models: RecordFiltersTest (query time/memory filters), DeleteRecordsByFilterRequestTest (min/max query time and memory), StatisticsEnvFilterTest, ClearPerformanceDataRequestTest.
  • Form types: StatisticsEnvFilterTypeTest, ClearPerformanceDataTypeTest, DeleteRecordTypeTest; extended RecordFiltersTypeTest and DeleteRecordsByFilterTypeTest for new fields.
  • Repository: RouteDataRecordRepositoryAdvancedTestgetPaginatedRecords and deleteByFilter with query time and memory filters; explicit calls with full parameter list.
  • DataCollector: disabledReason, configuredEnvironments / currentEnvironment, diagnostics when disabled, table/dependency status, getProcessingMode.
  • PerformanceMetricsSubscriberCollectorDiagnosticsTest, RouteDataWithAggregatesTest, SyncSchemaCommandTest.

Documentation

  • COMMANDS.md: --drop-obsolete and nowo:performance:sync-schema.
  • INSTALLATION.md: Step 5 lists main commands; note on sync-schema after entity changes.
  • UPGRADING.md: "Upgrading to 2.0.0" with migration steps; removed duplicate sections.
  • PHPDoc: all bundle PHP docblocks and comments in English (constructors, params, returns, form types, models, commands, examples).

Commits

  • chore: unify CHANGELOG and docs for v2.0.0 release (6ec2bfc)

Release v1.0.8

27 Jan 16:58

Choose a tag to compare

feat: Update default environments to include production and enhance configuration

  • Changed the default value for environments in the performance tracking configuration to include prod, ensuring production is tracked by default.
  • Removed the deprecated when@dev: condition from the configuration, allowing it to apply to all environments.
  • Updated demo project configurations to support APP_ENV=prod.
  • Added extensive test coverage for environment handling and configuration defaults.
  • Updated documentation to reflect changes in default environments and migration steps for upgrading.

Changelog

Changed

  • Default environments now include production - Changed default value for environments configuration
    • Default changed from ['dev', 'test'] to ['prod', 'dev', 'test']
    • Bundle now tracks performance in production by default
    • This is more appropriate for a performance monitoring bundle
    • Existing configurations are not affected (only applies when not explicitly configured)
    • Fixes issue where production environments were not tracked by default

Fixed

  • Demo environments configuration - Fixed demo projects to allow APP_ENV=prod
    • Updated docker-compose.yml in both Symfony 7 and Symfony 8 demos
    • Changed from hardcoded APP_ENV=dev to APP_ENV=${APP_ENV:-dev}
    • Added APP_DEBUG=${APP_DEBUG:-0} for better environment control
    • Updated Makefiles to include APP_DEBUG=1 in default .env creation
    • Removed when@dev: condition from nowo_performance.yaml in demos
    • Configuration now applies to all environments, not just dev

Added

  • Comprehensive environment configuration tests - Added extensive test coverage for environment handling
    • 5 tests for PerformanceExtension environment defaults and configurations
    • 6 tests for Configuration environment defaults and edge cases
    • 4 tests for PerformanceMetricsSubscriber environment filtering
    • 3 tests for PerformanceController diagnose suggestions
    • All tests verify the new default includes prod
    • Tests cover edge cases like empty configs, single environments, and custom environments
    • Updated existing tests to reflect new default values

Commits

  • feat: Update default environments to include production and enhance configuration (9ba8476)
  • feat: Update performance tracking configuration and enhance logging (e96d09f)

Release v1.0.6

27 Jan 15:21

Choose a tag to compare

chore: Prepare release v1.0.6

  • Fix: Symfony 7 compatibility (move help from AsCommand to configure)
  • Add: 60+ new tests for improved reliability
  • Update: CHANGELOG, UPGRADING, and RELEASE_NOTES

Changelog

Fixed

  • Symfony 7 compatibility - Fixed compatibility issue with Symfony 7.x commands
    • Moved help parameter from #[AsCommand] attribute to configure() method using setHelp()
    • Fixed "Unknown named parameter $help" error in all commands
    • All commands now use configure() method for help text (compatible with Symfony 6.x and 7.x)
    • Commands affected: check-dependencies, diagnose, create-table, create-records-table, set-route

Added

  • Comprehensive test coverage - Added 60+ new tests for improved reliability
    • 7 tests for getChartData() method covering all metrics (requestTime, queryTime, totalQueries, memoryUsage)
    • 5 tests for accessStatistics() method covering disabled states, exceptions, and date ranges
    • 7 tests for subscriber detection in diagnose page
    • 13 tests for getAvailableEnvironments() method (already in v1.0.4)
    • 16 tests for export functionality (CSV and JSON) (already in v1.0.4)
    • 12 tests for buildFiltersFromRequest() method (already in v1.0.4)
    • Improves code quality and ensures edge cases are properly handled

Commits

  • chore: Prepare release v1.0.6 (9bcb2e3)
  • refactor: Clean up command classes and enhance help documentation (5b55b11)
  • Apply PHP CS Fixer fixes [skip ci] (718577f)