Autowire in Services

Discussion forum for Extension Writers regarding Extension Development.
Post Reply
User avatar
david63
Registered User
Posts: 18839
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Contact:

Autowire in Services

Post by david63 »

I have been experimenting with using autowire in my services.yml files and find it far easier and more convenient.

However I getting an error after I have changed something in a file that uses the services.yml file. The error is Undefined class constant 'ERROR'. This happens after I have purged the cache but if I purge the cache for a second time then the error goes away.

Anyone any ideas?
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored
rxu
Extensions Development Team
Posts: 3456
Joined: Wed Oct 25, 2006 12:46 pm
Location: Siberia, Russian Federation
Name: Ruslan
Contact:

Re: Autowire in Services

Post by rxu »

Probably this https://github.com/phpbb/phpbb/blob/3.3 ... er.php#L60 but it's hard to say without knowing what's really happened with the services.
Paul
Infrastructure Team Leader
Infrastructure Team Leader
Posts: 27108
Joined: Sat Dec 04, 2004 3:44 pm
Location: The netherlands.
Name: Paul Sohier
Contact:

Re: Autowire in Services

Post by Paul »

You should check if you have any symfony classes in your vendor/ for your extension, and if they match the symfony version for phpBB.
User avatar
david63
Registered User
Posts: 18839
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Contact:

Re: Autowire in Services

Post by david63 »

Paul wrote:
Mon Sep 28, 2020 1:11 pm
You should check if you have any symfony classes in your vendor/ for your extension, and if they match the symfony version for phpBB.
I get the error for extensions that do not have a vendor folder.

After a bit more investigating it appears as if the error is being cached by the browser as the last time I had the error I did a hard refresh of the browser and the error disappeared.
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored
Post Reply

Return to “Extension Writers Discussion”