requirefeature from composer. Further information about this can be found in the official composer documentation.
composer.jsonfile, you can simply refer to this plugin by its technical name and its version mentioned in the respective plugin's
nameas well as the
versionmentioned here, the rest of the file is not important for this case here. You're going to need those two information to require them in your own plugin.
SwagBasicExampleplugin now, you simply have to add these two information to your own
composer.jsonas a key value pair:
requirekeyword, which now requires both the Shopware 6 version, which always has to be mentioned in your
composer.json, as well as the previously mentioned plugin and its version. Just as in composer itself, you can also use version wildcards, such as
v1.0.*to only require the other plugin's minor version to be 1.1, not taking the patch version into account when it comes to find the matching plugin version.