Upgrade the OauthCompanyUser module
Edit on GitHubUpgrading from version 1.x.x to 2.x.x
OauthCompanyUser module version 2.0.0 brings two major changes:
- GLUE layer has been moved from Glue
OauthCompanyUsertoCompanyUserAuthRestApi(see Upgrade the CompanyUserAuthRestApi module for more details). OauthCompanyUserConfig::OAUTH_CLIENT_IDENTIFIER,OauthCompanyUserConfig::OAUTH_CLIENT_SECRETconstants have been removed.
BC Breaking changes:
- Moved Glue layer to the
CompanyUserAuthRestApimodule. - Removed
OauthCompanyUserConfig::getClientSecret(). - Removed
OauthCompanyUserConfig::getClientId(). - Removed
OauthCompanyUserConstants::OAUTH_CLIENT_IDENTIFIER. - Removed
OauthCompanyUserConstants::OAUTH_CLIENT_SECRET. - Removed
OauthCompanyUserClient::getClientSecret(). - Removed
OauthCompanyUserClient::getClientId().
Estimated migration time: ~10m
To upgrade to the new version of the module, do the following:
- Update composer:
composer require spryker/oauth-company-user: "^2.0.0" --update-with-dependencies
- Generate transfer:
vendor/bin/console transfer:generate
- Remove constants in the
config/Shared/config_default.php,config/Shared/config_default-development.php, andconfig/Shared/config_default-devtest.phpfiles:
$config[OauthCompanyUserConstants::OAUTH_CLIENT_IDENTIFIER] = '';
$config[OauthCompanyUserConstants::OAUTH_CLIENT_SECRET] = '';
Instead of this usage, use constants from the Oauth module:
$config[OauthConstants::OAUTH_CLIENT_IDENTIFIER] = '';
$config[OauthConstants::OAUTH_CLIENT_SECRET] = '';
- In the
\Pyz\Glue\AuthRestApi\AuthRestApiDependencyProvider::getRestUserExpanderPlugins()replaceSpryker\Glue\OauthCompanyUser\Plugin\AuthRestApi\CompanyUserRestUserMapperPlugintoSpryker\Glue\CompanyUserAuthRestApi\Plugin\AuthRestApi\CompanyUserRestUserMapperPlugin:
- use Spryker\Glue\OauthCompanyUser\Plugin\AuthRestApi\CompanyUserRestUserMapperPlugin;
+ use Spryker\Glue\CompanyUserAuthRestApi\Plugin\AuthRestApi\CompanyUserRestUserMapperPlugin;
Thank you!
For submitting the form