0

I have two Magento sites both v2.3.3 I have noticed today that I cannot run the compile function: php -dmemory_limit=4G bin/magento setup:di:compile I'm getting the following error:

Application code generator... 3/7 [=====>-------] 42% 18 secs 254.0 MiB In ErrorHandler.php line 61:Deprecated Functionality: Array and string offset access syntax with curlybraces is deprecated in /home/customer/www/mystagingsite.com/public_html/vendor/magento/framework/GraphQl/Config/Element/FieldFactory.php on line 49 

I have no idea why or what has caused this. Has anyone else experienced the same and what is the issue/solution please? PS. I changed the curly brackets in the file from { } to [ ] on line 49 of the mentioned file but then got the following error:

Application code generator... 3/7 [=====>-------] 42% 20 secs 272.0 MiB In ErrorHandler.php line 61: Deprecated Functionality: Unparenthesized `a ? b : c ?: d` is deprecated. Use either `(a ? b : c) ?: d` or `a ? b : (c ?: d)` in /home/customer/www/mystagingsite.com/public_html/vendor/magento/framework-message-queue/BatchConsumer.php on line 154 

This is so odd. Please help if you can Andy

2
  • Did you checked with php version? did you updated php version recently? Commented Jul 7, 2021 at 7:53
  • The php version updated automatically on the server from 7.3 to 7.4 I reverted this back to 7.3 but the issue persists. Hosting with SiteGround and using there dashboard to change php versions. Commented Jul 7, 2021 at 9:05

2 Answers 2

0

Update: My hosting company has set php 7.4 as the default so to access v 7.3 when running scripts I had to specify the php version - /usr/local/php73/bin/php-cli

Hope this helps others.

0
  • Basically you need check

==========================

 Inside your Magento Directory 1) Which version of Php you are Using - sudo update-alternatives --config php 2) Check your Magento Version - sudo bin/magento --version Make Sure as per your Magento Version - Required Php Version is Selected 

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.