cancel
Showing results for 
Search instead for 
Did you mean: 

Backward compatibility with Magento 2.2 and therefore PHP 7.0

Backward compatibility with Magento 2.2 and therefore PHP 7.0

I have built extension for Magento 2.3. Now I want to add support for 2.2.

I have controller which implements CsrfAwareActionInterface, which doesn't exist in 2.2 and is not compatible with PHP 7.0.

My idea was to use different controllers based on Magento version and it works fine. 
But I can't add that version to marketplace since automatic tests won't pass since PHP 7.0 tests will give errors since CsrfAwareActionInterface is not compatible with PHP 7.0 (despite that that controller never gets used in 2.2).

 

My question is how should I handle this? Can I add different extension versions for different Magento versions? I'm sure there is information for this, but I couldn't find it.