Skip to content

Release 0.2 (Alpha)

Compare
Choose a tag to compare
@tlmcclatchey tlmcclatchey released this 17 Feb 01:42
· 2 commits to master since this release

We are thrilled to announce the release of version 0.2 of the CommonPHP Dependency Injection library. This new version marks a significant step forward in our commitment to providing a powerful, flexible dependency injection solution for PHP developers. With a focus on enhancing functionality, improving documentation, and refining the core architecture, this release introduces several key features and fixes:

New Features:

  • Custom Instantiation with Delegate Method (#13): We've introduced a delegate method, enabling custom instantiation logic for specific classes. This feature allows developers to override the standard object creation process, offering flexibility for complex or third-party class integrations.
  • Type Declarations Requirement: Enhanced the type safety of method parameters by enforcing type declarations. This improvement ensures that dependencies are resolved correctly and consistently, promoting better coding practices.

Enhancements:

  • Exception Code System: Implemented a standardized code system for exceptions, starting at 1500. This update simplifies error handling and debugging by providing unique identifiers for common issues encountered during dependency injection.
  • Docblock Standardization: Standardized docblocks across the library for improved readability and consistency, making the codebase more accessible to developers and contributors.
  • Readonly $valueFinder Property: Marked the $valueFinder property as readonly, reinforcing the immutability of this critical component within the DependencyInjector.

Documentation Improvements:

  • Updated PHP Version Requirement: Officially updated the required PHP version to 8.3, aligning the library with the latest language features and performance enhancements.
  • Prevent .dev Folder Commits: Added measures to exclude the .dev folder from repository commits, maintaining a clean and focused codebase.
  • Enhanced Property Population: Improved the populate method to iterate through parent class properties, ensuring comprehensive property assignment through class hierarchies.
  • Clarified Callable Identification: Improved the identification and handling of string callables, ensuring accurate function and method invocation.

Bug Fixes:

  • Resolved Default Parameter Issue (#15): Addressed and fixed an issue related to handling default parameters, ensuring that default values are correctly utilized during object instantiation.

Other Changes:

  • Simplified File Docblock: Streamlined the introductory docblock for files, enhancing clarity and maintaining consistency across the library.
  • Examples and Documentation: Added examples demonstrating the use of default properties and corrected the location of autoload.php in documentation, facilitating easier learning and implementation for new users.

This release reflects our ongoing dedication to enhancing the CommonPHP Dependency Injection library's usability, reliability, and performance. We are grateful for the community's valuable feedback and contributions, which have been instrumental in shaping this update.

We invite you to explore the new features and improvements in version 0.2. Your feedback is crucial to our continuous improvement, so please share your experiences, suggestions, and contributions to help us further refine this library.

Thank you for your support and for being a part of the CommonPHP community. Happy coding!