Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lazy service #594

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Lazy service #594

wants to merge 8 commits into from

Conversation

xepozz
Copy link
Contributor

@xepozz xepozz commented Aug 1, 2023

Q A
Is bugfix? ✔️/❌
New feature? ✔️/❌
Breaks BC? ✔️/❌
Related yiisoft/definitions#58 yiisoft/di#232 yiisoft/di#197

@what-the-diff
Copy link

what-the-diff bot commented Aug 1, 2023

PR Summary

  • Addition of a new PHP library to the project's dependencies
    Introducing a new library named "friendsofphp/proxy-manager-lts" version "^1.0" to the project, which is listed in the composer.json file. This library helps us manage proxy classes which can enhance the performance and memory usage of the application.

  • Modification of route configuration in the app
    The route addition syntax in the router.php file was changed from ->addGroup( to ->addRoute(. This update results in more standardized route registration.

  • Introduction of lazy loading for the VersionProvider class
    In the application.php file, we added lazy loading for the VersionProvider class. Lazy loading is a design pattern which defers the loading or initialization of resources until they are needed. In our case, the VersionProvider class will now only be loaded when it's actually needed, contributing to potential improvements in application performance.

  • Addition of a 'lazy' flag to API responses
    In the InfoController.php file, we now include a new key-value pair in the API response: 'lazy' => $this->versionProvider instanceof \ProxyManager\Proxy\LazyLoadingInterface . This means the response will now tell us if the versionProvider property was loaded lazily.

  • Updated Acceptance Test to check for the 'lazy' attribute
    In our tests, specifically the SiteCest.php file, we now check for the presence of 'lazy' => true in the response array from the API. This aids in verifying that the lazy-loading feature is working correctly.

@vjik vjik added the status:under development Someone is working on a pull request. label Aug 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:under development Someone is working on a pull request.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants