Uh oh!
There was an error while loading. Please reload this page.
Lazy definition - #58
Conversation
xepozz
commented
Nov 20, 2022
| Q | A |
|---|---|
| Is bugfix? | ❌ |
| New feature? | ✔️ |
| Breaks BC? | ❌ |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@## master #58 +/- ##
============================================
+ Coverage 98.43% 99.55% +1.11% - Complexity 230 243 +13
============================================
Files 14 17 +3 Lines 510 667 +157 ============================================
+ Hits 502 664 +162 + Misses 8 3 -5 ☔ View full report in Codecov by Sentry. |
xepozz
commented
Nov 20, 2022
Tests fail because of |
samdark
commented
Jun 30, 2023
Need README update describing the feature and when it should be useful. |
samdark
commented
Jun 30, 2023
And a CHANGELOG entry. |
# Conflicts: # src/DynamicReferencesArray.php
vjik
left a comment
There was a problem hiding this comment.
Also need:
- fix static analysis;
- add classes from new optional dependency to composer require checker configuration for ignore;
- add lines to changelog (new definition and change normalizier behavior)
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Sergei Predvoditelev <sergei@predvoditelev.ru>
vjik
commented
Aug 2, 2023
It remains only to add information to changelog. |
Uh oh!
There was an error while loading. Please reload this page.
# Conflicts: # .github/workflows/build.yml # .github/workflows/mutation.yml # tests/Unit/Helpers/DefinitionResolverTest.php # tests/Unit/Helpers/DefinitionValidatorTest.php
mougrim
commented
Apr 16, 2024
samdark
commented
Apr 16, 2024
@mougrim Yeah. Testing it. |
mougrim
commented
Apr 18, 2024
@samdark I've got error: Maybe need to add some fix to \Yiisoft\Definitions\Helpers\DefinitionValidator::isValidObject, like: |
samdark
commented
Apr 18, 2024
@xepozz can you take a look? |
mougrim
commented
Apr 22, 2024
Quite the same trace, if I use lazy-services from yiisoft/di: I'm using the following config: MyClass::class => newLazyDefinition(
MyClass::class,
MyClass::class,
), |
xepozz
commented
Apr 22, 2024
mougrim
commented
Apr 23, 2024
@xepozz, thank you! MyClass::class => newLazyDefinition(
[ArrayDefinition::CLASS_NAME => MyClass::class],
MyClass::class,
),And got the same error: Maybe I do something wrong. Array-like definition is working 👍 : MyClass::class => [
'lazy' => true,
],But if I forgot to install friendsofphp/proxy-manager-lts, then I got error: Maybe better to show suggestion about installing friendsofphp/proxy-manager-lts. |
xepozz
commented
Apr 25, 2024
MyClass::class => newLazyDefinition(
[ArrayDefinition::CLASS_NAME => MyClass::class],
MyClass::class,
),It's the way if you want to use laziness directly with the
Hmm, it must be shown https://github.com/yiisoft/definitions/pull/58/files#diff-d2ab9925cad7eac58e0ff4cc0d251a937ecf49e4b6bf57f8b95aab76648a9d34R42-R44 |
mougrim
commented
Apr 27, 2024
Yes, but if you don't need lazy at once, you don't install suggested dependency. So, you could check if validation is enabled: Anyway I think it's not critical. |