Skip to content

Conversation

@tuyennn
Copy link
Contributor

@tuyennn tuyennn commented Aug 16, 2024

Error log while upgrading version on Magento >= 2.4.4

There is an error in /vendor/tawk/widget/Setup/UpgradeData.php at line: 97
Class "Zend_Uri_Http" not found#0 /vendor/tawk/widget/Setup/UpgradeData.php(75): Tawk\Widget\Setup\UpgradeData->getStoreHost()
#1 /vendor/tawk/widget/Setup/UpgradeData.php(54): Tawk\Widget\Setup\UpgradeData->versionUpdate160()

Apparently, this was not completely support Magento >= 2.4.4 as https://github.com/tawk/tawk-magento-2/blob/v1.6.0/Setup/UpgradeData.php#L97 Zend_Uri_Http was removed, in this case to make thing compatibility support Magento >= 2.4.4 and Magento < 2.4.4 consider to use:
parse_url()

Or use Laminas\Uri\Http for support Magento >= 2.4.4 only

Fix #37

@gkopec
Copy link

gkopec commented Sep 2, 2024

Will this be merged to master branch?

@eug-L
Copy link
Contributor

eug-L commented Sep 9, 2024

Hi @tuyennn thanks for opening a PR, may I know how do you reproduce the error?

@tuyennn
Copy link
Contributor Author

tuyennn commented Sep 9, 2024

@eug-L this can be reproduced while running Magento >= 2.4.4 and perform upgrade tawk/widget < 1.6.0 to 1.6.0, happened every times while anyone tried to upgrade the Magento also update their modules accordingly

@eug-L
Copy link
Contributor

eug-L commented Sep 9, 2024

@tuyennn
I found that the error with Zend_Uri_Http is due to the dependency magento/zendframework1 being removed from Magento since 2.4.6. parse_url() does seem like a good alternative

I also managed to find this error, which you have fixed as well

Deprecated Functionality: preg_split(): Passing null to parameter #2 ($subject) of type string is deprecated in /bitnami/magento/vendor/tawk/widget/Setup/UpgradeData.php on line 119

Thank you for fixing these issues!

@CLAassistant
Copy link

CLAassistant commented Sep 9, 2024

CLA assistant check
All committers have signed the CLA.

@eug-L
Copy link
Contributor

eug-L commented Sep 9, 2024

@tuyennn
Before we can merge this PR, we kindly ask that you sign the CLA. This is to ensure we can safely use your code.

@eug-L eug-L merged commit a952e88 into tawk:master Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Prevent to install on php >= 8.1

4 participants