klaviyo / magento2-klaviyo

37 stars 51 forks source link

Deprecated Functionality: strtolower(): Passing null to parameter #1 ($string) of type string is deprecated #185

Closed martinshawruroc closed 2 years ago

martinshawruroc commented 2 years ago

Hi there,

I'm trying to upgrade to Magento 2.4.4 and I have this extension installed. I'm finding that bin/magento setup:upgrade is failing and the reason is that the etc/db_schema.xml file specifies indexes but no indexType. For example, the file has:

        <index referenceId="KL_EVENTS_STATUS">
            <column name="status"/>
        </index>

Which on bin/magento setup:upgrade results in the following:

# bin/magento set:up
Cache types config flushed successfully
Cache cleared successfully
File system cleanup:
/opt/rugento/generated/code/Alma
/opt/rugento/generated/code/Auctane
/opt/rugento/generated/code/ClassyLlama
/opt/rugento/generated/code/Composer
/opt/rugento/generated/code/Fastly
/opt/rugento/generated/code/Klaviyo
/opt/rugento/generated/code/Magento
/opt/rugento/generated/code/Nosto
/opt/rugento/generated/code/Psr
/opt/rugento/generated/code/Ruroc
/opt/rugento/generated/code/StripeIntegration
/opt/rugento/generated/code/Symfony
/opt/rugento/generated/code/Yireo
The directory '/opt/rugento/generated/metadata/' doesn't exist - skipping cleanup
Updating modules:
Cache cleared successfully
Schema creation/updates:
Deprecated Functionality: strtolower(): Passing null to parameter #1 ($string) of type string is deprecated in /opt/rugento/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php on line 3483

If I manually edit the etc/db_schema.xml file so that all the indexes have an indexType attribute then I find that I don't see this error. To correct my example above:

        <index referenceId="KL_EVENTS_STATUS" indexType="btree">
            <column name="status"/>
        </index>
spicyavocadooo commented 2 years ago

I can confirm, have the same problems while updating to Magento 2.4.4 with php 8.1 Please add a fix, so we can continue with our update.

cykolln commented 2 years ago

This fix is queued up for the next release (4.0.3) with a timeline within the next two weeks

cykolln commented 2 years ago

This should be fixed in the release shipped yesterday 4.0.4