v1.3.1
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 toutils.phpthat 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
vendordirectory location - Falls back to
$_SERVER['DOCUMENT_ROOT']if automatic detection is not possible
- First attempts to detect the path based on the
Technical Changes
-
Refactored
getEntityClass(): Now usesgetProjectPath()instead of$_SERVER['DOCUMENT_ROOT']to build entity search paths. -
Refactored
getClass(): Updated multiple instances to usegetProjectPath(), 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.1src/helpers/utils.php- New function and refactorizations
Previous Version: v1.3.0