Skip to content

Releases: commonphp/di

Release 0.2.1 (Alpha)

04 Aug 03:28
ffdd952
Compare
Choose a tag to compare
  • Removed var_dump call from delegate method

Release 0.2 (Alpha)

17 Feb 01:42
Compare
Choose a tag to compare

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!

Version 0.1.1 - Alpha Patch - Documentation

02 Jul 17:18
Compare
Choose a tag to compare

This update includes minor changes, none of which effect functionality.

  • Made some changes to README.md which includes removing older documentation that was no longer applicable and providing a link to getcomposer.org

  • Updated composer.json to shorten the description as it was too long to fit on packagist.org

  • Enhanced PHPDoc annotations to use templates, making typing hinting and instantiation more efficient in IDE autocompletes.

Full Changelog: v0.1...v0.1.1

Version 0.1 - Alpha Release

01 Jul 17:14
Compare
Choose a tag to compare

Welcome to the first release of the CommonPHP\DependencyInjection library. This is a powerful yet easy-to-use Dependency Injection (DI) container designed to aid PHP developers in managing their project dependencies.

The key features of this release include:

  • Automatic Resolution of Dependencies: Our Dependency Injection system allows automatic resolution of dependencies for class constructors, methods, and functions.

  • Property Population: Populate properties of any object, regardless of the visibility of the properties.

  • Circular Dependency Handling: The library uses an instantiation stack to prevent issues arising from recursive dependency chains.

  • Customizable Parameter Lookup: The ValueFinder allows you to add custom lookup hooks to enhance the default lookup process.

  • Robust Exception Handling: The library provides a variety of specific exceptions to facilitate troubleshooting and debugging.

As this is the first release, we encourage you to explore these features and provide us with your valuable feedback.

To get started with the library, please refer to the README.md file or the project Wiki for documentation and examples. If you find any issues or have any suggestions, feel free to create an issue in the GitHub repository.

This release marks the beginning of our journey. Stay tuned for more enhancements and features in the upcoming versions.

Your contribution and support are crucial to the success of this project. Please read our contributing guidelines if you're interested in contributing.