Skip to content

v1.3.1

Choose a tag to compare

@coagus coagus released this 20 Jan 23:04
· 88 commits to main since this release

Enhanced Project Path Management

This version includes significant improvements to project path management, providing greater flexibility and compatibility across different execution environments.

New Features

  • New getProjectPath() function: A new helper function has been added to utils.php that automatically detects the project path. This function improves code portability by not relying solely on $_SERVER['DOCUMENT_ROOT'].

    The function uses an intelligent strategy:

    • First attempts to detect the path based on the vendor directory location
    • Falls back to $_SERVER['DOCUMENT_ROOT'] if automatic detection is not possible

Technical Changes

  • Refactored getEntityClass(): Now uses getProjectPath() instead of $_SERVER['DOCUMENT_ROOT'] to build entity search paths.

  • Refactored getClass(): Updated multiple instances to use getProjectPath(), improving consistency when searching for service and entity classes.

Benefits

  • ✅ Greater flexibility across different server configurations
  • ✅ Better compatibility with Docker containerized applications
  • ✅ More maintainable and easier to debug code
  • ✅ Enhanced support for custom project structures

Modified Files

  • composer.json - Version updated to 1.3.1
  • src/helpers/utils.php - New function and refactorizations

Previous Version: v1.3.0