Skip to content

Conversation

@HecFranco
Copy link
Contributor

🎯 Purpose

This PR improves code quality across the codebase by adding type hints, return types, and modern PHP features without affecting the public API.

🔧 Changes

Managers

  • Added type hints and return types to:
    • FileManager: Improved type safety for file operations
    • LocaleManager: Better type checking for locale management
    • TransUnitManager: Enhanced type safety for translation units

Exporters

  • Improved type hints in:
    • ExporterCollector: Better type checking for exporter collection
    • JsonExporter: Type-safe JSON export
    • PhpExporter: Type-safe PHP export
    • XliffExporter: Type-safe XLIFF export
    • YamlExporter: Type-safe YAML export

Utilities

  • Enhanced type safety in:
    • DataGridFormatter: Better type checking for grid formatting
    • DataGridRequestHandler: Type-safe request handling
    • StatsAggregator: Improved type safety for statistics

Loaders, Handlers, Storage, Events

  • Added type hints to:
    • DatabaseLoader: Type-safe database loading
    • TransUnitFormHandler: Better form handling types
    • DoctrineORMListener: Type-safe event listening
    • CleanTranslationCacheListener: Improved cache management types

✅ Testing

  • PHPUnit tests pass
  • No breaking changes to public API
  • Type safety improved
  • Code quality enhanced

📝 Breaking Changes

None - All changes are internal improvements that don't affect the public API.

🔗 Related Issues

Improves code quality and maintainability through modern PHP features.

📚 Documentation

  • Internal improvements only
  • No user-facing changes

- Add type hints and return types to Managers
  * FileManager, LocaleManager, TransUnitManager
- Improve Exporters with type hints
  * ExporterCollector, JsonExporter, PhpExporter, XliffExporter, YamlExporter
- Add type hints to Utilities
  * DataGridFormatter, DataGridRequestHandler, StatsAggregator
- Improve Loaders, Form Handlers, Storage, and Event Dispatchers
  * DatabaseLoader, TransUnitFormHandler, DoctrineORMListener, CleanTranslationCacheListener

All changes are internal improvements that enhance type safety and
maintainability without affecting public API.

Refs: #XXX
@nowo-tech nowo-tech closed this by deleting the head repository Jan 27, 2026
@bartmcleod
Copy link
Collaborator

@HecFranco How come @nowo-tech can close this and has control over the head repository? You put a lot of work into this. Can you clarify what is happening and whether we should still try to incorporate your changes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants