11.
More Laziness Attributes
Keep on Learning!
If you liked what you've learned so far, dive in! Subscribe to get access to this tutorial plus video, code and script downloads.
If you liked what you've learned so far, dive in! Subscribe to get access to this tutorial plus video, code and script downloads.
Whoops, an error! Please, try again later.
11 Comments
Hello,
In the script, using
method: 'volumeToHigh', gives the same error for me: Cannot create lazy closure because its corresponding callable is invalid.I replaced it with volumeTooHigh and it worked !
Hey alpernuage,
Yes, it should be
volumeTooHighinstead ofvolumeToHigh, you have a type in 1 char in the first version. I don't see we usevolumeToHighsomewhere in the video or scripts. If you see we use it somewhere - please, refer me to the exact code block or a specific time in the video and I will fix it :)Cheers!
Hi Victor,
Thanks for your reply!
Actually, I didn’t follow the video since I don’t have a SymfonyCasts subscription🙈 — I was just following the code shown on the script page. That’s where I noticed the volumeToHigh typo.
Cheers,
Alper
Hey @alpernuage ,
Hm, I can't find any
volumeToHighin the scripts or code 🙃 Ok, if you find one - definitely point me to that and I will fix. Otherwise, it either was already fixed or you just made a typo I guess?Cheers!
Sorry for not being clear earlier — I wanted to share a screenshot but couldn’t upload it before.
Here it is: https://ibb.co/YFwhC5St
After the sentence
“Make this multiline to give us some more room. Add a second argument: method: 'volumeTooHigh':”
the usage is correct: method: 'volumeTooHigh',
However, 4 code blocks on this page contain the wrong version volumeToHigh: in this section
👉 https://symfonycasts.com/screencast/dependency-injection-attributes/more-laziness-attributes#code-autowirecallable-code
They appear after expanding the code sections (with the two arrows) in these parts:
Hope that helps clarify it! 🙈
Hey @alpernuage,
I see it now, thanks for sharing more details on it. I fixed the affected code blocks on that page. Yes, as you figured out, the correct version should be
volumeTooHigh:)Cheers!
Hello:
Everything was going well until class 11, when I finished coding according to the instructions, and when I tried to run the application, the following error appeared:
Cannot create lazy closure because its corresponding callable is invalid.
Hey @giorgiocba,
Ak, I did see this error a while ago and made a note to come back and check it out but now I can't re-recreate it! Let's see if we can figure this out.
startdirectory?composer.locklike runcomposer update?lazy: truedoes it work?--Kevin
If you remove lazy: true does it work? This is the solution
Thanks for the update! I think somehow there was a bug with some combination of Symfony/PHP versions. I've tried a bunch of permutations but can't re-create.
Thanks, Kevin. I'll check out all the options.
"Houston: no signs of life"
Start the conversation!