diff --git a/.gitignore b/.gitignore index f18c018..e17f58f 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,7 @@ npm-debug* # PHP-CS-Fixer .php_cs .php_cs.cache + +# Codeception +codeception.yml +*/codeception.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6fda076..7935c49 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -47,9 +47,9 @@ test backend: - sudo rm /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini script: - composer install - - php tests/codeception/bin/yii rbac/generate - - ./docker/php/wait-for-it.sh "${DB_HOST}:3306" -s -t 0 -- "php tests/codeception/bin/yii migrate/up --interactive=0" - - vendor/bin/codecept run -c tests + - php yii rbac/generate + - ./docker/php/wait-for-it.sh "${DB_HOST}:3306" -s -t 0 -- "php yii migrate/up --interactive=0" + - vendor/bin/codecept run test frontend: image: node:9.2.1-alpine diff --git a/.php_cs.dist b/.php_cs.dist index a8fc27d..4acb35a 100644 --- a/.php_cs.dist +++ b/.php_cs.dist @@ -5,11 +5,11 @@ $finder = \PhpCsFixer\Finder::create() ->exclude('docker') ->exclude('frontend') ->notPath('common/emails/views') + ->notPath('common/mail/layouts') ->notPath('/.*\/runtime/') ->notPath('autocompletion.php') - ->notPath('tests/codeception/_output') - ->notPath('/tests\/codeception\/.*\/_output/') - ->notPath('/tests\/codeception\/.*\/_support\/_generated/') + ->notPath('/.*\/tests\/_output/') + ->notPath('/.*\/tests\/_support\/_generated/') ->name('yii'); return \Ely\CS\Config::create() diff --git a/api/codeception.dist.yml b/api/codeception.dist.yml new file mode 100644 index 0000000..527e806 --- /dev/null +++ b/api/codeception.dist.yml @@ -0,0 +1,26 @@ +namespace: api\tests +actor_suffix: Tester +paths: + tests: tests + log: tests/_output + data: tests/_data + helpers: tests/_support +settings: + bootstrap: _bootstrap.php + colors: true + memory_limit: 1024M +coverage: + enabled: true + remote: true + whitelist: + include: + - ./* + exclude: + - aop/* + - config/* + - runtime/* + - tests/* + - web/* + - codeception.dist.yml + - codeception.yml + c3url: 'http://localhost/api/web/index.php' diff --git a/api/components/User/IdentityInterface.php b/api/components/User/IdentityInterface.php index f9f589f..1228483 100644 --- a/api/components/User/IdentityInterface.php +++ b/api/components/User/IdentityInterface.php @@ -12,7 +12,7 @@ interface IdentityInterface extends \yii\web\IdentityInterface { * @throws \yii\web\UnauthorizedHttpException * @return IdentityInterface */ - public static function findIdentityByAccessToken($token, $type = null): IdentityInterface; + public static function findIdentityByAccessToken($token, $type = null): self; /** * Этот метод используется для получения токена, к которому привязаны права. diff --git a/tests/codeception/config/api/config.php b/api/config/config-test.php similarity index 59% rename from tests/codeception/config/api/config.php rename to api/config/config-test.php index c6ea4c5..7e5ff0c 100644 --- a/tests/codeception/config/api/config.php +++ b/api/config/config-test.php @@ -1,7 +1,4 @@ [ 'user' => [ @@ -12,18 +9,13 @@ return [ 'secret' => 'private-key', ], ], - 'modules' => [ - 'authserver' => [ - 'host' => 'localhost', - ], - ], 'params' => [ - 'authserverHost' => 'authserver.ely.by', + 'authserverHost' => 'localhost', ], 'container' => [ 'definitions' => [ - Validator::class => function() { - return new class(new Client()) extends Validator { + api\components\ReCaptcha\Validator::class => function() { + return new class(new GuzzleHttp\Client()) extends api\components\ReCaptcha\Validator { protected function validateValue($value) { return null; } diff --git a/api/config/config.php b/api/config/config.php index ffe0ee2..46a30f9 100644 --- a/api/config/config.php +++ b/api/config/config.php @@ -1,15 +1,12 @@ 'accounts-site-api', 'basePath' => dirname(__DIR__), - 'bootstrap' => ['log', 'authserver', 'internal'], + 'bootstrap' => ['log', 'authserver', 'internal', 'mojang'], 'controllerNamespace' => 'api\controllers', - 'params' => $params, + 'params' => [ + 'authserverHost' => getenv('AUTHSERVER_HOST'), + ], 'components' => [ 'user' => [ 'class' => api\components\User\Component::class, @@ -79,10 +76,7 @@ return [ ], ], 'modules' => [ - 'authserver' => [ - 'class' => api\modules\authserver\Module::class, - 'host' => $params['authserverHost'], - ], + 'authserver' => api\modules\authserver\Module::class, 'session' => api\modules\session\Module::class, 'mojang' => api\modules\mojang\Module::class, 'internal' => api\modules\internal\Module::class, diff --git a/api/config/params.php b/api/config/params.php deleted file mode 100644 index 5412ed8..0000000 --- a/api/config/params.php +++ /dev/null @@ -1,4 +0,0 @@ - getenv('AUTHSERVER_HOST'), -]; diff --git a/api/config/routes.php b/api/config/routes.php index 9a385ef..f61cab1 100644 --- a/api/config/routes.php +++ b/api/config/routes.php @@ -1,7 +1,4 @@ ' => 'oauth/authorization/', @@ -46,8 +43,4 @@ return [ '/mojang/profiles/' => 'mojang/api/uuid-by-username', '/mojang/profiles//names' => 'mojang/api/usernames-by-uuid', 'POST /mojang/profiles' => 'mojang/api/uuids-by-usernames', - - "//{$params['authserverHost']}/mojang/api/users/profiles/minecraft/" => 'mojang/api/uuid-by-username', - "//{$params['authserverHost']}/mojang/api/user/profiles//names" => 'mojang/api/usernames-by-uuid', - "POST //{$params['authserverHost']}/mojang/api/profiles/minecraft" => 'mojang/api/uuids-by-usernames', ]; diff --git a/api/modules/accounts/controllers/DefaultController.php b/api/modules/accounts/controllers/DefaultController.php index cc7bcb9..b9ac258 100644 --- a/api/modules/accounts/controllers/DefaultController.php +++ b/api/modules/accounts/controllers/DefaultController.php @@ -15,9 +15,9 @@ use yii\web\NotFoundHttpException; class DefaultController extends Controller { public function behaviors(): array { - $paramsCallback = function() { - $id = Yii::$app->request->get('id'); - if ($id === null) { + $paramsCallback = function(): array { + $id = (int)Yii::$app->request->get('id'); + if ($id === 0) { $identity = Yii::$app->user->getIdentity(); if ($identity !== null) { $account = $identity->getAccount(); @@ -132,7 +132,7 @@ class DefaultController extends Controller { return (new TwoFactorAuthInfo($this->findAccount($id)))->getCredentials(); } - public function bindActionParams($action, $params) { + public function bindActionParams($action, $params): array { if (!isset($params['id'])) { /** @noinspection NullPointerExceptionInspection */ $account = Yii::$app->user->getIdentity()->getAccount(); @@ -145,7 +145,13 @@ class DefaultController extends Controller { } private function findAccount(int $id): Account { - $account = Account::findOne($id); + if ($id === 0) { + /** @noinspection NullPointerExceptionInspection */ + $account = Yii::$app->user->getIdentity()->getAccount(); + } else { + $account = Account::findOne($id); + } + if ($account === null) { throw new NotFoundHttpException(); } diff --git a/api/modules/accounts/models/AcceptRulesForm.php b/api/modules/accounts/models/AcceptRulesForm.php index 49ec85a..1ff9842 100644 --- a/api/modules/accounts/models/AcceptRulesForm.php +++ b/api/modules/accounts/models/AcceptRulesForm.php @@ -3,7 +3,7 @@ namespace api\modules\accounts\models; use api\aop\annotations\CollectModelMetrics; use yii\base\ErrorException; -use const \common\LATEST_RULES_VERSION; +use const common\LATEST_RULES_VERSION; class AcceptRulesForm extends AccountActionForm { diff --git a/api/modules/authserver/Module.php b/api/modules/authserver/Module.php index 793c658..b2c1b22 100644 --- a/api/modules/authserver/Module.php +++ b/api/modules/authserver/Module.php @@ -1,9 +1,10 @@ host === null) { - throw new InvalidConfigException('base domain must be specified'); - } - } - public function beforeAction($action) { if (!parent::beforeAction($action)) { return false; @@ -35,11 +24,12 @@ class Module extends \yii\base\Module implements BootstrapInterface { } /** - * @param \yii\base\Application $app the application currently running + * @param \yii\base\Application $app */ public function bootstrap($app) { + $legacyHost = $app->params['authserverHost']; $app->getUrlManager()->addRules([ - "//$this->host/$this->id/auth/" => "$this->id/authentication/", + "//{$legacyHost}/authserver/auth/" => "{$this->id}/authentication/", ], false); } @@ -59,7 +49,7 @@ class Module extends \yii\base\Module implements BootstrapInterface { * @throws NotFoundHttpException */ protected function checkHost() { - if (parse_url(Yii::$app->request->getHostInfo(), PHP_URL_HOST) !== $this->host) { + if (parse_url(Yii::$app->request->getHostInfo(), PHP_URL_HOST) !== Yii::$app->params['authserverHost']) { throw new NotFoundHttpException(); } } diff --git a/api/modules/authserver/models/RefreshTokenForm.php b/api/modules/authserver/models/RefreshTokenForm.php index 2deb3b1..282cc18 100644 --- a/api/modules/authserver/models/RefreshTokenForm.php +++ b/api/modules/authserver/models/RefreshTokenForm.php @@ -42,9 +42,7 @@ class RefreshTokenForm extends ApiForm { $accessToken->refreshPrimaryKeyValue(); $accessToken->update(); - $dataModel = new AuthenticateData($accessToken); - - return $dataModel; + return new AuthenticateData($accessToken); } } diff --git a/api/modules/mojang/Module.php b/api/modules/mojang/Module.php index 9306443..5c41899 100644 --- a/api/modules/mojang/Module.php +++ b/api/modules/mojang/Module.php @@ -1,10 +1,26 @@ params['authserverHost']; + $app->getUrlManager()->addRules([ + "//{$legacyHost}/mojang/api/users/profiles/minecraft/" => "{$this->id}/api/uuid-by-username", + "//{$legacyHost}/mojang/api/user/profiles//names" => "{$this->id}/api/usernames-by-uuid", + "POST //{$legacyHost}/mojang/api/profiles/minecraft" => "{$this->id}/api/uuids-by-usernames", + ]); + } + } diff --git a/api/modules/oauth/controllers/AuthorizationController.php b/api/modules/oauth/controllers/AuthorizationController.php index d0ad35c..03d073f 100644 --- a/api/modules/oauth/controllers/AuthorizationController.php +++ b/api/modules/oauth/controllers/AuthorizationController.php @@ -55,7 +55,10 @@ class AuthorizationController extends Controller { } private function createOauthProcess(): OauthProcess { - return new OauthProcess(Yii::$app->oauth->authServer); + $server = Yii::$app->oauth->authServer; + $server->setRequest(null); // Enforce request recreation (test environment bug) + + return new OauthProcess($server); } } diff --git a/api/modules/oauth/models/OauthClientForm.php b/api/modules/oauth/models/OauthClientForm.php index 8321a22..683e414 100644 --- a/api/modules/oauth/models/OauthClientForm.php +++ b/api/modules/oauth/models/OauthClientForm.php @@ -90,7 +90,10 @@ class OauthClientForm { } protected function isClientExists(string $id): bool { - return OauthClient::find()->andWhere(['id' => $id])->exists(); + return OauthClient::find() + ->includeDeleted() + ->andWhere(['id' => $id]) + ->exists(); } } diff --git a/api/tests/.gitignore b/api/tests/.gitignore new file mode 100644 index 0000000..3adb08b --- /dev/null +++ b/api/tests/.gitignore @@ -0,0 +1,3 @@ +functional.suite.yml +unit.suite.yml +_support/_generated diff --git a/api/tests/_bootstrap.php b/api/tests/_bootstrap.php new file mode 100644 index 0000000..e919416 --- /dev/null +++ b/api/tests/_bootstrap.php @@ -0,0 +1,10 @@ +getActor()->sendGET("/v1/accounts/{$accountId}"); + $this->getActor()->sendGET("/api/v1/accounts/{$accountId}"); } public function changePassword(int $accountId, $currentPassword = null, $newPassword = null, $newRePassword = null) { - $this->getActor()->sendPOST("/v1/accounts/{$accountId}/password", [ + $this->getActor()->sendPOST("/api/v1/accounts/{$accountId}/password", [ 'password' => $currentPassword, 'newPassword' => $newPassword, 'newRePassword' => $newRePassword, @@ -16,65 +16,65 @@ class AccountsRoute extends BasePage { } public function changeUsername(int $accountId, $currentPassword = null, $newUsername = null) { - $this->getActor()->sendPOST("/v1/accounts/{$accountId}/username", [ + $this->getActor()->sendPOST("/api/v1/accounts/{$accountId}/username", [ 'password' => $currentPassword, 'username' => $newUsername, ]); } public function changeEmailInitialize(int $accountId, $password = '') { - $this->getActor()->sendPOST("/v1/accounts/{$accountId}/email-verification", [ + $this->getActor()->sendPOST("/api/v1/accounts/{$accountId}/email-verification", [ 'password' => $password, ]); } public function changeEmailSubmitNewEmail(int $accountId, $key = null, $email = null) { - $this->getActor()->sendPOST("/v1/accounts/{$accountId}/new-email-verification", [ + $this->getActor()->sendPOST("/api/v1/accounts/{$accountId}/new-email-verification", [ 'key' => $key, 'email' => $email, ]); } public function changeEmail(int $accountId, $key = null) { - $this->getActor()->sendPOST("/v1/accounts/{$accountId}/email", [ + $this->getActor()->sendPOST("/api/v1/accounts/{$accountId}/email", [ 'key' => $key, ]); } public function changeLanguage(int $accountId, $lang = null) { - $this->getActor()->sendPOST("/v1/accounts/{$accountId}/language", [ + $this->getActor()->sendPOST("/api/v1/accounts/{$accountId}/language", [ 'lang' => $lang, ]); } public function acceptRules(int $accountId) { - $this->getActor()->sendPOST("/v1/accounts/{$accountId}/rules"); + $this->getActor()->sendPOST("/api/v1/accounts/{$accountId}/rules"); } public function getTwoFactorAuthCredentials(int $accountId) { - $this->getActor()->sendGET("/v1/accounts/{$accountId}/two-factor-auth"); + $this->getActor()->sendGET("/api/v1/accounts/{$accountId}/two-factor-auth"); } public function enableTwoFactorAuth(int $accountId, $totp = null, $password = null) { - $this->getActor()->sendPOST("/v1/accounts/{$accountId}/two-factor-auth", [ + $this->getActor()->sendPOST("/api/v1/accounts/{$accountId}/two-factor-auth", [ 'totp' => $totp, 'password' => $password, ]); } public function disableTwoFactorAuth(int $accountId, $totp = null, $password = null) { - $this->getActor()->sendDELETE("/v1/accounts/{$accountId}/two-factor-auth", [ + $this->getActor()->sendDELETE("/api/v1/accounts/{$accountId}/two-factor-auth", [ 'totp' => $totp, 'password' => $password, ]); } public function ban(int $accountId) { - $this->getActor()->sendPOST("/v1/accounts/{$accountId}/ban"); + $this->getActor()->sendPOST("/api/v1/accounts/{$accountId}/ban"); } public function pardon(int $accountId) { - $this->getActor()->sendDELETE("/v1/accounts/{$accountId}/ban"); + $this->getActor()->sendDELETE("/api/v1/accounts/{$accountId}/ban"); } } diff --git a/tests/codeception/api/_pages/AuthenticationRoute.php b/api/tests/_pages/AuthenticationRoute.php similarity index 75% rename from tests/codeception/api/_pages/AuthenticationRoute.php rename to api/tests/_pages/AuthenticationRoute.php index 6ce52f1..d926d0b 100644 --- a/tests/codeception/api/_pages/AuthenticationRoute.php +++ b/api/tests/_pages/AuthenticationRoute.php @@ -1,5 +1,5 @@ getActor()->sendPOST('/authentication/login', $params); + $this->getActor()->sendPOST('/api/authentication/login', $params); } public function logout() { - $this->getActor()->sendPOST('/authentication/logout'); + $this->getActor()->sendPOST('/api/authentication/logout'); } public function forgotPassword($login = null, $token = null) { - $this->getActor()->sendPOST('/authentication/forgot-password', [ + $this->getActor()->sendPOST('/api/authentication/forgot-password', [ 'login' => $login, 'totp' => $token, ]); } public function recoverPassword($key = null, $newPassword = null, $newRePassword = null) { - $this->getActor()->sendPOST('/authentication/recover-password', [ + $this->getActor()->sendPOST('/api/authentication/recover-password', [ 'key' => $key, 'newPassword' => $newPassword, 'newRePassword' => $newRePassword, @@ -44,7 +44,7 @@ class AuthenticationRoute extends BasePage { } public function refreshToken($refreshToken = null) { - $this->getActor()->sendPOST('/authentication/refresh-token', [ + $this->getActor()->sendPOST('/api/authentication/refresh-token', [ 'refresh_token' => $refreshToken, ]); } diff --git a/api/tests/_pages/AuthserverRoute.php b/api/tests/_pages/AuthserverRoute.php new file mode 100644 index 0000000..90649c1 --- /dev/null +++ b/api/tests/_pages/AuthserverRoute.php @@ -0,0 +1,26 @@ +getActor()->sendPOST('/api/authserver/authentication/authenticate', $params); + } + + public function refresh($params) { + $this->getActor()->sendPOST('/api/authserver/authentication/refresh', $params); + } + + public function validate($params) { + $this->getActor()->sendPOST('/api/authserver/authentication/validate', $params); + } + + public function invalidate($params) { + $this->getActor()->sendPOST('/api/authserver/authentication/invalidate', $params); + } + + public function signout($params) { + $this->getActor()->sendPOST('/api/authserver/authentication/signout', $params); + } + +} diff --git a/tests/codeception/api/_pages/BasePage.php b/api/tests/_pages/BasePage.php similarity index 76% rename from tests/codeception/api/_pages/BasePage.php rename to api/tests/_pages/BasePage.php index 8bf9dad..17e2130 100644 --- a/tests/codeception/api/_pages/BasePage.php +++ b/api/tests/_pages/BasePage.php @@ -1,7 +1,7 @@ getActor()->sendGET('/api/account/v1/info'); + } + +} diff --git a/api/tests/_pages/InternalRoute.php b/api/tests/_pages/InternalRoute.php new file mode 100644 index 0000000..c383a96 --- /dev/null +++ b/api/tests/_pages/InternalRoute.php @@ -0,0 +1,10 @@ +getActor()->sendGET('/api/internal/accounts/info', [$param => $value]); + } + +} diff --git a/tests/codeception/api/_pages/MojangApiRoute.php b/api/tests/_pages/MojangApiRoute.php similarity index 52% rename from tests/codeception/api/_pages/MojangApiRoute.php rename to api/tests/_pages/MojangApiRoute.php index 7a2a25c..3fdebb1 100644 --- a/tests/codeception/api/_pages/MojangApiRoute.php +++ b/api/tests/_pages/MojangApiRoute.php @@ -1,19 +1,19 @@ $at]; - $this->getActor()->sendGET("/mojang/profiles/{$username}", $params); + $this->getActor()->sendGET("/api/mojang/profiles/{$username}", $params); } public function usernamesByUuid($uuid) { - $this->getActor()->sendGET("/mojang/profiles/{$uuid}/names"); + $this->getActor()->sendGET("/api/mojang/profiles/{$uuid}/names"); } public function uuidsByUsernames($uuids) { - $this->getActor()->sendPOST('/mojang/profiles', $uuids); + $this->getActor()->sendPOST('/api/mojang/profiles', $uuids); } } diff --git a/api/tests/_pages/OauthRoute.php b/api/tests/_pages/OauthRoute.php new file mode 100644 index 0000000..a72aeef --- /dev/null +++ b/api/tests/_pages/OauthRoute.php @@ -0,0 +1,42 @@ +getActor()->sendGET('/api/oauth2/v1/validate', $queryParams); + } + + public function complete(array $queryParams = [], array $postParams = []): void { + $this->getActor()->sendPOST('/api/oauth2/v1/complete?' . http_build_query($queryParams), $postParams); + } + + public function issueToken(array $postParams = []): void { + $this->getActor()->sendPOST('/api/oauth2/v1/token', $postParams); + } + + public function createClient(string $type, array $postParams): void { + $this->getActor()->sendPOST('/api/v1/oauth2/' . $type, $postParams); + } + + public function updateClient(string $clientId, array $params): void { + $this->getActor()->sendPUT('/api/v1/oauth2/' . $clientId, $params); + } + + public function deleteClient(string $clientId): void { + $this->getActor()->sendDELETE('/api/v1/oauth2/' . $clientId); + } + + public function resetClient(string $clientId, bool $regenerateSecret = false): void { + $this->getActor()->sendPOST("/api/v1/oauth2/{$clientId}/reset" . ($regenerateSecret ? '?regenerateSecret' : '')); + } + + public function getClient(string $clientId): void { + $this->getActor()->sendGET("/api/v1/oauth2/{$clientId}"); + } + + public function getPerAccount(int $accountId): void { + $this->getActor()->sendGET("/api/v1/accounts/{$accountId}/oauth2/clients"); + } + +} diff --git a/api/tests/_pages/OptionsRoute.php b/api/tests/_pages/OptionsRoute.php new file mode 100644 index 0000000..2f4a2d3 --- /dev/null +++ b/api/tests/_pages/OptionsRoute.php @@ -0,0 +1,10 @@ +getActor()->sendGET('/api/options'); + } + +} diff --git a/api/tests/_pages/SessionServerRoute.php b/api/tests/_pages/SessionServerRoute.php new file mode 100644 index 0000000..677f4d5 --- /dev/null +++ b/api/tests/_pages/SessionServerRoute.php @@ -0,0 +1,26 @@ +getActor()->sendPOST('/api/minecraft/session/join', $params); + } + + public function joinLegacy(array $params) { + $this->getActor()->sendGET('/api/minecraft/session/legacy/join', $params); + } + + public function hasJoined(array $params) { + $this->getActor()->sendGET('/api/minecraft/session/hasJoined', $params); + } + + public function hasJoinedLegacy(array $params) { + $this->getActor()->sendGET('/api/minecraft/session/legacy/hasJoined', $params); + } + + public function profile($profileUuid) { + $this->getActor()->sendGET("/api/minecraft/session/profile/{$profileUuid}"); + } + +} diff --git a/tests/codeception/api/_pages/SignupRoute.php b/api/tests/_pages/SignupRoute.php similarity index 50% rename from tests/codeception/api/_pages/SignupRoute.php rename to api/tests/_pages/SignupRoute.php index 4aba204..6ab219c 100644 --- a/tests/codeception/api/_pages/SignupRoute.php +++ b/api/tests/_pages/SignupRoute.php @@ -1,18 +1,18 @@ getActor()->sendPOST('/signup', $registrationData); + $this->getActor()->sendPOST('/api/signup', $registrationData); } public function sendRepeatMessage($email = '') { - $this->getActor()->sendPOST('/signup/repeat-message', ['email' => $email]); + $this->getActor()->sendPOST('/api/signup/repeat-message', ['email' => $email]); } public function confirm($key = '') { - $this->getActor()->sendPOST('/signup/confirm', [ + $this->getActor()->sendPOST('/api/signup/confirm', [ 'key' => $key, ]); } diff --git a/tests/codeception/api/_support/FunctionalTester.php b/api/tests/_support/FunctionalTester.php similarity index 63% rename from tests/codeception/api/_support/FunctionalTester.php rename to api/tests/_support/FunctionalTester.php index 3d2b489..d39a6a2 100644 --- a/tests/codeception/api/_support/FunctionalTester.php +++ b/api/tests/_support/FunctionalTester.php @@ -1,34 +1,22 @@ $asUsername]); if ($account === null) { - throw new InvalidArgumentException("Cannot find account for username \"$asUsername\""); + throw new InvalidArgumentException("Cannot find account for username \"{$asUsername}\""); } $result = Yii::$app->user->createJwtAuthenticationToken($account, false); @@ -37,11 +25,12 @@ class FunctionalTester extends Actor { return $account->id; } - public function notLoggedIn() { + public function notLoggedIn(): void { $this->haveHttpHeader('Authorization', null); + Yii::$app->user->logout(); } - public function canSeeAuthCredentials($expectRefresh = false) { + public function canSeeAuthCredentials($expectRefresh = false): void { $this->canSeeResponseJsonMatchesJsonPath('$.access_token'); $this->canSeeResponseJsonMatchesJsonPath('$.expires_in'); if ($expectRefresh) { diff --git a/api/tests/_support/UnitTester.php b/api/tests/_support/UnitTester.php new file mode 100644 index 0000000..e7b2540 --- /dev/null +++ b/api/tests/_support/UnitTester.php @@ -0,0 +1,12 @@ +sendPOST('/feedback', [ + $I->sendPOST('/api/feedback', [ 'subject' => 'Test', 'email' => 'email@ely.by', 'type' => 0, @@ -21,7 +21,7 @@ class FeedbackCest { public function testFeedbackWithAuth(FunctionalTester $I) { $I->amAuthenticated(); - $I->sendPOST('/feedback', [ + $I->sendPOST('/api/feedback', [ 'subject' => 'Test', 'email' => 'email@ely.by', 'type' => 0, diff --git a/tests/codeception/api/functional/ForgotPasswordCest.php b/api/tests/functional/ForgotPasswordCest.php similarity index 94% rename from tests/codeception/api/functional/ForgotPasswordCest.php rename to api/tests/functional/ForgotPasswordCest.php index 72a7ef8..c9a88ff 100644 --- a/tests/codeception/api/functional/ForgotPasswordCest.php +++ b/api/tests/functional/ForgotPasswordCest.php @@ -1,8 +1,8 @@ toString(); $route->authenticate([ diff --git a/tests/codeception/api/functional/_steps/OauthSteps.php b/api/tests/functional/_steps/OauthSteps.php similarity index 94% rename from tests/codeception/api/functional/_steps/OauthSteps.php rename to api/tests/functional/_steps/OauthSteps.php index ff573b2..da3b9a6 100644 --- a/tests/codeception/api/functional/_steps/OauthSteps.php +++ b/api/tests/functional/_steps/OauthSteps.php @@ -1,9 +1,9 @@ assertArrayHasKey('timestamp', $decoded); $this->assertArrayHasKey('textures', $decoded); - $this->assertEquals($expectedUuid, $decoded['profileId']); - $this->assertEquals($expectedUsername, $decoded['profileName']); + $this->assertSame($expectedUuid, $decoded['profileId']); + $this->assertSame($expectedUsername, $decoded['profileName']); $this->assertTrue($decoded['ely']); $textures = $decoded['textures']; $this->assertArrayHasKey('SKIN', $textures); diff --git a/tests/codeception/api/functional/accounts/AcceptRulesCest.php b/api/tests/functional/accounts/AcceptRulesCest.php similarity index 77% rename from tests/codeception/api/functional/accounts/AcceptRulesCest.php rename to api/tests/functional/accounts/AcceptRulesCest.php index 07ffda2..6f556ea 100644 --- a/tests/codeception/api/functional/accounts/AcceptRulesCest.php +++ b/api/tests/functional/accounts/AcceptRulesCest.php @@ -1,8 +1,8 @@ canSeeResponseJsonMatchesJsonPath('$.passwordChangedAt'); } + public function testGetInfoAboutCurrentUser(FunctionalTester $I) { + $I->wantTo('get info about user with 0 id, e.g. current'); + $I->amAuthenticated(); + + $this->route->get(0); + $I->canSeeResponseCodeIs(200); + $I->canSeeResponseIsJson(); + $I->canSeeResponseContainsJson([ + 'id' => 1, + 'uuid' => 'df936908-b2e1-544d-96f8-2977ec213022', + 'username' => 'Admin', + 'isOtpEnabled' => false, + 'email' => 'admin@ely.by', + 'lang' => 'en', + 'isActive' => true, + 'hasMojangUsernameCollision' => false, + 'shouldAcceptRules' => false, + 'elyProfileLink' => 'http://ely.by/u1', + ]); + $I->canSeeResponseJsonMatchesJsonPath('$.passwordChangedAt'); + } + public function testGetWithNotAcceptedLatestRules(FunctionalTester $I) { $accountId = $I->amAuthenticated('Veleyaba'); diff --git a/tests/codeception/api/functional/accounts/PardonCest.php b/api/tests/functional/accounts/PardonCest.php similarity index 84% rename from tests/codeception/api/functional/accounts/PardonCest.php rename to api/tests/functional/accounts/PardonCest.php index dc1b3a1..79a6ab7 100644 --- a/tests/codeception/api/functional/accounts/PardonCest.php +++ b/api/tests/functional/accounts/PardonCest.php @@ -1,10 +1,10 @@ 'Bearer', ]); $I->canSeeResponseJsonMatchesJsonPath('$.access_token'); + $I->cantSeeResponseJsonMatchesJsonPath('$.refresh_token'); $I->canSeeResponseJsonMatchesJsonPath('$.expires_in'); } diff --git a/tests/codeception/api/functional/oauth/AuthCodeCest.php b/api/tests/functional/oauth/AuthCodeCest.php similarity index 98% rename from tests/codeception/api/functional/oauth/AuthCodeCest.php rename to api/tests/functional/oauth/AuthCodeCest.php index daccabb..9ee501d 100644 --- a/tests/codeception/api/functional/oauth/AuthCodeCest.php +++ b/api/tests/functional/oauth/AuthCodeCest.php @@ -1,9 +1,9 @@ canSeeResponseJsonMatchesJsonPath('$.data.createdAt'); } + public function testCreateApplicationWithTheSameNameAsDeletedApp(FunctionalTester $I) { + $I->wantTo('create application with the same name as the recently deleted application'); + $I->amAuthenticated('admin'); + $this->route->createClient('application', [ + 'name' => 'Deleted OAuth Client', + 'description' => '', + 'redirectUri' => 'http://some-site.com/oauth/ely', + 'websiteUrl' => 'http://some-site.com', + ]); + $I->canSeeResponseCodeIs(200); + $I->canSeeResponseIsJson(); + $I->canSeeResponseContainsJson([ + 'success' => true, + 'data' => [ + 'clientId' => 'deleted-oauth-client1', + ], + ]); + } + } diff --git a/tests/codeception/api/functional/oauth/DeleteClientCest.php b/api/tests/functional/oauth/DeleteClientCest.php similarity index 80% rename from tests/codeception/api/functional/oauth/DeleteClientCest.php rename to api/tests/functional/oauth/DeleteClientCest.php index 7a9ba67..71c6e0f 100644 --- a/tests/codeception/api/functional/oauth/DeleteClientCest.php +++ b/api/tests/functional/oauth/DeleteClientCest.php @@ -1,8 +1,8 @@ route = new IdentityInfoRoute($I); } + public function testGetErrorIfNoAccessToken(OauthSteps $I) { + $I->wantToTest('behavior when this endpoint called without Authorization header'); + $this->route->info(); + $I->canSeeResponseCodeIs(401); + $I->canSeeResponseIsJson(); + $I->canSeeResponseContainsJson([ + 'name' => 'Unauthorized', + 'status' => 401, + 'message' => 'Your request was made with invalid credentials.', + ]); + } + public function testGetErrorIfNotEnoughPerms(OauthSteps $I) { + $I->wantToTest('behavior when this endpoint called with token, that have not enough scopes'); $accessToken = $I->getAccessToken(); $I->amBearerAuthenticated($accessToken); $this->route->info(); @@ -25,6 +38,7 @@ class IdentityInfoCest { $I->canSeeResponseContainsJson([ 'name' => 'Forbidden', 'status' => 403, + 'message' => 'You are not allowed to perform this action.', ]); } diff --git a/tests/codeception/api/functional/oauth/RefreshTokenCest.php b/api/tests/functional/oauth/RefreshTokenCest.php similarity index 95% rename from tests/codeception/api/functional/oauth/RefreshTokenCest.php rename to api/tests/functional/oauth/RefreshTokenCest.php index e5185c2..6bc4051 100644 --- a/tests/codeception/api/functional/oauth/RefreshTokenCest.php +++ b/api/tests/functional/oauth/RefreshTokenCest.php @@ -1,11 +1,11 @@ wantTo('check hasJoined user to some server'); - list($username, $serverId) = $I->amJoined(); + [$username, $serverId] = $I->amJoined(); $this->route->hasJoined([ 'username' => $username, diff --git a/tests/codeception/api/functional/sessionserver/HasJoinedLegacyCest.php b/api/tests/functional/sessionserver/HasJoinedLegacyCest.php similarity index 82% rename from tests/codeception/api/functional/sessionserver/HasJoinedLegacyCest.php rename to api/tests/functional/sessionserver/HasJoinedLegacyCest.php index 8c2e07f..de0a852 100644 --- a/tests/codeception/api/functional/sessionserver/HasJoinedLegacyCest.php +++ b/api/tests/functional/sessionserver/HasJoinedLegacyCest.php @@ -1,10 +1,10 @@ wantTo('test hasJoined user to some server by legacy version'); - list($username, $serverId) = $I->amJoined(true); + [$username, $serverId] = $I->amJoined(true); $this->route->hasJoinedLegacy([ 'user' => $username, diff --git a/tests/codeception/api/functional/sessionserver/JoinCest.php b/api/tests/functional/sessionserver/JoinCest.php similarity index 95% rename from tests/codeception/api/functional/sessionserver/JoinCest.php rename to api/tests/functional/sessionserver/JoinCest.php index 1d539a1..4f44262 100644 --- a/tests/codeception/api/functional/sessionserver/JoinCest.php +++ b/api/tests/functional/sessionserver/JoinCest.php @@ -1,12 +1,12 @@ assertFalse($validator->validate('', $error)); - $this->assertEquals('error.captcha_required', $error, 'Get error.captcha_required, if passed empty value'); + $this->assertSame('error.captcha_required', $error, 'Get error.captcha_required, if passed empty value'); } public function testValidateInvalidValue() { @@ -28,7 +28,7 @@ class ValidatorTest extends TestCase { $validator = new Validator($mockClient); $this->assertFalse($validator->validate('12341234', $error)); - $this->assertEquals('error.captcha_invalid', $error, 'Get error.captcha_invalid, if passed wrong value'); + $this->assertSame('error.captcha_invalid', $error, 'Get error.captcha_invalid, if passed wrong value'); } public function testValidateWithNetworkTroubles() { diff --git a/tests/codeception/api/unit/components/User/ComponentTest.php b/api/tests/unit/components/User/ComponentTest.php similarity index 74% rename from tests/codeception/api/unit/components/User/ComponentTest.php rename to api/tests/unit/components/User/ComponentTest.php index 00f117b..8448bbe 100644 --- a/tests/codeception/api/unit/components/User/ComponentTest.php +++ b/api/tests/unit/components/User/ComponentTest.php @@ -4,16 +4,16 @@ namespace codeception\api\unit\components\User; use api\components\User\AuthenticationResult; use api\components\User\Component; use api\components\User\Identity; +use api\tests\unit\TestCase; use common\models\Account; use common\models\AccountSession; +use common\tests\_support\ProtectedCaller; +use common\tests\fixtures\AccountFixture; +use common\tests\fixtures\AccountSessionFixture; +use common\tests\fixtures\MinecraftAccessKeyFixture; use Emarref\Jwt\Claim; use Emarref\Jwt\Jwt; use Emarref\Jwt\Token; -use tests\codeception\api\unit\TestCase; -use tests\codeception\common\_support\ProtectedCaller; -use tests\codeception\common\fixtures\AccountFixture; -use tests\codeception\common\fixtures\AccountSessionFixture; -use tests\codeception\common\fixtures\MinecraftAccessKeyFixture; use Yii; use yii\web\Request; @@ -45,17 +45,17 @@ class ComponentTest extends TestCase { $result = $this->component->createJwtAuthenticationToken($account, false); $this->assertInstanceOf(AuthenticationResult::class, $result); $this->assertNull($result->getSession()); - $this->assertEquals($account, $result->getAccount()); + $this->assertSame($account, $result->getAccount()); $payloads = (new Jwt())->deserialize($result->getJwt())->getPayload(); /** @noinspection NullPointerExceptionInspection */ - $this->assertEquals(time(), $payloads->findClaimByName(Claim\IssuedAt::NAME)->getValue(), '', 3); + $this->assertEqualsWithDelta(time(), $payloads->findClaimByName(Claim\IssuedAt::NAME)->getValue(), 3); /** @noinspection SummerTimeUnsafeTimeManipulationInspection */ /** @noinspection NullPointerExceptionInspection */ - $this->assertEquals(time() + 60 * 60 * 24 * 7, $payloads->findClaimByName('exp')->getValue(), '', 3); + $this->assertEqualsWithDelta(time() + 60 * 60 * 24 * 7, $payloads->findClaimByName('exp')->getValue(), 3); /** @noinspection NullPointerExceptionInspection */ - $this->assertEquals('ely|1', $payloads->findClaimByName('sub')->getValue()); + $this->assertSame('ely|1', $payloads->findClaimByName('sub')->getValue()); /** @noinspection NullPointerExceptionInspection */ - $this->assertEquals('accounts_web_user', $payloads->findClaimByName('ely-scopes')->getValue()); + $this->assertSame('accounts_web_user', $payloads->findClaimByName('ely-scopes')->getValue()); $this->assertNull($payloads->findClaimByName('jti')); /** @var Account $account */ @@ -63,20 +63,20 @@ class ComponentTest extends TestCase { $result = $this->component->createJwtAuthenticationToken($account, true); $this->assertInstanceOf(AuthenticationResult::class, $result); $this->assertInstanceOf(AccountSession::class, $result->getSession()); - $this->assertEquals($account, $result->getAccount()); + $this->assertSame($account, $result->getAccount()); /** @noinspection NullPointerExceptionInspection */ $this->assertTrue($result->getSession()->refresh()); $payloads = (new Jwt())->deserialize($result->getJwt())->getPayload(); /** @noinspection NullPointerExceptionInspection */ - $this->assertEquals(time(), $payloads->findClaimByName(Claim\IssuedAt::NAME)->getValue(), '', 3); + $this->assertEqualsWithDelta(time(), $payloads->findClaimByName(Claim\IssuedAt::NAME)->getValue(), 3); /** @noinspection NullPointerExceptionInspection */ - $this->assertEquals(time() + 3600, $payloads->findClaimByName('exp')->getValue(), '', 3); + $this->assertEqualsWithDelta(time() + 3600, $payloads->findClaimByName('exp')->getValue(), 3); /** @noinspection NullPointerExceptionInspection */ - $this->assertEquals('ely|1', $payloads->findClaimByName('sub')->getValue()); + $this->assertSame('ely|1', $payloads->findClaimByName('sub')->getValue()); /** @noinspection NullPointerExceptionInspection */ - $this->assertEquals('accounts_web_user', $payloads->findClaimByName('ely-scopes')->getValue()); + $this->assertSame('accounts_web_user', $payloads->findClaimByName('ely-scopes')->getValue()); /** @noinspection NullPointerExceptionInspection */ - $this->assertEquals($result->getSession()->id, $payloads->findClaimByName('jti')->getValue()); + $this->assertSame($result->getSession()->id, $payloads->findClaimByName('jti')->getValue()); } public function testRenewJwtAuthenticationToken() { @@ -85,23 +85,22 @@ class ComponentTest extends TestCase { /** @var AccountSession $session */ $session = $this->tester->grabFixture('sessions', 'admin'); $result = $this->component->renewJwtAuthenticationToken($session); - $this->assertInstanceOf(AuthenticationResult::class, $result); - $this->assertEquals($session, $result->getSession()); - $this->assertEquals($session->account_id, $result->getAccount()->id); + $this->assertSame($session, $result->getSession()); + $this->assertSame($session->account_id, $result->getAccount()->id); $session->refresh(); // reload data from db - $this->assertEquals(time(), $session->last_refreshed_at, '', 3); - $this->assertEquals($userIP, $session->getReadableIp()); + $this->assertEqualsWithDelta(time(), $session->last_refreshed_at, 3); + $this->assertSame($userIP, $session->getReadableIp()); $payloads = (new Jwt())->deserialize($result->getJwt())->getPayload(); /** @noinspection NullPointerExceptionInspection */ - $this->assertEquals(time(), $payloads->findClaimByName(Claim\IssuedAt::NAME)->getValue(), '', 3); + $this->assertEqualsWithDelta(time(), $payloads->findClaimByName(Claim\IssuedAt::NAME)->getValue(), 3); /** @noinspection NullPointerExceptionInspection */ - $this->assertEquals(time() + 3600, $payloads->findClaimByName('exp')->getValue(), '', 3); + $this->assertEqualsWithDelta(time() + 3600, $payloads->findClaimByName('exp')->getValue(), 3); /** @noinspection NullPointerExceptionInspection */ - $this->assertEquals('ely|1', $payloads->findClaimByName('sub')->getValue()); + $this->assertSame('ely|1', $payloads->findClaimByName('sub')->getValue()); /** @noinspection NullPointerExceptionInspection */ - $this->assertEquals('accounts_web_user', $payloads->findClaimByName('ely-scopes')->getValue()); + $this->assertSame('accounts_web_user', $payloads->findClaimByName('ely-scopes')->getValue()); /** @noinspection NullPointerExceptionInspection */ - $this->assertEquals($session->id, $payloads->findClaimByName('jti')->getValue(), 'session has not changed'); + $this->assertSame($session->id, $payloads->findClaimByName('jti')->getValue(), 'session has not changed'); } public function testParseToken() { @@ -123,7 +122,6 @@ class ComponentTest extends TestCase { ->getMock(); $component - ->expects($this->any()) ->method('getIsGuest') ->willReturn(false); @@ -132,7 +130,7 @@ class ComponentTest extends TestCase { $session = $component->getActiveSession(); $this->assertInstanceOf(AccountSession::class, $session); /** @noinspection NullPointerExceptionInspection */ - $this->assertEquals($session->id, $result->getSession()->id); + $this->assertSame($session->id, $result->getSession()->id); } public function testTerminateSessions() { @@ -157,8 +155,8 @@ class ComponentTest extends TestCase { $component->terminateSessions($account, Component::KEEP_CURRENT_SESSION); $sessions = $account->getSessions()->all(); - $this->assertEquals(1, count($sessions)); - $this->assertTrue($sessions[0]->id === $session->id); + $this->assertCount(1, $sessions); + $this->assertSame($session->id, $sessions[0]->id); $component->terminateSessions($account); $this->assertEmpty($account->getSessions()->all()); diff --git a/tests/codeception/api/unit/components/User/JwtAuthenticationResultTest.php b/api/tests/unit/components/User/JwtAuthenticationResultTest.php similarity index 79% rename from tests/codeception/api/unit/components/User/JwtAuthenticationResultTest.php rename to api/tests/unit/components/User/JwtAuthenticationResultTest.php index e906847..29c636d 100644 --- a/tests/codeception/api/unit/components/User/JwtAuthenticationResultTest.php +++ b/api/tests/unit/components/User/JwtAuthenticationResultTest.php @@ -1,7 +1,8 @@ id = 123; $model = new AuthenticationResult($account, '', null); - $this->assertEquals($account, $model->getAccount()); + $this->assertSame($account, $model->getAccount()); } public function testGetJwt() { $model = new AuthenticationResult(new Account(), 'mocked jwt', null); - $this->assertEquals('mocked jwt', $model->getJwt()); + $this->assertSame('mocked jwt', $model->getJwt()); } public function testGetSession() { @@ -32,14 +32,14 @@ class JwtAuthenticationResultTest extends TestCase { $session = new AccountSession(); $session->id = 321; $model = new AuthenticationResult(new Account(), '', $session); - $this->assertEquals($session, $model->getSession()); + $this->assertSame($session, $model->getSession()); } public function testGetAsResponse() { $jwtToken = $this->createJwtToken(time() + 3600); $model = new AuthenticationResult(new Account(), $jwtToken, null); $result = $model->getAsResponse(); - $this->assertEquals($jwtToken, $result['access_token']); + $this->assertSame($jwtToken, $result['access_token']); $this->assertSame(3600, $result['expires_in']); /** @noinspection SummerTimeUnsafeTimeManipulationInspection */ @@ -48,8 +48,8 @@ class JwtAuthenticationResultTest extends TestCase { $session->refresh_token = 'refresh token'; $model = new AuthenticationResult(new Account(), $jwtToken, $session); $result = $model->getAsResponse(); - $this->assertEquals($jwtToken, $result['access_token']); - $this->assertEquals('refresh token', $result['refresh_token']); + $this->assertSame($jwtToken, $result['access_token']); + $this->assertSame('refresh token', $result['refresh_token']); $this->assertSame(86400, $result['expires_in']); } diff --git a/tests/codeception/api/unit/filters/NginxCacheTest.php b/api/tests/unit/filters/NginxCacheTest.php similarity index 95% rename from tests/codeception/api/unit/filters/NginxCacheTest.php rename to api/tests/unit/filters/NginxCacheTest.php index 01f982d..b94f1dc 100644 --- a/tests/codeception/api/unit/filters/NginxCacheTest.php +++ b/api/tests/unit/filters/NginxCacheTest.php @@ -1,8 +1,8 @@ generateToken(); $identity = JwtIdentity::findIdentityByAccessToken($token); $this->assertInstanceOf(IdentityInterface::class, $identity); - $this->assertEquals($token, $identity->getId()); - $this->assertEquals($this->tester->grabFixture('accounts', 'admin')['id'], $identity->getAccount()->id); + $this->assertSame($token, $identity->getId()); + $this->assertSame($this->tester->grabFixture('accounts', 'admin')['id'], $identity->getAccount()->id); } /** diff --git a/tests/codeception/api/unit/models/authentication/ConfirmEmailFormTest.php b/api/tests/unit/models/authentication/ConfirmEmailFormTest.php similarity index 82% rename from tests/codeception/api/unit/models/authentication/ConfirmEmailFormTest.php rename to api/tests/unit/models/authentication/ConfirmEmailFormTest.php index c392830..db808d5 100644 --- a/tests/codeception/api/unit/models/authentication/ConfirmEmailFormTest.php +++ b/api/tests/unit/models/authentication/ConfirmEmailFormTest.php @@ -1,13 +1,13 @@ assertFalse($activationExists, 'email activation key is not exist'); /** @var Account $account */ $account = Account::findOne($fixture['account_id']); - $this->assertEquals(Account::STATUS_ACTIVE, $account->status, 'user status changed to active'); + $this->assertSame(Account::STATUS_ACTIVE, $account->status, 'user status changed to active'); } private function createModel($key) { diff --git a/tests/codeception/api/unit/models/authentication/ForgotPasswordFormTest.php b/api/tests/unit/models/authentication/ForgotPasswordFormTest.php similarity index 89% rename from tests/codeception/api/unit/models/authentication/ForgotPasswordFormTest.php rename to api/tests/unit/models/authentication/ForgotPasswordFormTest.php index 48e559e..8dc639a 100644 --- a/tests/codeception/api/unit/models/authentication/ForgotPasswordFormTest.php +++ b/api/tests/unit/models/authentication/ForgotPasswordFormTest.php @@ -3,20 +3,20 @@ namespace codeception\api\unit\models\authentication; use api\components\ReCaptcha\Validator as ReCaptchaValidator; use api\models\authentication\ForgotPasswordForm; +use api\tests\unit\TestCase; use Codeception\Specify; use common\models\Account; use common\models\EmailActivation; use common\tasks\SendPasswordRecoveryEmail; +use common\tests\fixtures\AccountFixture; +use common\tests\fixtures\EmailActivationFixture; use GuzzleHttp\ClientInterface; -use tests\codeception\api\unit\TestCase; -use tests\codeception\common\fixtures\AccountFixture; -use tests\codeception\common\fixtures\EmailActivationFixture; use Yii; class ForgotPasswordFormTest extends TestCase { use Specify; - public function setUp() { + protected function setUp() { parent::setUp(); Yii::$container->set(ReCaptchaValidator::class, new class(mock(ClientInterface::class)) extends ReCaptchaValidator { public function validateValue($value) { @@ -35,7 +35,7 @@ class ForgotPasswordFormTest extends TestCase { public function testValidateLogin() { $model = new ForgotPasswordForm(['login' => 'unexist']); $model->validateLogin('login'); - $this->assertEquals(['error.login_not_exist'], $model->getErrors('login'), 'error.login_not_exist if login is invalid'); + $this->assertSame(['error.login_not_exist'], $model->getErrors('login'), 'error.login_not_exist if login is invalid'); $model = new ForgotPasswordForm(['login' => $this->tester->grabFixture('accounts', 'admin')['username']]); $model->validateLogin('login'); @@ -47,7 +47,7 @@ class ForgotPasswordFormTest extends TestCase { 'login' => $this->tester->grabFixture('accounts', 'not-activated-account')['username'], ]); $model->validateActivity('login'); - $this->assertEquals(['error.account_not_activated'], $model->getErrors('login'), 'expected error if account is not confirmed'); + $this->assertSame(['error.account_not_activated'], $model->getErrors('login'), 'expected error if account is not confirmed'); $model = new ForgotPasswordForm([ 'login' => $this->tester->grabFixture('accounts', 'admin')['username'], @@ -62,7 +62,7 @@ class ForgotPasswordFormTest extends TestCase { 'key' => $this->tester->grabFixture('emailActivations', 'freshPasswordRecovery')['key'], ]); $model->validateFrequency('login'); - $this->assertEquals(['error.recently_sent_message'], $model->getErrors('login'), 'error.account_not_activated if recently was message'); + $this->assertSame(['error.recently_sent_message'], $model->getErrors('login'), 'error.account_not_activated if recently was message'); $model = $this->createModel([ 'login' => $this->tester->grabFixture('accounts', 'admin')['username'], diff --git a/tests/codeception/api/unit/models/authentication/LoginFormTest.php b/api/tests/unit/models/authentication/LoginFormTest.php similarity index 88% rename from tests/codeception/api/unit/models/authentication/LoginFormTest.php rename to api/tests/unit/models/authentication/LoginFormTest.php index 56f887e..d3285fb 100644 --- a/tests/codeception/api/unit/models/authentication/LoginFormTest.php +++ b/api/tests/unit/models/authentication/LoginFormTest.php @@ -1,26 +1,26 @@ originalRemoteAddr = $_SERVER['REMOTE_ADDR'] ?? null; $_SERVER['REMOTE_ADDR'] = '127.0.0.1'; parent::setUp(); } - public function tearDown() { + protected function tearDown() { parent::tearDown(); $_SERVER['REMOTE_ADDR'] = $this->originalRemoteAddr; } @@ -38,7 +38,7 @@ class LoginFormTest extends TestCase { 'account' => null, ]); $model->validateLogin('login'); - $this->assertEquals(['error.login_not_exist'], $model->getErrors('login')); + $this->assertSame(['error.login_not_exist'], $model->getErrors('login')); }); $this->specify('no errors if login exists', function() { @@ -58,7 +58,7 @@ class LoginFormTest extends TestCase { 'account' => new Account(['password' => '12345678']), ]); $model->validatePassword('password'); - $this->assertEquals(['error.password_incorrect'], $model->getErrors('password')); + $this->assertSame(['error.password_incorrect'], $model->getErrors('password')); }); $this->specify('no errors if password valid', function() { @@ -84,7 +84,7 @@ class LoginFormTest extends TestCase { 'account' => $account, ]); $model->validateTotp('totp'); - $this->assertEquals(['error.totp_incorrect'], $model->getErrors('totp')); + $this->assertSame(['error.totp_incorrect'], $model->getErrors('totp')); }); $totp = TOTP::create($account->otp_secret); @@ -105,7 +105,7 @@ class LoginFormTest extends TestCase { 'account' => new Account(['status' => Account::STATUS_REGISTERED]), ]); $model->validateActivity('login'); - $this->assertEquals(['error.account_not_activated'], $model->getErrors('login')); + $this->assertSame(['error.account_not_activated'], $model->getErrors('login')); }); $this->specify('error.account_banned if account has banned status', function() { @@ -113,7 +113,7 @@ class LoginFormTest extends TestCase { 'account' => new Account(['status' => Account::STATUS_BANNED]), ]); $model->validateActivity('login'); - $this->assertEquals(['error.account_banned'], $model->getErrors('login')); + $this->assertSame(['error.account_banned'], $model->getErrors('login')); }); $this->specify('no errors if account active', function() { @@ -146,7 +146,7 @@ class LoginFormTest extends TestCase { ]); $this->assertInstanceOf(AuthenticationResult::class, $model->login()); $this->assertEmpty($model->getErrors()); - $this->assertEquals( + $this->assertSame( Account::PASS_HASH_STRATEGY_YII2, $model->getAccount()->password_hash_strategy, 'user, that login using account with old pass hash strategy should update it automatically' diff --git a/tests/codeception/api/unit/models/authentication/LogoutFormTest.php b/api/tests/unit/models/authentication/LogoutFormTest.php similarity index 95% rename from tests/codeception/api/unit/models/authentication/LogoutFormTest.php rename to api/tests/unit/models/authentication/LogoutFormTest.php index 7f63533..1a3d9af 100644 --- a/tests/codeception/api/unit/models/authentication/LogoutFormTest.php +++ b/api/tests/unit/models/authentication/LogoutFormTest.php @@ -1,12 +1,12 @@ validateRefreshToken(); - $this->assertEquals(['error.refresh_token_not_exist'], $model->getErrors('refresh_token')); + $this->assertSame(['error.refresh_token_not_exist'], $model->getErrors('refresh_token')); }); $this->specify('no errors if token exists', function() { diff --git a/tests/codeception/api/unit/models/authentication/RegistrationFormTest.php b/api/tests/unit/models/authentication/RegistrationFormTest.php similarity index 86% rename from tests/codeception/api/unit/models/authentication/RegistrationFormTest.php rename to api/tests/unit/models/authentication/RegistrationFormTest.php index bd76a40..cd37cda 100644 --- a/tests/codeception/api/unit/models/authentication/RegistrationFormTest.php +++ b/api/tests/unit/models/authentication/RegistrationFormTest.php @@ -1,28 +1,26 @@ mockRequest(); Yii::$container->set(ReCaptchaValidator::class, new class(mock(ClientInterface::class)) extends ReCaptchaValidator { @@ -70,7 +68,7 @@ class RegistrationFormTest extends TestCase { $account = $model->signup(); $this->expectSuccessRegistration($account); - $this->assertEquals('ru', $account->lang, 'lang is set'); + $this->assertSame('ru', $account->lang, 'lang is set'); } public function testSignupWithDefaultLanguage() { @@ -86,7 +84,7 @@ class RegistrationFormTest extends TestCase { $account = $model->signup(); $this->expectSuccessRegistration($account); - $this->assertEquals('en', $account->lang, 'lang is set'); + $this->assertSame('en', $account->lang, 'lang is set'); } /** @@ -97,7 +95,7 @@ class RegistrationFormTest extends TestCase { $this->assertTrue($account->validatePassword('some_password'), 'password should be correct'); $this->assertNotEmpty($account->uuid, 'uuid is set'); $this->assertNotNull($account->registration_ip, 'registration_ip is set'); - $this->assertEquals(LATEST_RULES_VERSION, $account->rules_agreement_version, 'actual rules version is set'); + $this->assertSame(LATEST_RULES_VERSION, $account->rules_agreement_version, 'actual rules version is set'); $this->assertTrue(Account::find()->andWhere([ 'username' => 'some_username', 'email' => 'some_email@example.com', @@ -132,9 +130,8 @@ class RegistrationFormTest extends TestCase { ->getMock(); $request - ->expects($this->any()) ->method('getUserIP') - ->will($this->returnValue($ip)); + ->willReturn($ip); Yii::$app->set('request', $request); diff --git a/tests/codeception/api/unit/models/authentication/RepeatAccountActivationFormTest.php b/api/tests/unit/models/authentication/RepeatAccountActivationFormTest.php similarity index 94% rename from tests/codeception/api/unit/models/authentication/RepeatAccountActivationFormTest.php rename to api/tests/unit/models/authentication/RepeatAccountActivationFormTest.php index 6dbebb1..c70a364 100644 --- a/tests/codeception/api/unit/models/authentication/RepeatAccountActivationFormTest.php +++ b/api/tests/unit/models/authentication/RepeatAccountActivationFormTest.php @@ -1,21 +1,21 @@ set(ReCaptchaValidator::class, new class(mock(ClientInterface::class)) extends ReCaptchaValidator { public function validateValue($value) { diff --git a/tests/codeception/api/unit/models/base/ApiFormTest.php b/api/tests/unit/models/base/ApiFormTest.php similarity index 70% rename from tests/codeception/api/unit/models/base/ApiFormTest.php rename to api/tests/unit/models/base/ApiFormTest.php index afac6c1..d422692 100644 --- a/tests/codeception/api/unit/models/base/ApiFormTest.php +++ b/api/tests/unit/models/base/ApiFormTest.php @@ -1,15 +1,15 @@ assertTrue($model->load(['field' => 'test-data']), 'model successful load data without prefix'); - $this->assertEquals('test-data', $model->field, 'field is set as passed data'); + $this->assertSame('test-data', $model->field, 'field is set as passed data'); } } diff --git a/tests/codeception/api/unit/models/profile/TwoFactorAuthFormTest.php b/api/tests/unit/models/profile/TwoFactorAuthFormTest.php similarity index 100% rename from tests/codeception/api/unit/models/profile/TwoFactorAuthFormTest.php rename to api/tests/unit/models/profile/TwoFactorAuthFormTest.php diff --git a/tests/codeception/api/unit/modules/accounts/models/AcceptRulesFormTest.php b/api/tests/unit/modules/accounts/models/AcceptRulesFormTest.php similarity index 75% rename from tests/codeception/api/unit/modules/accounts/models/AcceptRulesFormTest.php rename to api/tests/unit/modules/accounts/models/AcceptRulesFormTest.php index 775e3d8..0c5f92f 100644 --- a/tests/codeception/api/unit/modules/accounts/models/AcceptRulesFormTest.php +++ b/api/tests/unit/modules/accounts/models/AcceptRulesFormTest.php @@ -1,9 +1,9 @@ assertTrue($model->performAction()); - $this->assertEquals(LATEST_RULES_VERSION, $account->rules_agreement_version); + $this->assertSame(LATEST_RULES_VERSION, $account->rules_agreement_version); } } diff --git a/tests/codeception/api/unit/modules/accounts/models/ChangeEmailFormTest.php b/api/tests/unit/modules/accounts/models/ChangeEmailFormTest.php similarity index 81% rename from tests/codeception/api/unit/modules/accounts/models/ChangeEmailFormTest.php rename to api/tests/unit/modules/accounts/models/ChangeEmailFormTest.php index abf041d..7106fca 100644 --- a/tests/codeception/api/unit/modules/accounts/models/ChangeEmailFormTest.php +++ b/api/tests/unit/modules/accounts/models/ChangeEmailFormTest.php @@ -1,12 +1,12 @@ assertEquals($data['newEmail'], $account->email); + $this->assertSame($data['newEmail'], $account->email); } private function getAccountId() { diff --git a/tests/codeception/api/unit/modules/accounts/models/ChangeLanguageFormTest.php b/api/tests/unit/modules/accounts/models/ChangeLanguageFormTest.php similarity index 76% rename from tests/codeception/api/unit/modules/accounts/models/ChangeLanguageFormTest.php rename to api/tests/unit/modules/accounts/models/ChangeLanguageFormTest.php index 4476318..1cb1337 100644 --- a/tests/codeception/api/unit/modules/accounts/models/ChangeLanguageFormTest.php +++ b/api/tests/unit/modules/accounts/models/ChangeLanguageFormTest.php @@ -1,9 +1,9 @@ lang = 'ru'; $this->assertTrue($model->performAction()); - $this->assertEquals('ru', $account->lang); + $this->assertSame('ru', $account->lang); } } diff --git a/tests/codeception/api/unit/modules/accounts/models/ChangePasswordFormTest.php b/api/tests/unit/modules/accounts/models/ChangePasswordFormTest.php similarity index 95% rename from tests/codeception/api/unit/modules/accounts/models/ChangePasswordFormTest.php rename to api/tests/unit/modules/accounts/models/ChangePasswordFormTest.php index df6f612..552a185 100644 --- a/tests/codeception/api/unit/modules/accounts/models/ChangePasswordFormTest.php +++ b/api/tests/unit/modules/accounts/models/ChangePasswordFormTest.php @@ -1,13 +1,13 @@ 'another-password', ]); $model->validatePasswordAndRePasswordMatch('newRePassword'); - $this->assertEquals( + $this->assertSame( [E::NEW_RE_PASSWORD_DOES_NOT_MATCH], $model->getErrors('newRePassword'), 'error.rePassword_does_not_match expected if passwords not match' @@ -47,7 +47,7 @@ class ChangePasswordFormTest extends TestCase { 'newRePassword' => 'another-password', ]); $model->validate(); - $this->assertEquals( + $this->assertSame( [E::NEW_RE_PASSWORD_DOES_NOT_MATCH], $model->getErrors('newRePassword'), 'error.rePassword_does_not_match expected even if there are errors on other attributes' @@ -106,7 +106,7 @@ class ChangePasswordFormTest extends TestCase { $this->assertTrue($model->performAction(), 'successfully change password with legacy hash strategy'); $this->assertTrue($account->validatePassword('my-new-password')); $this->assertGreaterThanOrEqual($callTime, $account->password_changed_at); - $this->assertEquals(Account::PASS_HASH_STRATEGY_YII2, $account->password_hash_strategy); + $this->assertSame(Account::PASS_HASH_STRATEGY_YII2, $account->password_hash_strategy); } public function testPerformActionWithLogout() { diff --git a/tests/codeception/api/unit/modules/accounts/models/ChangeUsernameFormTest.php b/api/tests/unit/modules/accounts/models/ChangeUsernameFormTest.php similarity index 86% rename from tests/codeception/api/unit/modules/accounts/models/ChangeUsernameFormTest.php rename to api/tests/unit/modules/accounts/models/ChangeUsernameFormTest.php index 67d6db5..60cc365 100644 --- a/tests/codeception/api/unit/modules/accounts/models/ChangeUsernameFormTest.php +++ b/api/tests/unit/modules/accounts/models/ChangeUsernameFormTest.php @@ -1,13 +1,13 @@ 'my_new_nickname', ]); $this->assertTrue($model->performAction()); - $this->assertEquals('my_new_nickname', Account::findOne($this->getAccountId())->username); + $this->assertSame('my_new_nickname', Account::findOne($this->getAccountId())->username); $this->assertInstanceOf(UsernameHistory::class, UsernameHistory::findOne(['username' => 'my_new_nickname'])); /** @var PullMojangUsername $job */ $job = $this->tester->grabLastQueuedJob(); @@ -56,7 +56,7 @@ class ChangeUsernameFormTest extends TestCase { 'username' => $newUsername, ]); $this->assertTrue($model->performAction()); - $this->assertEquals($newUsername, Account::findOne($this->getAccountId())->username); + $this->assertSame($newUsername, Account::findOne($this->getAccountId())->username); $this->assertInstanceOf( UsernameHistory::class, UsernameHistory::findOne(['username' => $newUsername]), diff --git a/tests/codeception/api/unit/modules/accounts/models/DisableTwoFactorAuthFormTest.php b/api/tests/unit/modules/accounts/models/DisableTwoFactorAuthFormTest.php similarity index 88% rename from tests/codeception/api/unit/modules/accounts/models/DisableTwoFactorAuthFormTest.php rename to api/tests/unit/modules/accounts/models/DisableTwoFactorAuthFormTest.php index 648bffa..b2eda1e 100644 --- a/tests/codeception/api/unit/modules/accounts/models/DisableTwoFactorAuthFormTest.php +++ b/api/tests/unit/modules/accounts/models/DisableTwoFactorAuthFormTest.php @@ -1,10 +1,10 @@ is_otp_enabled = false; $model = new DisableTwoFactorAuthForm($account); $model->validateOtpEnabled('account'); - $this->assertEquals([E::OTP_NOT_ENABLED], $model->getErrors('account')); + $this->assertSame([E::OTP_NOT_ENABLED], $model->getErrors('account')); $account = new Account(); $account->is_otp_enabled = true; diff --git a/tests/codeception/api/unit/modules/accounts/models/EnableTwoFactorAuthFormTest.php b/api/tests/unit/modules/accounts/models/EnableTwoFactorAuthFormTest.php similarity index 90% rename from tests/codeception/api/unit/modules/accounts/models/EnableTwoFactorAuthFormTest.php rename to api/tests/unit/modules/accounts/models/EnableTwoFactorAuthFormTest.php index a95cce5..84878ff 100644 --- a/tests/codeception/api/unit/modules/accounts/models/EnableTwoFactorAuthFormTest.php +++ b/api/tests/unit/modules/accounts/models/EnableTwoFactorAuthFormTest.php @@ -1,12 +1,12 @@ is_otp_enabled = true; $model = new EnableTwoFactorAuthForm($account); $model->validateOtpDisabled('account'); - $this->assertEquals([E::OTP_ALREADY_ENABLED], $model->getErrors('account')); + $this->assertSame([E::OTP_ALREADY_ENABLED], $model->getErrors('account')); $account = new Account(); $account->is_otp_enabled = false; diff --git a/tests/codeception/api/unit/modules/accounts/models/SendEmailVerificationFormTest.php b/api/tests/unit/modules/accounts/models/SendEmailVerificationFormTest.php similarity index 86% rename from tests/codeception/api/unit/modules/accounts/models/SendEmailVerificationFormTest.php rename to api/tests/unit/modules/accounts/models/SendEmailVerificationFormTest.php index dbee640..8a9b967 100644 --- a/tests/codeception/api/unit/modules/accounts/models/SendEmailVerificationFormTest.php +++ b/api/tests/unit/modules/accounts/models/SendEmailVerificationFormTest.php @@ -1,14 +1,14 @@ createCode(); $this->assertInstanceOf(CurrentEmailConfirmation::class, $activationModel); - $this->assertEquals($account->id, $activationModel->account_id); + $this->assertSame($account->id, $activationModel->account_id); $this->assertNotNull(EmailActivation::findOne($activationModel->key)); } diff --git a/tests/codeception/api/unit/modules/accounts/models/SendNewEmailVerificationFormTest.php b/api/tests/unit/modules/accounts/models/SendNewEmailVerificationFormTest.php similarity index 82% rename from tests/codeception/api/unit/modules/accounts/models/SendNewEmailVerificationFormTest.php rename to api/tests/unit/modules/accounts/models/SendNewEmailVerificationFormTest.php index addee2c..529190d 100644 --- a/tests/codeception/api/unit/modules/accounts/models/SendNewEmailVerificationFormTest.php +++ b/api/tests/unit/modules/accounts/models/SendNewEmailVerificationFormTest.php @@ -1,15 +1,15 @@ email = 'my-new-email@ely.by'; $activationModel = $model->createCode(); $this->assertInstanceOf(NewEmailConfirmation::class, $activationModel); - $this->assertEquals($account->id, $activationModel->account_id); - $this->assertEquals($model->email, $activationModel->newEmail); + $this->assertSame($account->id, $activationModel->account_id); + $this->assertSame($model->email, $activationModel->newEmail); $this->assertNotNull(EmailActivation::findOne($activationModel->key)); } @@ -50,7 +50,7 @@ class SendNewEmailVerificationFormTest extends TestCase { 'account_id' => $account->id, 'type' => EmailActivation::TYPE_NEW_EMAIL_CONFIRMATION, ]); - $this->assertNotNull(EmailActivation::class, $activation); + $this->assertInstanceOf(EmailActivation::class, $activation); /** @var SendNewEmailConfirmation $job */ $job = $this->tester->grabLastQueuedJob(); diff --git a/tests/codeception/api/unit/modules/accounts/models/TwoFactorAuthInfoTest.php b/api/tests/unit/modules/accounts/models/TwoFactorAuthInfoTest.php similarity index 90% rename from tests/codeception/api/unit/modules/accounts/models/TwoFactorAuthInfoTest.php rename to api/tests/unit/modules/accounts/models/TwoFactorAuthInfoTest.php index 6193a5e..bb78ee1 100644 --- a/tests/codeception/api/unit/modules/accounts/models/TwoFactorAuthInfoTest.php +++ b/api/tests/unit/modules/accounts/models/TwoFactorAuthInfoTest.php @@ -1,9 +1,9 @@ getCredentials(); - $this->assertEquals('AAAA', $result['secret']); + $this->assertSame('AAAA', $result['secret']); } } diff --git a/tests/codeception/api/unit/modules/authserver/models/AuthenticationFormTest.php b/api/tests/unit/modules/authserver/models/AuthenticationFormTest.php similarity index 89% rename from tests/codeception/api/unit/modules/authserver/models/AuthenticationFormTest.php rename to api/tests/unit/modules/authserver/models/AuthenticationFormTest.php index f4304fe..ca8b21f 100644 --- a/tests/codeception/api/unit/modules/authserver/models/AuthenticationFormTest.php +++ b/api/tests/unit/modules/authserver/models/AuthenticationFormTest.php @@ -4,13 +4,13 @@ namespace codeception\api\unit\modules\authserver\models; use api\models\authentication\LoginForm; use api\modules\authserver\models\AuthenticateData; use api\modules\authserver\models\AuthenticationForm; +use api\tests\unit\TestCase; use common\models\Account; use common\models\MinecraftAccessKey; +use common\tests\_support\ProtectedCaller; +use common\tests\fixtures\AccountFixture; +use common\tests\fixtures\MinecraftAccessKeyFixture; use Ramsey\Uuid\Uuid; -use tests\codeception\api\unit\TestCase; -use tests\codeception\common\_support\ProtectedCaller; -use tests\codeception\common\fixtures\AccountFixture; -use tests\codeception\common\fixtures\MinecraftAccessKeyFixture; class AuthenticationFormTest extends TestCase { use ProtectedCaller; @@ -79,7 +79,7 @@ class AuthenticationFormTest extends TestCase { $result = $authForm->authenticate(); $this->assertInstanceOf(AuthenticateData::class, $result); - $this->assertEquals($minecraftAccessKey->access_token, $result->getMinecraftAccessKey()->access_token); + $this->assertSame($minecraftAccessKey->access_token, $result->getMinecraftAccessKey()->access_token); } public function testCreateMinecraftAccessToken() { @@ -90,8 +90,8 @@ class AuthenticationFormTest extends TestCase { /** @var MinecraftAccessKey $result */ $result = $this->callProtected($authForm, 'createMinecraftAccessToken', $account); $this->assertInstanceOf(MinecraftAccessKey::class, $result); - $this->assertEquals($account->id, $result->account_id); - $this->assertEquals($authForm->clientToken, $result->client_token); + $this->assertSame($account->id, $result->account_id); + $this->assertSame($authForm->clientToken, $result->client_token); $this->assertInstanceOf(MinecraftAccessKey::class, MinecraftAccessKey::findOne($result->access_token)); } @@ -104,8 +104,8 @@ class AuthenticationFormTest extends TestCase { /** @var MinecraftAccessKey $result */ $result = $this->callProtected($authForm, 'createMinecraftAccessToken', $account); $this->assertInstanceOf(MinecraftAccessKey::class, $result); - $this->assertEquals($account->id, $result->account_id); - $this->assertEquals($authForm->clientToken, $result->client_token); + $this->assertSame($account->id, $result->account_id); + $this->assertSame($authForm->clientToken, $result->client_token); $this->assertNull(MinecraftAccessKey::findOne($minecraftFixture['access_token'])); $this->assertInstanceOf(MinecraftAccessKey::class, MinecraftAccessKey::findOne($result->access_token)); } diff --git a/tests/codeception/api/unit/modules/authserver/validators/RequiredValidatorTest.php b/api/tests/unit/modules/authserver/validators/RequiredValidatorTest.php similarity index 87% rename from tests/codeception/api/unit/modules/authserver/validators/RequiredValidatorTest.php rename to api/tests/unit/modules/authserver/validators/RequiredValidatorTest.php index 8e46c8c..e31704b 100644 --- a/tests/codeception/api/unit/modules/authserver/validators/RequiredValidatorTest.php +++ b/api/tests/unit/modules/authserver/validators/RequiredValidatorTest.php @@ -2,8 +2,8 @@ namespace codeception\api\unit\modules\authserver\validators; use api\modules\authserver\validators\RequiredValidator; -use tests\codeception\api\unit\TestCase; -use tests\codeception\common\_support\ProtectedCaller; +use api\tests\unit\TestCase; +use common\tests\_support\ProtectedCaller; class RequiredValidatorTest extends TestCase { use ProtectedCaller; diff --git a/tests/codeception/api/unit/modules/internal/models/BanFormTest.php b/api/tests/unit/modules/internal/models/BanFormTest.php similarity index 83% rename from tests/codeception/api/unit/modules/internal/models/BanFormTest.php rename to api/tests/unit/modules/internal/models/BanFormTest.php index 3894f7f..7dd9ea3 100644 --- a/tests/codeception/api/unit/modules/internal/models/BanFormTest.php +++ b/api/tests/unit/modules/internal/models/BanFormTest.php @@ -1,11 +1,11 @@ status = Account::STATUS_BANNED; $form = new BanAccountForm($account); $form->validateAccountActivity(); - $this->assertEquals([E::ACCOUNT_ALREADY_BANNED], $form->getErrors('account')); + $this->assertSame([E::ACCOUNT_ALREADY_BANNED], $form->getErrors('account')); } public function testBan() { @@ -35,7 +35,7 @@ class BanFormTest extends TestCase { $model = new BanAccountForm($account); $this->assertTrue($model->performAction()); - $this->assertEquals(Account::STATUS_BANNED, $account->status); + $this->assertSame(Account::STATUS_BANNED, $account->status); /** @var ClearAccountSessions $job */ $job = $this->tester->grabLastQueuedJob(); $this->assertInstanceOf(ClearAccountSessions::class, $job); diff --git a/tests/codeception/api/unit/modules/internal/models/PardonFormTest.php b/api/tests/unit/modules/internal/models/PardonFormTest.php similarity index 81% rename from tests/codeception/api/unit/modules/internal/models/PardonFormTest.php rename to api/tests/unit/modules/internal/models/PardonFormTest.php index 362271f..5d469e6 100644 --- a/tests/codeception/api/unit/modules/internal/models/PardonFormTest.php +++ b/api/tests/unit/modules/internal/models/PardonFormTest.php @@ -1,10 +1,10 @@ status = Account::STATUS_ACTIVE; $form = new PardonAccountForm($account); $form->validateAccountBanned(); - $this->assertEquals([E::ACCOUNT_NOT_BANNED], $form->getErrors('account')); + $this->assertSame([E::ACCOUNT_NOT_BANNED], $form->getErrors('account')); } public function testPardon() { @@ -35,7 +35,7 @@ class PardonFormTest extends TestCase { $account->status = Account::STATUS_BANNED; $model = new PardonAccountForm($account); $this->assertTrue($model->performAction()); - $this->assertEquals(Account::STATUS_ACTIVE, $account->status); + $this->assertSame(Account::STATUS_ACTIVE, $account->status); } } diff --git a/tests/codeception/api/unit/modules/oauth/models/ApplicationTypeTest.php b/api/tests/unit/modules/oauth/models/ApplicationTypeTest.php similarity index 89% rename from tests/codeception/api/unit/modules/oauth/models/ApplicationTypeTest.php rename to api/tests/unit/modules/oauth/models/ApplicationTypeTest.php index 1eed2c4..6d0c8b0 100644 --- a/tests/codeception/api/unit/modules/oauth/models/ApplicationTypeTest.php +++ b/api/tests/unit/modules/oauth/models/ApplicationTypeTest.php @@ -1,9 +1,9 @@ tester->grabLastQueuedJob(); $this->assertInstanceOf(ClearOauthSessions::class, $job); $this->assertSame('mocked-id', $job->clientId); - $this->assertEquals(time(), $job->notSince, '', 2); + $this->assertEqualsWithDelta(time(), $job->notSince, 2); } public function testResetWithSecret() { @@ -132,7 +132,7 @@ class OauthClientFormTest extends TestCase { $job = $this->tester->grabLastQueuedJob(); $this->assertInstanceOf(ClearOauthSessions::class, $job); $this->assertSame('mocked-id', $job->clientId); - $this->assertEquals(time(), $job->notSince, '', 2); + $this->assertEqualsWithDelta(time(), $job->notSince, 2); } } diff --git a/tests/codeception/api/unit/modules/session/filters/RateLimiterTest.php b/api/tests/unit/modules/session/filters/RateLimiterTest.php similarity index 64% rename from tests/codeception/api/unit/modules/session/filters/RateLimiterTest.php rename to api/tests/unit/modules/session/filters/RateLimiterTest.php index 81fc370..2860059 100644 --- a/tests/codeception/api/unit/modules/session/filters/RateLimiterTest.php +++ b/api/tests/unit/modules/session/filters/RateLimiterTest.php @@ -1,10 +1,12 @@ getMockBuilder(Connection::class) ->setMethods(['executeCommand']) ->getMock(); @@ -22,23 +24,22 @@ class RateLimiterTest extends TestCase { Yii::$app->set('redis', $redis); - /** @var RateLimiter|\PHPUnit_Framework_MockObject_MockObject $filter */ + /** @var RateLimiter|\PHPUnit\Framework\MockObject\MockObject $filter */ $filter = $this->getMockBuilder(RateLimiter::class) ->setConstructorArgs([[ - 'authserverDomain' => Yii::$app->params['authserverHost'], + 'authserverDomain' => 'authserver.ely.by', ]]) ->setMethods(['getServer']) ->getMock(); - $filter->expects($this->any()) - ->method('getServer') - ->will($this->returnValue(new OauthClient())); + $filter->method('getServer') + ->willReturn(new OauthClient()); $filter->checkRateLimit(null, new Request(), null, null); } public function testCheckRateLimiterWithValidServerId() { - /** @var Connection|\PHPUnit_Framework_MockObject_MockObject $redis */ + /** @var Connection|\PHPUnit\Framework\MockObject\MockObject $redis */ $redis = $this->getMockBuilder(Connection::class) ->setMethods(['executeCommand']) ->getMock(); @@ -48,17 +49,16 @@ class RateLimiterTest extends TestCase { Yii::$app->set('redis', $redis); - /** @var Request|\PHPUnit_Framework_MockObject_MockObject $request */ + /** @var Request|\PHPUnit\Framework\MockObject\MockObject $request */ $request = $this->getMockBuilder(Request::class) ->setMethods(['getHostInfo']) ->getMock(); - $request->expects($this->any()) - ->method('getHostInfo') - ->will($this->returnValue('http://authserver.ely.by')); + $request->method('getHostInfo') + ->willReturn('http://authserver.ely.by'); $filter = new RateLimiter([ - 'authserverDomain' => Yii::$app->params['authserverHost'], + 'authserverDomain' => 'authserver.ely.by', ]); $filter->checkRateLimit(null, $request, null, null); } @@ -67,7 +67,7 @@ class RateLimiterTest extends TestCase { * @expectedException \yii\web\TooManyRequestsHttpException */ public function testCheckRateLimiter() { - /** @var Connection|\PHPUnit_Framework_MockObject_MockObject $redis */ + /** @var Connection|\PHPUnit\Framework\MockObject\MockObject $redis */ $redis = $this->getMockBuilder(Connection::class) ->setMethods(['executeCommand']) ->getMock(); @@ -78,27 +78,25 @@ class RateLimiterTest extends TestCase { Yii::$app->set('redis', $redis); - /** @var Request|\PHPUnit_Framework_MockObject_MockObject $request */ + /** @var Request|\PHPUnit\Framework\MockObject\MockObject $request */ $request = $this->getMockBuilder(Request::class) ->setMethods(['getUserIP']) ->getMock(); - $request->expects($this->any()) - ->method('getUserIp') - ->will($this->returnValue(Internet::localIpv4())); + $request->method('getUserIp') + ->willReturn(Internet::localIpv4()); - /** @var RateLimiter|\PHPUnit_Framework_MockObject_MockObject $filter */ + /** @var RateLimiter|\PHPUnit\Framework\MockObject\MockObject $filter */ $filter = $this->getMockBuilder(RateLimiter::class) ->setConstructorArgs([[ 'limit' => 3, - 'authserverDomain' => Yii::$app->params['authserverHost'], + 'authserverDomain' => 'authserver.ely.by', ]]) ->setMethods(['getServer']) ->getMock(); - $filter->expects($this->any()) - ->method('getServer') - ->will($this->returnValue(null)); + $filter->method('getServer') + ->willReturn(null); for ($i = 0; $i < 5; $i++) { $filter->checkRateLimit(null, $request, null, null); diff --git a/api/tests/unit/request/RequestParserTest.php b/api/tests/unit/request/RequestParserTest.php new file mode 100644 index 0000000..0756d86 --- /dev/null +++ b/api/tests/unit/request/RequestParserTest.php @@ -0,0 +1,20 @@ + 'post']; + $this->assertSame(['from' => 'post'], $parser->parse('from=post', '')); + $this->assertSame(['from' => 'post'], $parser->parse('', '')); + $_POST = []; + $this->assertSame(['from' => 'json'], $parser->parse('{"from":"json"}', '')); + $this->assertSame(['from' => 'body'], $parser->parse('from=body', '')); + $this->assertSame(['onlykey' => ''], $parser->parse('onlykey', '')); + } + +} diff --git a/tests/codeception/api/unit/traits/AccountFinderTest.php b/api/tests/unit/traits/AccountFinderTest.php similarity index 78% rename from tests/codeception/api/unit/traits/AccountFinderTest.php rename to api/tests/unit/traits/AccountFinderTest.php index 1ae15ac..63c4a4c 100644 --- a/tests/codeception/api/unit/traits/AccountFinderTest.php +++ b/api/tests/unit/traits/AccountFinderTest.php @@ -1,11 +1,11 @@ login = 'erickskrauch@ely.by'; - $this->assertEquals('email', $model->getLoginAttribute(), 'if login look like email value, then \'email\''); + $this->assertSame('email', $model->getLoginAttribute(), 'if login look like email value, then \'email\''); $model = new AccountFinderTestTestClass(); $model->login = 'erickskrauch'; - $this->assertEquals('username', $model->getLoginAttribute(), 'username in any other case'); + $this->assertSame('username', $model->getLoginAttribute(), 'username in any other case'); } } diff --git a/tests/codeception/api/unit/validators/EmailActivationKeyValidatorTest.php b/api/tests/unit/validators/EmailActivationKeyValidatorTest.php similarity index 82% rename from tests/codeception/api/unit/validators/EmailActivationKeyValidatorTest.php rename to api/tests/unit/validators/EmailActivationKeyValidatorTest.php index b7ea2f3..f58c323 100644 --- a/tests/codeception/api/unit/validators/EmailActivationKeyValidatorTest.php +++ b/api/tests/unit/validators/EmailActivationKeyValidatorTest.php @@ -1,14 +1,14 @@ willReturnOnConsecutiveCalls(null, $expiredActivation, $validActivation); $validator->validateAttribute($model, 'key'); - $this->assertEquals([E::KEY_REQUIRED], $model->getErrors('key')); + $this->assertSame([E::KEY_REQUIRED], $model->getErrors('key')); $this->assertNull($model->key); $model->clearErrors(); $model->key = 'original value'; $validator->validateAttribute($model, 'key'); - $this->assertEquals([E::KEY_NOT_EXISTS], $model->getErrors('key')); - $this->assertEquals('original value', $model->key); + $this->assertSame([E::KEY_NOT_EXISTS], $model->getErrors('key')); + $this->assertSame('original value', $model->key); $model->clearErrors(); $validator->validateAttribute($model, 'key'); - $this->assertEquals([E::KEY_EXPIRE], $model->getErrors('key')); - $this->assertEquals('original value', $model->key); + $this->assertSame([E::KEY_EXPIRE], $model->getErrors('key')); + $this->assertSame('original value', $model->key); $model->clearErrors(); $validator->validateAttribute($model, 'key'); $this->assertEmpty($model->getErrors('key')); - $this->assertEquals($validActivation, $model->key); + $this->assertSame($validActivation, $model->key); } public function testFindEmailActivationModel() { @@ -64,7 +64,7 @@ class EmailActivationKeyValidatorTest extends TestCase { /** @var EmailActivation $result */ $result = $this->callProtected($model, 'findEmailActivationModel', $key); $this->assertInstanceOf(EmailActivation::class, $result, 'valid key without specifying type must return model'); - $this->assertEquals($key, $result->key); + $this->assertSame($key, $result->key); /** @var EmailActivation $result */ $result = $this->callProtected($model, 'findEmailActivationModel', $key, 0); diff --git a/tests/codeception/api/unit/validators/PasswordRequiredValidatorTest.php b/api/tests/unit/validators/PasswordRequiredValidatorTest.php similarity index 78% rename from tests/codeception/api/unit/validators/PasswordRequiredValidatorTest.php rename to api/tests/unit/validators/PasswordRequiredValidatorTest.php index b2b5aa5..f60aed6 100644 --- a/tests/codeception/api/unit/validators/PasswordRequiredValidatorTest.php +++ b/api/tests/unit/validators/PasswordRequiredValidatorTest.php @@ -1,12 +1,12 @@ $account]); // Get error.password_required if password is empty - $this->assertEquals([E::PASSWORD_REQUIRED, []], $this->callProtected($model, 'validateValue', '')); + $this->assertSame([E::PASSWORD_REQUIRED, []], $this->callProtected($model, 'validateValue', '')); // Get error.password_incorrect if password is incorrect - $this->assertEquals([E::PASSWORD_INCORRECT, []], $this->callProtected($model, 'validateValue', '87654321')); + $this->assertSame([E::PASSWORD_INCORRECT, []], $this->callProtected($model, 'validateValue', '87654321')); // No errors, if password is correct for provided account $this->assertNull($this->callProtected($model, 'validateValue', '12345678')); diff --git a/tests/codeception/api/unit/validators/TotpValidatorTest.php b/api/tests/unit/validators/TotpValidatorTest.php similarity index 83% rename from tests/codeception/api/unit/validators/TotpValidatorTest.php rename to api/tests/unit/validators/TotpValidatorTest.php index 118a7cb..6baf9e5 100644 --- a/tests/codeception/api/unit/validators/TotpValidatorTest.php +++ b/api/tests/unit/validators/TotpValidatorTest.php @@ -1,12 +1,12 @@ $account]); $result = $this->callProtected($validator, 'validateValue', 123456); - $this->assertEquals([E::TOTP_INCORRECT, []], $result); + $this->assertSame([E::TOTP_INCORRECT, []], $result); $result = $this->callProtected($validator, 'validateValue', $controlTotp->now()); $this->assertNull($result); $result = $this->callProtected($validator, 'validateValue', $controlTotp->at(time() - 31)); - $this->assertEquals([E::TOTP_INCORRECT, []], $result); + $this->assertSame([E::TOTP_INCORRECT, []], $result); $validator->window = 2; $result = $this->callProtected($validator, 'validateValue', $controlTotp->at(time() - 31)); @@ -34,7 +34,7 @@ class TotpValidatorTest extends TestCase { $at = time() - 400; $validator->timestamp = $at; $result = $this->callProtected($validator, 'validateValue', $controlTotp->now()); - $this->assertEquals([E::TOTP_INCORRECT, []], $result); + $this->assertSame([E::TOTP_INCORRECT, []], $result); $result = $this->callProtected($validator, 'validateValue', $controlTotp->at($at)); $this->assertNull($result); diff --git a/api/web/index.php b/api/web/index.php index 00517a7..e6e45e4 100644 --- a/api/web/index.php +++ b/api/web/index.php @@ -8,8 +8,8 @@ $time = microtime(true); require __DIR__ . '/../../vendor/autoload.php'; -defined('YII_DEBUG') or define('YII_DEBUG', in_array(getenv('YII_DEBUG'), ['true', '1'])); -defined('YII_ENV') or define('YII_ENV', getenv('YII_ENV')); +defined('YII_DEBUG') || define('YII_DEBUG', in_array(getenv('YII_DEBUG'), ['true', '1'])); +defined('YII_ENV') || define('YII_ENV', getenv('YII_ENV')); // Initialize an application aspect container AspectKernel::getInstance()->init([ @@ -23,7 +23,6 @@ AspectKernel::getInstance()->init([ ]); require __DIR__ . '/../../vendor/yiisoft/yii2/Yii.php'; -spl_autoload_unregister(['Yii', 'autoload']); require __DIR__ . '/../../common/config/bootstrap.php'; require __DIR__ . '/../config/bootstrap.php'; diff --git a/codeception.dist.yml b/codeception.dist.yml new file mode 100644 index 0000000..bac3dc2 --- /dev/null +++ b/codeception.dist.yml @@ -0,0 +1,10 @@ +include: + - common + - api + - console + +paths: + log: console/runtime/logs + +settings: + colors: true diff --git a/common/behaviors/PrimaryKeyValueBehavior.php b/common/behaviors/PrimaryKeyValueBehavior.php index 0882f20..20889a5 100644 --- a/common/behaviors/PrimaryKeyValueBehavior.php +++ b/common/behaviors/PrimaryKeyValueBehavior.php @@ -18,7 +18,7 @@ class PrimaryKeyValueBehavior extends Behavior { */ public $value; - public function events() { + public function events(): array { return [ ActiveRecord::EVENT_BEFORE_INSERT => 'setPrimaryKeyValue', ]; @@ -32,7 +32,7 @@ class PrimaryKeyValueBehavior extends Behavior { return true; } - public function refreshPrimaryKeyValue() { + public function refreshPrimaryKeyValue(): void { do { $key = $this->generateValue(); } while ($this->isValueExists($key)); @@ -45,15 +45,18 @@ class PrimaryKeyValueBehavior extends Behavior { } protected function isValueExists(string $key): bool { - return $this->owner->find()->andWhere([$this->getPrimaryKeyName() => $key])->exists(); + $owner = $this->owner; + return $owner::find()->andWhere([$this->getPrimaryKeyName() => $key])->exists(); } protected function getPrimaryKeyName(): string { $owner = $this->owner; - $primaryKeys = $owner->primaryKey(); + $primaryKeys = $owner::primaryKey(); if (!isset($primaryKeys[0])) { throw new InvalidConfigException('"' . get_class($owner) . '" must have a primary key.'); - } elseif (count($primaryKeys) > 1) { + } + + if (count($primaryKeys) > 1) { throw new InvalidConfigException('Current behavior don\'t support models with more then one primary key.'); } diff --git a/common/codeception.dist.yml b/common/codeception.dist.yml new file mode 100644 index 0000000..8874605 --- /dev/null +++ b/common/codeception.dist.yml @@ -0,0 +1,21 @@ +namespace: common\tests +actor_suffix: Tester +paths: + tests: tests + log: tests/_output + data: tests/_data + helpers: tests/_support +settings: + bootstrap: _bootstrap.php + colors: true + memory_limit: 1024M +coverage: + enabled: true + whitelist: + include: + - ./* + exclude: + - config/* + - mail/* + - codeception.dist.yml + - codeception.yml diff --git a/common/components/Mojang/Api.php b/common/components/Mojang/Api.php index cb92122..37a65a1 100644 --- a/common/components/Mojang/Api.php +++ b/common/components/Mojang/Api.php @@ -26,7 +26,9 @@ class Api { $response = $this->getClient()->get($this->buildUsernameToUUIDRoute($username), $query); if ($response->getStatusCode() === 204) { throw new NoContentException('Username not found'); - } elseif ($response->getStatusCode() !== 200) { + } + + if ($response->getStatusCode() !== 200) { throw new MojangApiException('Unexpected request result'); } diff --git a/common/config/ConfigLoader.php b/common/config/ConfigLoader.php index c4bf229..58f4495 100644 --- a/common/config/ConfigLoader.php +++ b/common/config/ConfigLoader.php @@ -1,4 +1,6 @@ 'common-tests', + 'basePath' => dirname(__DIR__), + 'params' => [ + 'fromEmail' => 'ely@ely.by', + ], + 'components' => [ + 'security' => [ + // It's allows us to increase tests speed by decreasing password hashing algorithm complexity + 'passwordHashCost' => 4, + ], + 'queue' => [ + 'class' => common\tests\_support\queue\Queue::class, + ], + 'sentry' => [ + 'enabled' => false, + ], + 'mailer' => [ + 'useFileTransport' => true, + ], + ], +]; diff --git a/common/config/config.php b/common/config/config.php index cd71980..8e468c6 100644 --- a/common/config/config.php +++ b/common/config/config.php @@ -2,6 +2,24 @@ return [ 'version' => '{{PLACE_VERSION_HERE}}', // This will be replaced by build tool 'vendorPath' => dirname(__DIR__, 2) . '/vendor', + 'aliases' => [ + '@bower' => '@vendor/bower-asset', + '@npm' => '@vendor/npm-asset', + + '@root' => dirname(__DIR__, 2), + '@api' => '@root/api', + '@common' => '@root/common', + '@console' => '@root/console', + ], + 'params' => [ + 'fromEmail' => 'ely@ely.by', + 'supportEmail' => 'support@ely.by', + ], + 'container' => [ + 'definitions' => [ + GuzzleHttp\ClientInterface::class => GuzzleHttp\Client::class, + ], + ], 'components' => [ 'cache' => [ 'class' => yii\redis\Cache::class, @@ -91,13 +109,4 @@ return [ 'class' => yii\queue\redis\Queue::class, ], ], - 'container' => [ - 'definitions' => [ - GuzzleHttp\ClientInterface::class => GuzzleHttp\Client::class, - ], - ], - 'aliases' => [ - '@bower' => '@vendor/bower-asset', - '@npm' => '@vendor/npm-asset', - ], ]; diff --git a/common/config/params.php b/common/config/params.php deleted file mode 100644 index bc54b66..0000000 --- a/common/config/params.php +++ /dev/null @@ -1,5 +0,0 @@ - 'ely@ely.by', - 'supportEmail' => 'support@ely.by', -]; diff --git a/common/models/UsernameHistory.php b/common/models/UsernameHistory.php index bba421b..8ffc061 100644 --- a/common/models/UsernameHistory.php +++ b/common/models/UsernameHistory.php @@ -45,7 +45,7 @@ class UsernameHistory extends ActiveRecord { * @param int $afterTime * @return UsernameHistory|null */ - public function findNext(int $afterTime = null): ?UsernameHistory { + public function findNext(int $afterTime = null): ?self { return self::find() ->andWhere(['account_id' => $this->account_id]) ->andWhere(['>', 'applied_in', $afterTime ?: $this->applied_in]) diff --git a/common/tests/.gitignore b/common/tests/.gitignore new file mode 100644 index 0000000..089cfd4 --- /dev/null +++ b/common/tests/.gitignore @@ -0,0 +1,2 @@ +unit.suite.yml +_support/_generated diff --git a/common/tests/_bootstrap.php b/common/tests/_bootstrap.php new file mode 100644 index 0000000..ea96bfa --- /dev/null +++ b/common/tests/_bootstrap.php @@ -0,0 +1,8 @@ + 'Redis', + ]; + + public function _initialize(): void { + if (!$this->hasModule($this->config['module'])) { + throw new ModuleConfigException($this, 'This module should be used together with Redis module'); + } + + /** @var \Codeception\Module\Redis $module */ + $module = $this->getModule($this->config['module']); + $config = $module->_getConfig(); + $config['host'] = Yii::$app->redis->hostname; + $config['port'] = Yii::$app->redis->port; + $config['database'] = Yii::$app->redis->database; + $module->_setConfig($config); + if ($module->driver !== null) { + $module->_initialize(); + } + } + +} diff --git a/tests/codeception/common/_support/FixtureHelper.php b/common/tests/_support/FixtureHelper.php similarity index 77% rename from tests/codeception/common/_support/FixtureHelper.php rename to common/tests/_support/FixtureHelper.php index 6e5dfd0..17914cd 100644 --- a/tests/codeception/common/_support/FixtureHelper.php +++ b/common/tests/_support/FixtureHelper.php @@ -1,15 +1,15 @@ 'deleted-oauth-client', 'secret' => 'YISLDvIHlLbhsvYoIJScUzTURVXK32Q58sHWSFKyO71iCIlv4YM2Zt1kEK7DQLXX', 'type' => 'application', - 'name' => 'I was deleted :(', + 'name' => 'Deleted OAuth Client', 'description' => null, 'redirect_uri' => 'http://not-exists-site.com/oauth/ely', 'website_url' => '', diff --git a/tests/codeception/common/fixtures/data/oauth-sessions.php b/common/tests/fixtures/data/oauth-sessions.php similarity index 100% rename from tests/codeception/common/fixtures/data/oauth-sessions.php rename to common/tests/fixtures/data/oauth-sessions.php diff --git a/tests/codeception/common/fixtures/data/usernames-history.php b/common/tests/fixtures/data/usernames-history.php similarity index 100% rename from tests/codeception/common/fixtures/data/usernames-history.php rename to common/tests/fixtures/data/usernames-history.php diff --git a/tests/codeception/common/fixtures/data/webhooks-events.php b/common/tests/fixtures/data/webhooks-events.php similarity index 100% rename from tests/codeception/common/fixtures/data/webhooks-events.php rename to common/tests/fixtures/data/webhooks-events.php diff --git a/tests/codeception/common/fixtures/data/webhooks.php b/common/tests/fixtures/data/webhooks.php similarity index 100% rename from tests/codeception/common/fixtures/data/webhooks.php rename to common/tests/fixtures/data/webhooks.php diff --git a/tests/codeception/common/helpers/Mock.php b/common/tests/helpers/Mock.php similarity index 92% rename from tests/codeception/common/helpers/Mock.php rename to common/tests/helpers/Mock.php index bc3e636..78fe5ab 100644 --- a/tests/codeception/common/helpers/Mock.php +++ b/common/tests/helpers/Mock.php @@ -1,6 +1,6 @@ behaviors['dataBehavior']; $this->callProtected($behavior, 'setKey', 'my-key', 'my-value'); - $this->assertEquals(serialize(['my-key' => 'my-value']), $model->_data); + $this->assertSame(serialize(['my-key' => 'my-value']), $model->_data); } public function testGetKey() { @@ -25,7 +25,7 @@ class DataBehaviorTest extends TestCase { $model->_data = serialize(['some-key' => 'some-value']); /** @var DataBehavior $behavior */ $behavior = $model->behaviors['dataBehavior']; - $this->assertEquals('some-value', $this->callProtected($behavior, 'getKey', 'some-key')); + $this->assertSame('some-value', $this->callProtected($behavior, 'getKey', 'some-key')); } public function testGetData() { diff --git a/tests/codeception/common/unit/behaviors/EmailActivationExpirationBehaviorTest.php b/common/tests/unit/behaviors/EmailActivationExpirationBehaviorTest.php similarity index 94% rename from tests/codeception/common/unit/behaviors/EmailActivationExpirationBehaviorTest.php rename to common/tests/unit/behaviors/EmailActivationExpirationBehaviorTest.php index 5078acb..b25d142 100644 --- a/tests/codeception/common/unit/behaviors/EmailActivationExpirationBehaviorTest.php +++ b/common/tests/unit/behaviors/EmailActivationExpirationBehaviorTest.php @@ -1,10 +1,10 @@ createBehavior(); $time = time(); $behavior->owner->created_at = $time; - $this->assertEquals($time + 10, $this->callProtected($behavior, 'calculateTime', 10)); + $this->assertSame($time + 10, $this->callProtected($behavior, 'calculateTime', 10)); } public function testCompareTime() { diff --git a/tests/codeception/common/unit/behaviors/PrimaryKeyValueBehaviorTest.php b/common/tests/unit/behaviors/PrimaryKeyValueBehaviorTest.php similarity index 96% rename from tests/codeception/common/unit/behaviors/PrimaryKeyValueBehaviorTest.php rename to common/tests/unit/behaviors/PrimaryKeyValueBehaviorTest.php index 4ec7406..42d2e6f 100644 --- a/tests/codeception/common/unit/behaviors/PrimaryKeyValueBehaviorTest.php +++ b/common/tests/unit/behaviors/PrimaryKeyValueBehaviorTest.php @@ -1,9 +1,9 @@ handler->append(new Response(200, [], '{"id": "7125ba8b1c864508b92bb5c042ccfe2b","name": "KrisJelbring"}')); $response = (new Api())->usernameToUUID('KrisJelbring'); $this->assertInstanceOf(UsernameToUUIDResponse::class, $response); - $this->assertEquals('7125ba8b1c864508b92bb5c042ccfe2b', $response->id); - $this->assertEquals('KrisJelbring', $response->name); + $this->assertSame('7125ba8b1c864508b92bb5c042ccfe2b', $response->id); + $this->assertSame('KrisJelbring', $response->name); } /** diff --git a/tests/codeception/common/unit/db/mysql/QueryBuilderTest.php b/common/tests/unit/db/mysql/QueryBuilderTest.php similarity index 62% rename from tests/codeception/common/unit/db/mysql/QueryBuilderTest.php rename to common/tests/unit/db/mysql/QueryBuilderTest.php index 77a3d96..6a8a635 100644 --- a/tests/codeception/common/unit/db/mysql/QueryBuilderTest.php +++ b/common/tests/unit/db/mysql/QueryBuilderTest.php @@ -1,8 +1,8 @@ db); $result = $queryBuilder->buildOrderBy(['dummy' => ['first', 'second']]); - $this->assertEquals("ORDER BY FIELD(`dummy`,'first','second')", $result); + $this->assertSame("ORDER BY FIELD(`dummy`,'first','second')", $result); } } diff --git a/tests/codeception/common/unit/emails/EmailHelperTest.php b/common/tests/unit/emails/EmailHelperTest.php similarity index 71% rename from tests/codeception/common/unit/emails/EmailHelperTest.php rename to common/tests/unit/emails/EmailHelperTest.php index 0f1f62d..1db6322 100644 --- a/tests/codeception/common/unit/emails/EmailHelperTest.php +++ b/common/tests/unit/emails/EmailHelperTest.php @@ -1,8 +1,8 @@ makePartial(); - $this->assertEquals('find-me', $template->getTo()); + $this->assertSame('find-me', $template->getTo()); $this->assertInstanceOf(MailerInterface::class, $template->getMailer()); } @@ -22,13 +22,13 @@ class TemplateTest extends TestCase { Yii::$app->params['fromEmail'] = 'find-me'; /** @var Template|\Mockery\MockInterface $template */ $template = mock(Template::class)->makePartial(); - $this->assertEquals(['find-me' => 'Ely.by Accounts'], $template->getFrom()); + $this->assertSame(['find-me' => 'Ely.by Accounts'], $template->getFrom()); } public function testGetParams() { /** @var Template|\Mockery\MockInterface $template */ $template = mock(Template::class)->makePartial(); - $this->assertEquals([], $template->getParams()); + $this->assertSame([], $template->getParams()); } public function testCreateMessage() { @@ -39,9 +39,9 @@ class TemplateTest extends TestCase { /** @var MessageInterface $message */ $message = $this->callProtected($template, 'createMessage'); $this->assertInstanceOf(MessageInterface::class, $message); - $this->assertEquals(['to@ely.by' => 'To'], $message->getTo()); - $this->assertEquals(['from@ely.by' => 'Ely.by Accounts'], $message->getFrom()); - $this->assertEquals('mock-subject', $message->getSubject()); + $this->assertSame(['to@ely.by' => 'To'], $message->getTo()); + $this->assertSame(['from@ely.by' => 'Ely.by Accounts'], $message->getFrom()); + $this->assertSame('mock-subject', $message->getSubject()); } } diff --git a/tests/codeception/common/unit/emails/TemplateWithRendererTest.php b/common/tests/unit/emails/TemplateWithRendererTest.php similarity index 76% rename from tests/codeception/common/unit/emails/TemplateWithRendererTest.php rename to common/tests/unit/emails/TemplateWithRendererTest.php index 83f715c..08e2aa5 100644 --- a/tests/codeception/common/unit/emails/TemplateWithRendererTest.php +++ b/common/tests/unit/emails/TemplateWithRendererTest.php @@ -1,11 +1,11 @@ makePartial(); - $this->assertEquals('mock-to', $template->getTo()); - $this->assertEquals('mock-locale', $template->getLocale()); + $this->assertSame('mock-to', $template->getTo()); + $this->assertSame('mock-locale', $template->getLocale()); $this->assertInstanceOf(MailerInterface::class, $template->getMailer()); $this->assertInstanceOf(EmailRenderer::class, $template->getEmailRenderer()); } @@ -40,10 +40,10 @@ class TemplateWithRendererTest extends TestCase { /** @var \yii\swiftmailer\Message $message */ $message = $this->callProtected($template, 'createMessage'); $this->assertInstanceOf(MessageInterface::class, $message); - $this->assertEquals(['to@ely.by' => 'To'], $message->getTo()); - $this->assertEquals(['from@ely.by' => 'From'], $message->getFrom()); - $this->assertEquals('mock-subject', $message->getSubject()); - $this->assertEquals('mock-html', $message->getSwiftMessage()->getBody()); + $this->assertSame(['to@ely.by' => 'To'], $message->getTo()); + $this->assertSame(['from@ely.by' => 'From'], $message->getFrom()); + $this->assertSame('mock-subject', $message->getSubject()); + $this->assertSame('mock-html', $message->getSwiftMessage()->getBody()); } } diff --git a/tests/codeception/common/unit/helpers/StringHelperTest.php b/common/tests/unit/helpers/StringHelperTest.php similarity index 79% rename from tests/codeception/common/unit/helpers/StringHelperTest.php rename to common/tests/unit/helpers/StringHelperTest.php index fe6e4bf..4d9a84f 100644 --- a/tests/codeception/common/unit/helpers/StringHelperTest.php +++ b/common/tests/unit/helpers/StringHelperTest.php @@ -1,16 +1,17 @@ assertEquals('**@ely.by', StringHelper::getEmailMask('e@ely.by')); - $this->assertEquals('e**@ely.by', StringHelper::getEmailMask('es@ely.by')); - $this->assertEquals('e**i@ely.by', StringHelper::getEmailMask('eri@ely.by')); - $this->assertEquals('er**ch@ely.by', StringHelper::getEmailMask('erickskrauch@ely.by')); - $this->assertEquals('эр**уч@елу.бел', StringHelper::getEmailMask('эрикскрауч@елу.бел')); + $this->assertSame('**@ely.by', StringHelper::getEmailMask('e@ely.by')); + $this->assertSame('e**@ely.by', StringHelper::getEmailMask('es@ely.by')); + $this->assertSame('e**i@ely.by', StringHelper::getEmailMask('eri@ely.by')); + $this->assertSame('er**ch@ely.by', StringHelper::getEmailMask('erickskrauch@ely.by')); + $this->assertSame('эр**уч@елу.бел', StringHelper::getEmailMask('эрикскрауч@елу.бел')); } public function testIsUuid() { @@ -24,7 +25,7 @@ class StringHelperTest extends \PHPUnit_Framework_TestCase { */ public function testTrim($expected, $string) { $result = StringHelper::trim($string); - $this->assertEquals($expected, $result); + $this->assertSame($expected, $result); } /** diff --git a/tests/codeception/common/unit/models/AccountSessionTest.php b/common/tests/unit/models/AccountSessionTest.php similarity index 63% rename from tests/codeception/common/unit/models/AccountSessionTest.php rename to common/tests/unit/models/AccountSessionTest.php index 0e98803..46b8a6c 100644 --- a/tests/codeception/common/unit/models/AccountSessionTest.php +++ b/common/tests/unit/models/AccountSessionTest.php @@ -1,8 +1,8 @@ setIp('127.0.0.1'); - $this->assertEquals(2130706433, $model->last_used_ip, 'method should convert passed ip string to long'); + $this->assertSame(2130706433, $model->last_used_ip, 'method should convert passed ip string to long'); } public function testGetReadableIp() { $model = new AccountSession(); $model->last_used_ip = 2130706433; - $this->assertEquals('127.0.0.1', $model->getReadableIp(), 'method should convert stored long into readable ip'); + $this->assertSame('127.0.0.1', $model->getReadableIp(), 'method should convert stored long into readable ip'); } } diff --git a/tests/codeception/common/unit/models/AccountTest.php b/common/tests/unit/models/AccountTest.php similarity index 89% rename from tests/codeception/common/unit/models/AccountTest.php rename to common/tests/unit/models/AccountTest.php index ab9b477..0f8a31e 100644 --- a/tests/codeception/common/unit/models/AccountTest.php +++ b/common/tests/unit/models/AccountTest.php @@ -1,14 +1,14 @@ setPassword('12345678'); $this->assertNotEmpty($model->password_hash, 'hash should be set'); $this->assertTrue($model->validatePassword('12345678'), 'validation should be passed'); - $this->assertEquals(Account::PASS_HASH_STRATEGY_YII2, $model->password_hash_strategy, 'latest password hash should be used'); + $this->assertSame(Account::PASS_HASH_STRATEGY_YII2, $model->password_hash_strategy, 'latest password hash should be used'); } public function testValidatePassword() { @@ -83,7 +83,7 @@ class AccountTest extends TestCase { public function testGetProfileLink() { $model = new Account(); $model->id = '123'; - $this->assertEquals('http://ely.by/u123', $model->getProfileLink()); + $this->assertSame('http://ely.by/u123', $model->getProfileLink()); } public function testIsAgreedWithActualRules() { @@ -108,9 +108,9 @@ class AccountTest extends TestCase { public function testSetRegistrationIp() { $account = new Account(); $account->setRegistrationIp('42.72.205.204'); - $this->assertEquals('42.72.205.204', inet_ntop($account->registration_ip)); + $this->assertSame('42.72.205.204', inet_ntop($account->registration_ip)); $account->setRegistrationIp('2001:1620:28:1:b6f:8bca:93:a116'); - $this->assertEquals('2001:1620:28:1:b6f:8bca:93:a116', inet_ntop($account->registration_ip)); + $this->assertSame('2001:1620:28:1:b6f:8bca:93:a116', inet_ntop($account->registration_ip)); $account->setRegistrationIp(null); $this->assertNull($account->registration_ip); } @@ -118,9 +118,9 @@ class AccountTest extends TestCase { public function testGetRegistrationIp() { $account = new Account(); $account->setRegistrationIp('42.72.205.204'); - $this->assertEquals('42.72.205.204', $account->getRegistrationIp()); + $this->assertSame('42.72.205.204', $account->getRegistrationIp()); $account->setRegistrationIp('2001:1620:28:1:b6f:8bca:93:a116'); - $this->assertEquals('2001:1620:28:1:b6f:8bca:93:a116', $account->getRegistrationIp()); + $this->assertSame('2001:1620:28:1:b6f:8bca:93:a116', $account->getRegistrationIp()); $account->setRegistrationIp(null); $this->assertNull($account->getRegistrationIp()); } diff --git a/tests/codeception/common/unit/models/EmailActivationTest.php b/common/tests/unit/models/EmailActivationTest.php similarity index 87% rename from tests/codeception/common/unit/models/EmailActivationTest.php rename to common/tests/unit/models/EmailActivationTest.php index d436b23..a7103dd 100644 --- a/tests/codeception/common/unit/models/EmailActivationTest.php +++ b/common/tests/unit/models/EmailActivationTest.php @@ -1,10 +1,10 @@ assertInstanceOf(ClearOauthSessions::class, $result); $this->assertSame('mocked-id', $result->clientId); - $this->assertEquals(time(), $result->notSince, '', 1); + $this->assertEqualsWithDelta(time(), $result->notSince, 1); } public function testExecute() { diff --git a/tests/codeception/common/unit/tasks/CreateWebHooksDeliveriesTest.php b/common/tests/unit/tasks/CreateWebHooksDeliveriesTest.php similarity index 96% rename from tests/codeception/common/unit/tasks/CreateWebHooksDeliveriesTest.php rename to common/tests/unit/tasks/CreateWebHooksDeliveriesTest.php index 4596a51..f67a186 100644 --- a/tests/codeception/common/unit/tasks/CreateWebHooksDeliveriesTest.php +++ b/common/tests/unit/tasks/CreateWebHooksDeliveriesTest.php @@ -1,13 +1,13 @@ assertSame('account.edit', $request->getHeaders()['X-Ely-Accounts-Event'][0]); $this->assertSame('application/x-www-form-urlencoded', $request->getHeaders()['Content-Type'][0]); $this->assertArrayNotHasKey('X-Hub-Signature', $request->getHeaders()); - $this->assertEquals('key=value&another=value', (string)$request->getBody()); + $this->assertSame('key=value&another=value', (string)$request->getBody()); } public function testExecuteSuccessDeliveryWithSignature() { @@ -74,7 +74,7 @@ class DeliveryWebHookTest extends TestCase { $this->assertSame('account.edit', $request->getHeaders()['X-Ely-Accounts-Event'][0]); $this->assertSame('application/x-www-form-urlencoded', $request->getHeaders()['Content-Type'][0]); $this->assertSame('sha1=3c0b1eef564b2d3a5e9c0f2a8302b1b42b3d4784', $request->getHeaders()['X-Hub-Signature'][0]); - $this->assertEquals('key=value&another=value', (string)$request->getBody()); + $this->assertSame('key=value&another=value', (string)$request->getBody()); } public function testExecuteHandleClientException() { diff --git a/tests/codeception/common/unit/tasks/PullMojangUsernameTest.php b/common/tests/unit/tasks/PullMojangUsernameTest.php similarity index 96% rename from tests/codeception/common/unit/tasks/PullMojangUsernameTest.php rename to common/tests/unit/tasks/PullMojangUsernameTest.php index cac50b4..df97827 100644 --- a/tests/codeception/common/unit/tasks/PullMojangUsernameTest.php +++ b/common/tests/unit/tasks/PullMojangUsernameTest.php @@ -1,7 +1,7 @@ assertInstanceOf(MojangUsername::class, $mojangUsername); - $this->assertNotEquals($mojangInfo->uuid, $mojangUsername->uuid); + $this->assertNotSame($mojangInfo->uuid, $mojangUsername->uuid); } } diff --git a/tests/codeception/common/unit/tasks/SendCurrentEmailConfirmationTest.php b/common/tests/unit/tasks/SendCurrentEmailConfirmationTest.php similarity index 95% rename from tests/codeception/common/unit/tasks/SendCurrentEmailConfirmationTest.php rename to common/tests/unit/tasks/SendCurrentEmailConfirmationTest.php index eb81b0a..768001b 100644 --- a/tests/codeception/common/unit/tasks/SendCurrentEmailConfirmationTest.php +++ b/common/tests/unit/tasks/SendCurrentEmailConfirmationTest.php @@ -1,10 +1,10 @@ createModel("testemail@ely.by\u{feff}"); // Zero width no-break space (U+FEFF) $this->validator->validateAttribute($model, 'field'); - $this->assertEquals(['error.email_invalid'], $model->getErrors('field')); - $this->assertEquals('testemail@ely.by', $model->field); + $this->assertSame(['error.email_invalid'], $model->getErrors('field')); + $this->assertSame('testemail@ely.by', $model->field); } public function testValidateAttributeRequired() { $model = $this->createModel(''); $this->validator->validateAttribute($model, 'field'); - $this->assertEquals(['error.email_required'], $model->getErrors('field')); + $this->assertSame(['error.email_required'], $model->getErrors('field')); $model = $this->createModel('email'); $this->validator->validateAttribute($model, 'field'); - $this->assertNotEquals(['error.email_required'], $model->getErrors('field')); + $this->assertNotSame(['error.email_required'], $model->getErrors('field')); } public function testValidateAttributeLength() { @@ -49,11 +49,11 @@ class EmailValidatorTest extends TestCase { '@gmail.com' // = 256 symbols ); $this->validator->validateAttribute($model, 'field'); - $this->assertEquals(['error.email_too_long'], $model->getErrors('field')); + $this->assertSame(['error.email_too_long'], $model->getErrors('field')); $model = $this->createModel('some-email@gmail.com'); $this->validator->validateAttribute($model, 'field'); - $this->assertNotEquals(['error.email_too_long'], $model->getErrors('field')); + $this->assertNotSame(['error.email_too_long'], $model->getErrors('field')); } public function testValidateAttributeEmail() { @@ -61,15 +61,15 @@ class EmailValidatorTest extends TestCase { $model = $this->createModel('non-email'); $this->validator->validateAttribute($model, 'field'); - $this->assertEquals(['error.email_invalid'], $model->getErrors('field')); + $this->assertSame(['error.email_invalid'], $model->getErrors('field')); $model = $this->createModel('non-email@etot-domen-ne-suschestrvyet.de'); $this->validator->validateAttribute($model, 'field'); - $this->assertEquals(['error.email_invalid'], $model->getErrors('field')); + $this->assertSame(['error.email_invalid'], $model->getErrors('field')); $model = $this->createModel('valid-email@gmail.com'); $this->validator->validateAttribute($model, 'field'); - $this->assertNotEquals(['error.email_invalid'], $model->getErrors('field')); + $this->assertNotSame(['error.email_invalid'], $model->getErrors('field')); } public function testValidateAttributeTempmail() { @@ -77,11 +77,11 @@ class EmailValidatorTest extends TestCase { $model = $this->createModel('ibrpycwyjdnt@dropmail.me'); $this->validator->validateAttribute($model, 'field'); - $this->assertEquals(['error.email_is_tempmail'], $model->getErrors('field')); + $this->assertSame(['error.email_is_tempmail'], $model->getErrors('field')); $model = $this->createModel('valid-email@gmail.com'); $this->validator->validateAttribute($model, 'field'); - $this->assertNotEquals(['error.email_is_tempmail'], $model->getErrors('field')); + $this->assertNotSame(['error.email_is_tempmail'], $model->getErrors('field')); } public function testValidateAttributeIdna() { @@ -108,19 +108,19 @@ class EmailValidatorTest extends TestCase { $model = $this->createModel($accountFixture->email); $this->validator->validateAttribute($model, 'field'); - $this->assertEquals(['error.email_not_available'], $model->getErrors('field')); + $this->assertSame(['error.email_not_available'], $model->getErrors('field')); $model = $this->createModel($accountFixture->email); $this->validator->accountCallback = function() use ($accountFixture) { return $accountFixture->id; }; $this->validator->validateAttribute($model, 'field'); - $this->assertNotEquals(['error.email_not_available'], $model->getErrors('field')); + $this->assertNotSame(['error.email_not_available'], $model->getErrors('field')); $this->validator->accountCallback = null; $model = $this->createModel('some-unique-email@gmail.com'); $this->validator->validateAttribute($model, 'field'); - $this->assertNotEquals(['error.email_not_available'], $model->getErrors('field')); + $this->assertNotSame(['error.email_not_available'], $model->getErrors('field')); } /** diff --git a/tests/codeception/common/unit/validators/LanguageValidatorTest.php b/common/tests/unit/validators/LanguageValidatorTest.php similarity index 92% rename from tests/codeception/common/unit/validators/LanguageValidatorTest.php rename to common/tests/unit/validators/LanguageValidatorTest.php index e6d077e..b11bd6f 100644 --- a/tests/codeception/common/unit/validators/LanguageValidatorTest.php +++ b/common/tests/unit/validators/LanguageValidatorTest.php @@ -1,10 +1,10 @@ message = 'mock message'; $validator->validate($address, $errors); - $this->assertEquals($shouldBeValid, $errors === null); + if ($shouldBeValid) { + $this->assertNull($errors); + } else { + $this->assertSame('mock message', $errors); + } } public function domainNames() { return [ - ['localhost', true ], - ['localhost:25565', true ], - ['mc.hypixel.net', true ], - ['mc.hypixel.net:25565', true ], - ['136.243.88.97', true ], - ['136.243.88.97:25565', true ], + ['localhost', true], + ['localhost:25565', true], + ['mc.hypixel.net', true], + ['mc.hypixel.net:25565', true], + ['136.243.88.97', true], + ['136.243.88.97:25565', true], ['http://ely.by', false], ['http://ely.by:80', false], ['ely.by/abcd', false], diff --git a/tests/codeception/common/unit/validators/UsernameValidatorTest.php b/common/tests/unit/validators/UsernameValidatorTest.php similarity index 74% rename from tests/codeception/common/unit/validators/UsernameValidatorTest.php rename to common/tests/unit/validators/UsernameValidatorTest.php index b8bae8d..0a32634 100644 --- a/tests/codeception/common/unit/validators/UsernameValidatorTest.php +++ b/common/tests/unit/validators/UsernameValidatorTest.php @@ -1,9 +1,9 @@ createModel("HereIsJohnny#\u{feff}"); // Zero width no-break space (U+FEFF) $this->validator->validateAttribute($model, 'field'); - $this->assertEquals(['error.username_invalid'], $model->getErrors('field')); - $this->assertEquals('HereIsJohnny#', $model->field); + $this->assertSame(['error.username_invalid'], $model->getErrors('field')); + $this->assertSame('HereIsJohnny#', $model->field); } public function testValidateAttributeRequired() { $model = $this->createModel(''); $this->validator->validateAttribute($model, 'field'); - $this->assertEquals(['error.username_required'], $model->getErrors('field')); + $this->assertSame(['error.username_required'], $model->getErrors('field')); $model = $this->createModel('username'); $this->validator->validateAttribute($model, 'field'); - $this->assertNotEquals(['error.username_required'], $model->getErrors('field')); + $this->assertNotSame(['error.username_required'], $model->getErrors('field')); } public function testValidateAttributeLength() { $model = $this->createModel('at'); $this->validator->validateAttribute($model, 'field'); - $this->assertEquals(['error.username_too_short'], $model->getErrors('field')); + $this->assertSame(['error.username_too_short'], $model->getErrors('field')); $model = $this->createModel('erickskrauch_erickskrauch'); $this->validator->validateAttribute($model, 'field'); - $this->assertEquals(['error.username_too_long'], $model->getErrors('field')); + $this->assertSame(['error.username_too_long'], $model->getErrors('field')); $model = $this->createModel('username'); $this->validator->validateAttribute($model, 'field'); - $this->assertNotEquals(['error.username_too_short'], $model->getErrors('field')); - $this->assertNotEquals(['error.username_too_long'], $model->getErrors('field')); + $this->assertNotSame(['error.username_too_short'], $model->getErrors('field')); + $this->assertNotSame(['error.username_too_long'], $model->getErrors('field')); } // TODO: rewrite this test with @provider usage @@ -59,7 +59,7 @@ class UsernameValidatorTest extends TestCase { foreach ($shouldBeValid as $nickname) { $model = $this->createModel($nickname); $this->validator->validateAttribute($model, 'field'); - $this->assertNotEquals(['error.username_invalid'], $model->getErrors('field')); + $this->assertNotSame(['error.username_invalid'], $model->getErrors('field')); } $shouldBeInvalid = [ @@ -68,7 +68,7 @@ class UsernameValidatorTest extends TestCase { foreach ($shouldBeInvalid as $nickname) { $model = $this->createModel($nickname); $this->validator->validateAttribute($model, 'field'); - $this->assertEquals(['error.username_invalid'], $model->getErrors('field')); + $this->assertSame(['error.username_invalid'], $model->getErrors('field')); } } @@ -82,19 +82,19 @@ class UsernameValidatorTest extends TestCase { $model = $this->createModel($accountFixture->username); $this->validator->validateAttribute($model, 'field'); - $this->assertEquals(['error.username_not_available'], $model->getErrors('field')); + $this->assertSame(['error.username_not_available'], $model->getErrors('field')); $model = $this->createModel($accountFixture->username); $this->validator->accountCallback = function() use ($accountFixture) { return $accountFixture->id; }; $this->validator->validateAttribute($model, 'field'); - $this->assertNotEquals(['error.username_not_available'], $model->getErrors('field')); + $this->assertNotSame(['error.username_not_available'], $model->getErrors('field')); $this->validator->accountCallback = null; $model = $this->createModel('some-unique-username'); $this->validator->validateAttribute($model, 'field'); - $this->assertNotEquals(['error.username_not_available'], $model->getErrors('field')); + $this->assertNotSame(['error.username_not_available'], $model->getErrors('field')); } /** diff --git a/tests/codeception/common/unit/validators/UuidValidatorTest.php b/common/tests/unit/validators/UuidValidatorTest.php similarity index 85% rename from tests/codeception/common/unit/validators/UuidValidatorTest.php rename to common/tests/unit/validators/UuidValidatorTest.php index d41775e..191af72 100644 --- a/tests/codeception/common/unit/validators/UuidValidatorTest.php +++ b/common/tests/unit/validators/UuidValidatorTest.php @@ -1,10 +1,10 @@ createModel(); $validator->validateAttribute($model, 'attribute'); $this->assertTrue($model->hasErrors()); - $this->assertEquals(['Attribute must be valid uuid'], $model->getErrors('attribute')); + $this->assertSame(['Attribute must be valid uuid'], $model->getErrors('attribute')); }); $this->specify('expected error if passed invalid string', function() { @@ -25,7 +25,7 @@ class UuidValidatorTest extends TestCase { $model->attribute = '123456789'; $validator->validateAttribute($model, 'attribute'); $this->assertTrue($model->hasErrors()); - $this->assertEquals(['Attribute must be valid uuid'], $model->getErrors('attribute')); + $this->assertSame(['Attribute must be valid uuid'], $model->getErrors('attribute')); }); $this->specify('no errors if passed nil uuid and allowNil is set to true', function() { @@ -43,7 +43,7 @@ class UuidValidatorTest extends TestCase { $model->attribute = '00000000-0000-0000-0000-000000000000'; $validator->validateAttribute($model, 'attribute'); $this->assertTrue($model->hasErrors()); - $this->assertEquals(['Attribute must be valid uuid'], $model->getErrors('attribute')); + $this->assertSame(['Attribute must be valid uuid'], $model->getErrors('attribute')); }); $this->specify('no errors if passed valid uuid', function() { @@ -61,7 +61,7 @@ class UuidValidatorTest extends TestCase { $model->attribute = str_replace('-', '', $originalUuid); $validator->validateAttribute($model, 'attribute'); $this->assertFalse($model->hasErrors()); - $this->assertEquals($originalUuid, $model->attribute); + $this->assertSame($originalUuid, $model->attribute); }); } diff --git a/composer.json b/composer.json index d6448ff..c69b94e 100644 --- a/composer.json +++ b/composer.json @@ -1,11 +1,16 @@ { "name": "elyby/accounts", - "description": "Authentication service for Ely.by", + "description": "Authentication service for the Ely.by", "homepage": "https://account.ely.by", "type": "project", "minimum-stability": "stable", "require": { - "php": "^7.1", + "php": "^7.2", + "ext-json": "*", + "ext-mbstring": "*", + "ext-pdo": "*", + "ext-libxml": "*", + "ext-simplexml": "*", "yiisoft/yii2": "2.0.15.1", "yiisoft/yii2-swiftmailer": "~2.1.0", "ramsey/uuid": "^3.5", @@ -20,7 +25,7 @@ "bacon/bacon-qr-code": "^1.0", "paragonie/constant_time_encoding": "^2.0", "webmozart/assert": "^1.2.0", - "goaop/framework": "~2.2.0", + "goaop/framework": "^2.2.0", "domnikl/statsd": "^2.6", "yiisoft/yii2-queue": "~2.1.0" }, @@ -28,17 +33,22 @@ "yiisoft/yii2-debug": "*", "yiisoft/yii2-faker": "*", "flow/jsonpath": "^0.4.0", - "phpunit/phpunit": "^6.0", - "codeception/codeception": "2.3.8", + "codeception/codeception": "^2.5.3", "codeception/specify": "^1.0.0", "codeception/verify": "*", "mockery/mockery": "^1.0.0", "php-mock/php-mock-mockery": "^1.2.0", - "friendsofphp/php-cs-fixer": "^2.11", - "ely/php-code-style": "^0.1.0", + "ely/php-code-style": "^0.3.0", "predis/predis": "^1.1", "roave/security-advisories": "dev-master" }, + "replace": { + "paragonie/random_compat": "2.99.99", + "symfony/polyfill-ctype": "*", + "symfony/polyfill-mbstring": "*", + "symfony/polyfill-php70": "*", + "symfony/polyfill-php72": "*" + }, "repositories": [ { "type": "composer", @@ -49,6 +59,9 @@ "url": "https://gitlab+deploy-token-1:FDGgmcnLdykcsyJJ_8Uv@gitlab.ely.by/elyby/email-renderer.git" } ], + "config": { + "sort-packages": true + }, "autoload": { "psr-4": { "api\\": "api", @@ -58,5 +71,12 @@ "files": [ "common/consts.php" ] + }, + "autoload-dev": { + "psr-4": { + "api\\tests\\": "api/tests", + "common\\tests\\": "common/tests", + "console\\tests\\": "console/tests" + } } } diff --git a/composer.lock b/composer.lock index cba9321..b6118c3 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "7368afb90e5f3ed26a7b6d98551da170", + "content-hash": "edb3d935ad36f30c49f8a4db6132747a", "packages": [ { "name": "bacon/bacon-qr-code", @@ -54,25 +54,25 @@ }, { "name": "beberlei/assert", - "version": "v2.9.2", + "version": "v3.2.0", "source": { "type": "git", "url": "https://github.com/beberlei/assert.git", - "reference": "2d555f72f3f4ff9e72a7bc17cb8a53c86737c8a0" + "reference": "fd82f4c8592c8128dd74481034c31da71ebafc56" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/beberlei/assert/zipball/2d555f72f3f4ff9e72a7bc17cb8a53c86737c8a0", - "reference": "2d555f72f3f4ff9e72a7bc17cb8a53c86737c8a0", + "url": "https://api.github.com/repos/beberlei/assert/zipball/fd82f4c8592c8128dd74481034c31da71ebafc56", + "reference": "fd82f4c8592c8128dd74481034c31da71ebafc56", "shasum": "" }, "require": { - "ext-mbstring": "*", - "php": ">=5.3" + "php": "^7" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^2.1.1", - "phpunit/phpunit": "^4.8.35|^5.7" + "friendsofphp/php-cs-fixer": "*", + "phpstan/phpstan-shim": "*", + "phpunit/phpunit": "*" }, "type": "library", "autoload": { @@ -105,7 +105,7 @@ "assertion", "validation" ], - "time": "2018-01-25T13:33:16+00:00" + "time": "2018-12-24T15:25:25+00:00" }, { "name": "bower-asset/inputmask", @@ -118,8 +118,7 @@ "dist": { "type": "zip", "url": "https://api.github.com/repos/RobinHerbots/Inputmask/zipball/5e670ad62f50c738388d4dcec78d2888505ad77b", - "reference": "5e670ad62f50c738388d4dcec78d2888505ad77b", - "shasum": null + "reference": "5e670ad62f50c738388d4dcec78d2888505ad77b" }, "require": { "bower-asset/jquery": ">=1.7" @@ -140,8 +139,7 @@ "dist": { "type": "zip", "url": "https://api.github.com/repos/jquery/jquery-dist/zipball/77d2a51d0520d2ee44173afdf4e40a9201f5964e", - "reference": "77d2a51d0520d2ee44173afdf4e40a9201f5964e", - "shasum": null + "reference": "77d2a51d0520d2ee44173afdf4e40a9201f5964e" }, "type": "bower-asset", "license": [ @@ -159,24 +157,22 @@ "dist": { "type": "zip", "url": "https://api.github.com/repos/bestiejs/punycode.js/zipball/38c8d3131a82567bfef18da09f7f4db68c84f8a3", - "reference": "38c8d3131a82567bfef18da09f7f4db68c84f8a3", - "shasum": null + "reference": "38c8d3131a82567bfef18da09f7f4db68c84f8a3" }, "type": "bower-asset" }, { "name": "bower-asset/raven-js", - "version": "3.22.2", + "version": "3.27.0", "source": { "type": "git", - "url": "https://github.com/getsentry/raven-js.git", - "reference": "f8eec063c95f70d8978f895284946bd278748d97" + "url": "git@github.com:getsentry/raven-js-bower.git", + "reference": "c8b3a6040be6928e2f57fa5eec4d7afc31750235" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/getsentry/raven-js/zipball/f8eec063c95f70d8978f895284946bd278748d97", - "reference": "f8eec063c95f70d8978f895284946bd278748d97", - "shasum": null + "url": "https://api.github.com/repos/getsentry/raven-js-bower/zipball/c8b3a6040be6928e2f57fa5eec4d7afc31750235", + "reference": "c8b3a6040be6928e2f57fa5eec4d7afc31750235" }, "type": "bower-asset" }, @@ -191,8 +187,7 @@ "dist": { "type": "zip", "url": "https://api.github.com/repos/yiisoft/jquery-pjax/zipball/aef7b953107264f00234902a3880eb50dafc48be", - "reference": "aef7b953107264f00234902a3880eb50dafc48be", - "shasum": null + "reference": "aef7b953107264f00234902a3880eb50dafc48be" }, "require": { "bower-asset/jquery": ">=1.8" @@ -264,16 +259,16 @@ }, { "name": "daveearley/daves-email-validation-tool", - "version": "v0.1.9", + "version": "v0.1.12", "source": { "type": "git", "url": "https://github.com/daveearley/Email-Validation-Tool.git", - "reference": "a5942e5387dfdd259a9f8e3ba53bc089a77cf7ee" + "reference": "c9e8a340638cbabe05962fe1b2ea7ef79e1a529f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/daveearley/Email-Validation-Tool/zipball/a5942e5387dfdd259a9f8e3ba53bc089a77cf7ee", - "reference": "a5942e5387dfdd259a9f8e3ba53bc089a77cf7ee", + "url": "https://api.github.com/repos/daveearley/Email-Validation-Tool/zipball/c9e8a340638cbabe05962fe1b2ea7ef79e1a529f", + "reference": "c9e8a340638cbabe05962fe1b2ea7ef79e1a529f", "shasum": "" }, "require": { @@ -308,7 +303,7 @@ "email verification", "validate email" ], - "time": "2018-02-01T17:47:27+00:00" + "time": "2018-04-13T00:48:04+00:00" }, { "name": "doctrine/annotations", @@ -380,16 +375,16 @@ }, { "name": "doctrine/cache", - "version": "v1.7.1", + "version": "v1.8.0", "source": { "type": "git", "url": "https://github.com/doctrine/cache.git", - "reference": "b3217d58609e9c8e661cd41357a54d926c4a2a1a" + "reference": "d768d58baee9a4862ca783840eca1b9add7a7f57" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/cache/zipball/b3217d58609e9c8e661cd41357a54d926c4a2a1a", - "reference": "b3217d58609e9c8e661cd41357a54d926c4a2a1a", + "url": "https://api.github.com/repos/doctrine/cache/zipball/d768d58baee9a4862ca783840eca1b9add7a7f57", + "reference": "d768d58baee9a4862ca783840eca1b9add7a7f57", "shasum": "" }, "require": { @@ -400,8 +395,9 @@ }, "require-dev": { "alcaeus/mongo-php-adapter": "^1.1", + "doctrine/coding-standard": "^4.0", "mongodb/mongodb": "^1.1", - "phpunit/phpunit": "^5.7", + "phpunit/phpunit": "^7.0", "predis/predis": "~1.0" }, "suggest": { @@ -410,7 +406,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.7.x-dev" + "dev-master": "1.8.x-dev" } }, "autoload": { @@ -445,12 +441,12 @@ } ], "description": "Caching library offering an object-oriented API for many cache backends", - "homepage": "http://www.doctrine-project.org", + "homepage": "https://www.doctrine-project.org", "keywords": [ "cache", "caching" ], - "time": "2017-08-25T07:02:50+00:00" + "time": "2018-08-21T18:01:43+00:00" }, { "name": "doctrine/lexer", @@ -508,16 +504,16 @@ }, { "name": "domnikl/statsd", - "version": "2.9.0", + "version": "2.10.0", "source": { "type": "git", "url": "https://github.com/domnikl/statsd-php.git", - "reference": "529578b05e455280fbb2748bb0080026d86452bb" + "reference": "0118ac4b576b86d87a072100e4ed921c6204d831" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/domnikl/statsd-php/zipball/529578b05e455280fbb2748bb0080026d86452bb", - "reference": "529578b05e455280fbb2748bb0080026d86452bb", + "url": "https://api.github.com/repos/domnikl/statsd-php/zipball/0118ac4b576b86d87a072100e4ed921c6204d831", + "reference": "0118ac4b576b86d87a072100e4ed921c6204d831", "shasum": "" }, "require": { @@ -551,20 +547,20 @@ "statsd", "udp" ], - "time": "2018-04-29T18:04:03+00:00" + "time": "2018-12-14T19:39:29+00:00" }, { "name": "egulias/email-validator", - "version": "2.1.3", + "version": "2.1.7", "source": { "type": "git", "url": "https://github.com/egulias/EmailValidator.git", - "reference": "1bec00a10039b823cc94eef4eddd47dcd3b2ca04" + "reference": "709f21f92707308cdf8f9bcfa1af4cb26586521e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/1bec00a10039b823cc94eef4eddd47dcd3b2ca04", - "reference": "1bec00a10039b823cc94eef4eddd47dcd3b2ca04", + "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/709f21f92707308cdf8f9bcfa1af4cb26586521e", + "reference": "709f21f92707308cdf8f9bcfa1af4cb26586521e", "shasum": "" }, "require": { @@ -573,7 +569,7 @@ }, "require-dev": { "dominicsayers/isemail": "dev-master", - "phpunit/phpunit": "^4.8.35", + "phpunit/phpunit": "^4.8.35||^5.7||^6.0", "satooshi/php-coveralls": "^1.0.1" }, "suggest": { @@ -608,7 +604,7 @@ "validation", "validator" ], - "time": "2017-11-15T23:40:40+00:00" + "time": "2018-12-04T22:38:24+00:00" }, { "name": "ely/email-renderer", @@ -745,16 +741,16 @@ }, { "name": "ezyang/htmlpurifier", - "version": "v4.9.3", + "version": "v4.10.0", "source": { "type": "git", "url": "https://github.com/ezyang/htmlpurifier.git", - "reference": "95e1bae3182efc0f3422896a3236e991049dac69" + "reference": "d85d39da4576a6934b72480be6978fb10c860021" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/95e1bae3182efc0f3422896a3236e991049dac69", - "reference": "95e1bae3182efc0f3422896a3236e991049dac69", + "url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/d85d39da4576a6934b72480be6978fb10c860021", + "reference": "d85d39da4576a6934b72480be6978fb10c860021", "shasum": "" }, "require": { @@ -788,28 +784,29 @@ "keywords": [ "html" ], - "time": "2017-06-03T02:28:16+00:00" + "time": "2018-02-23T01:58:20+00:00" }, { "name": "goaop/framework", - "version": "2.2.0", + "version": "2.3.0", "source": { "type": "git", "url": "https://github.com/goaop/framework.git", - "reference": "152abbffffcba72d2d159b892deb40b0829d0f28" + "reference": "00cf1d7271b9746411646500c83348f0b30bfe28" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/goaop/framework/zipball/152abbffffcba72d2d159b892deb40b0829d0f28", - "reference": "152abbffffcba72d2d159b892deb40b0829d0f28", + "url": "https://api.github.com/repos/goaop/framework/zipball/00cf1d7271b9746411646500c83348f0b30bfe28", + "reference": "00cf1d7271b9746411646500c83348f0b30bfe28", "shasum": "" }, "require": { "doctrine/annotations": "^1.2.3", "doctrine/cache": "^1.5", - "goaop/parser-reflection": "~1.4", + "goaop/parser-reflection": "~2.0", "jakubledl/dissect": "~1.0", - "php": ">=5.6.0" + "php": ">=5.6.0", + "symfony/finder": "^3.4|^4.2" }, "require-dev": { "adlawson/vfs": "^0.12", @@ -854,25 +851,25 @@ "library", "php" ], - "time": "2018-01-05T23:07:51+00:00" + "time": "2019-01-05T21:55:35+00:00" }, { "name": "goaop/parser-reflection", - "version": "1.4.0", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/goaop/parser-reflection.git", - "reference": "adfc38fee63014880932ebcc4810871b8e33edc9" + "reference": "a71d0454ef8bfa416a39bbb7dd3ed497e063e54c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/goaop/parser-reflection/zipball/adfc38fee63014880932ebcc4810871b8e33edc9", - "reference": "adfc38fee63014880932ebcc4810871b8e33edc9", + "url": "https://api.github.com/repos/goaop/parser-reflection/zipball/a71d0454ef8bfa416a39bbb7dd3ed497e063e54c", + "reference": "a71d0454ef8bfa416a39bbb7dd3ed497e063e54c", "shasum": "" }, "require": { - "nikic/php-parser": "^1.2|^2.0|^3.0", - "php": ">=5.6.0" + "nikic/php-parser": "^4.0", + "php": ">=7.0" }, "require-dev": { "phpunit/phpunit": "~4.0" @@ -880,7 +877,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.x-dev" + "dev-master": "2.x-dev" } }, "autoload": { @@ -905,7 +902,7 @@ } ], "description": "Provides reflection information, based on raw source", - "time": "2017-09-03T14:59:13+00:00" + "time": "2018-12-12T18:50:29+00:00" }, { "name": "guzzlehttp/guzzle", @@ -1025,32 +1022,33 @@ }, { "name": "guzzlehttp/psr7", - "version": "1.4.2", + "version": "1.5.2", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c" + "reference": "9f83dded91781a01c63574e387eaa769be769115" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/f5b8a8512e2b58b0071a7280e39f14f72e05d87c", - "reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/9f83dded91781a01c63574e387eaa769be769115", + "reference": "9f83dded91781a01c63574e387eaa769be769115", "shasum": "" }, "require": { "php": ">=5.4.0", - "psr/http-message": "~1.0" + "psr/http-message": "~1.0", + "ralouphie/getallheaders": "^2.0.5" }, "provide": { "psr/http-message-implementation": "1.0" }, "require-dev": { - "phpunit/phpunit": "~4.0" + "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "1.5-dev" } }, "autoload": { @@ -1080,13 +1078,14 @@ "keywords": [ "http", "message", + "psr-7", "request", "response", "stream", "uri", "url" ], - "time": "2017-03-20T17:10:46+00:00" + "time": "2018-12-04T20:46:45+00:00" }, { "name": "jakubledl/dissect", @@ -1145,16 +1144,16 @@ }, { "name": "league/event", - "version": "2.1.2", + "version": "2.2.0", "source": { "type": "git", "url": "https://github.com/thephpleague/event.git", - "reference": "e4bfc88dbcb60c8d8a2939a71f9813e141bbe4cd" + "reference": "d2cc124cf9a3fab2bb4ff963307f60361ce4d119" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/event/zipball/e4bfc88dbcb60c8d8a2939a71f9813e141bbe4cd", - "reference": "e4bfc88dbcb60c8d8a2939a71f9813e141bbe4cd", + "url": "https://api.github.com/repos/thephpleague/event/zipball/d2cc124cf9a3fab2bb4ff963307f60361ce4d119", + "reference": "d2cc124cf9a3fab2bb4ff963307f60361ce4d119", "shasum": "" }, "require": { @@ -1162,7 +1161,7 @@ }, "require-dev": { "henrikbjorn/phpspec-code-coverage": "~1.0.1", - "phpspec/phpspec": "~2.0.0" + "phpspec/phpspec": "^2.2" }, "type": "library", "extra": { @@ -1191,20 +1190,20 @@ "event", "listener" ], - "time": "2015-05-21T12:24:47+00:00" + "time": "2018-11-26T11:52:41+00:00" }, { "name": "league/oauth2-server", - "version": "4.1.6", + "version": "4.1.7", "source": { "type": "git", "url": "https://github.com/thephpleague/oauth2-server.git", - "reference": "3bec591393b1cc6a3fc02c94d18262e4ffad2e4f" + "reference": "138524984ac472652c69399529a35b6595cf22d3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/oauth2-server/zipball/3bec591393b1cc6a3fc02c94d18262e4ffad2e4f", - "reference": "3bec591393b1cc6a3fc02c94d18262e4ffad2e4f", + "url": "https://api.github.com/repos/thephpleague/oauth2-server/zipball/138524984ac472652c69399529a35b6595cf22d3", + "reference": "138524984ac472652c69399529a35b6595cf22d3", "shasum": "" }, "require": { @@ -1255,7 +1254,7 @@ "secure", "server" ], - "time": "2016-09-13T13:42:53+00:00" + "time": "2018-06-23T16:27:31+00:00" }, { "name": "mito/yii2-sentry", @@ -1313,24 +1312,24 @@ }, { "name": "nikic/php-parser", - "version": "v3.1.4", + "version": "v4.2.1", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "e57b3a09784f846411aa7ed664eedb73e3399078" + "reference": "5221f49a608808c1e4d436df32884cbc1b821ac0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/e57b3a09784f846411aa7ed664eedb73e3399078", - "reference": "e57b3a09784f846411aa7ed664eedb73e3399078", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/5221f49a608808c1e4d436df32884cbc1b821ac0", + "reference": "5221f49a608808c1e4d436df32884cbc1b821ac0", "shasum": "" }, "require": { "ext-tokenizer": "*", - "php": ">=5.5" + "php": ">=7.0" }, "require-dev": { - "phpunit/phpunit": "~4.0|~5.0" + "phpunit/phpunit": "^6.5 || ^7.0" }, "bin": [ "bin/php-parse" @@ -1338,7 +1337,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "4.2-dev" } }, "autoload": { @@ -1360,20 +1359,20 @@ "parser", "php" ], - "time": "2018-01-25T21:31:33+00:00" + "time": "2019-02-16T20:54:15+00:00" }, { "name": "paragonie/constant_time_encoding", - "version": "v2.2.2", + "version": "v2.2.3", "source": { "type": "git", "url": "https://github.com/paragonie/constant_time_encoding.git", - "reference": "eccf915f45f911bfb189d1d1638d940ec6ee6e33" + "reference": "55af0dc01992b4d0da7f6372e2eac097bbbaffdb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/eccf915f45f911bfb189d1d1638d940ec6ee6e33", - "reference": "eccf915f45f911bfb189d1d1638d940ec6ee6e33", + "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/55af0dc01992b4d0da7f6372e2eac097bbbaffdb", + "reference": "55af0dc01992b4d0da7f6372e2eac097bbbaffdb", "shasum": "" }, "require": { @@ -1381,7 +1380,7 @@ }, "require-dev": { "phpunit/phpunit": "^6|^7", - "vimeo/psalm": "^1" + "vimeo/psalm": "^1|^2" }, "type": "library", "autoload": { @@ -1422,55 +1421,7 @@ "hex2bin", "rfc4648" ], - "time": "2018-03-10T19:47:49+00:00" - }, - { - "name": "paragonie/random_compat", - "version": "v2.0.11", - "source": { - "type": "git", - "url": "https://github.com/paragonie/random_compat.git", - "reference": "5da4d3c796c275c55f057af5a643ae297d96b4d8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/5da4d3c796c275c55f057af5a643ae297d96b4d8", - "reference": "5da4d3c796c275c55f057af5a643ae297d96b4d8", - "shasum": "" - }, - "require": { - "php": ">=5.2.0" - }, - "require-dev": { - "phpunit/phpunit": "4.*|5.*" - }, - "suggest": { - "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." - }, - "type": "library", - "autoload": { - "files": [ - "lib/random.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Paragon Initiative Enterprises", - "email": "security@paragonie.com", - "homepage": "https://paragonie.com" - } - ], - "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", - "keywords": [ - "csprng", - "pseudorandom", - "random" - ], - "time": "2017-09-27T21:40:39+00:00" + "time": "2019-01-03T20:26:31+00:00" }, { "name": "psr/http-message", @@ -1523,22 +1474,63 @@ "time": "2016-08-06T14:39:51+00:00" }, { - "name": "ramsey/uuid", - "version": "3.7.3", + "name": "ralouphie/getallheaders", + "version": "2.0.5", "source": { "type": "git", - "url": "https://github.com/ramsey/uuid.git", - "reference": "44abcdad877d9a46685a3a4d221e3b2c4b87cb76" + "url": "https://github.com/ralouphie/getallheaders.git", + "reference": "5601c8a83fbba7ef674a7369456d12f1e0d0eafa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/uuid/zipball/44abcdad877d9a46685a3a4d221e3b2c4b87cb76", - "reference": "44abcdad877d9a46685a3a4d221e3b2c4b87cb76", + "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/5601c8a83fbba7ef674a7369456d12f1e0d0eafa", + "reference": "5601c8a83fbba7ef674a7369456d12f1e0d0eafa", "shasum": "" }, "require": { - "paragonie/random_compat": "^1.0|^2.0", - "php": "^5.4 || ^7.0" + "php": ">=5.3" + }, + "require-dev": { + "phpunit/phpunit": "~3.7.0", + "satooshi/php-coveralls": ">=1.0" + }, + "type": "library", + "autoload": { + "files": [ + "src/getallheaders.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ralph Khattar", + "email": "ralph.khattar@gmail.com" + } + ], + "description": "A polyfill for getallheaders.", + "time": "2016-02-11T07:05:27+00:00" + }, + { + "name": "ramsey/uuid", + "version": "3.8.0", + "source": { + "type": "git", + "url": "https://github.com/ramsey/uuid.git", + "reference": "d09ea80159c1929d75b3f9c60504d613aeb4a1e3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/d09ea80159c1929d75b3f9c60504d613aeb4a1e3", + "reference": "d09ea80159c1929d75b3f9c60504d613aeb4a1e3", + "shasum": "" + }, + "require": { + "paragonie/random_compat": "^1.0|^2.0|9.99.99", + "php": "^5.4 || ^7.0", + "symfony/polyfill-ctype": "^1.8" }, "replace": { "rhumsaa/uuid": "self.version" @@ -1546,16 +1538,17 @@ "require-dev": { "codeception/aspect-mock": "^1.0 | ~2.0.0", "doctrine/annotations": "~1.2.0", - "goaop/framework": "1.0.0-alpha.2 | ^1.0 | ^2.1", + "goaop/framework": "1.0.0-alpha.2 | ^1.0 | ~2.1.0", "ircmaxell/random-lib": "^1.1", "jakub-onderka/php-parallel-lint": "^0.9.0", "mockery/mockery": "^0.9.9", "moontoast/math": "^1.1", "php-mock/php-mock-phpunit": "^0.3|^1.1", - "phpunit/phpunit": "^4.7|^5.0", + "phpunit/phpunit": "^4.7|^5.0|^6.5", "squizlabs/php_codesniffer": "^2.3" }, "suggest": { + "ext-ctype": "Provides support for PHP Ctype functions", "ext-libsodium": "Provides the PECL libsodium extension for use with the SodiumRandomGenerator", "ext-uuid": "Provides the PECL UUID extension for use with the PeclUuidTimeGenerator and PeclUuidRandomGenerator", "ircmaxell/random-lib": "Provides RandomLib for use with the RandomLibAdapter", @@ -1600,20 +1593,20 @@ "identifier", "uuid" ], - "time": "2018-01-20T00:28:24+00:00" + "time": "2018-07-19T23:38:55+00:00" }, { "name": "sentry/sentry", - "version": "1.8.3", + "version": "1.10.0", "source": { "type": "git", "url": "https://github.com/getsentry/sentry-php.git", - "reference": "512661046e403dc5eb5ae192d5a6cda10e068a95" + "reference": "b2b8ffe1560b9fb0110b02993594a4b04a511959" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/getsentry/sentry-php/zipball/512661046e403dc5eb5ae192d5a6cda10e068a95", - "reference": "512661046e403dc5eb5ae192d5a6cda10e068a95", + "url": "https://api.github.com/repos/getsentry/sentry-php/zipball/b2b8ffe1560b9fb0110b02993594a4b04a511959", + "reference": "b2b8ffe1560b9fb0110b02993594a4b04a511959", "shasum": "" }, "require": { @@ -1640,7 +1633,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.9.x-dev" + "dev-master": "1.10.x-dev" } }, "autoload": { @@ -1664,24 +1657,24 @@ "log", "logging" ], - "time": "2018-02-07T11:26:52+00:00" + "time": "2018-11-09T12:27:19+00:00" }, { "name": "spomky-labs/otphp", - "version": "v9.1.0", + "version": "v9.1.3", "source": { "type": "git", "url": "https://github.com/Spomky-Labs/otphp.git", - "reference": "4b303e33972f6c886f32b38fea60f41be6d74ec1" + "reference": "68c70d3b5bf6e851d44651af7de5a0b171bb3d11" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Spomky-Labs/otphp/zipball/4b303e33972f6c886f32b38fea60f41be6d74ec1", - "reference": "4b303e33972f6c886f32b38fea60f41be6d74ec1", + "url": "https://api.github.com/repos/Spomky-Labs/otphp/zipball/68c70d3b5bf6e851d44651af7de5a0b171bb3d11", + "reference": "68c70d3b5bf6e851d44651af7de5a0b171bb3d11", "shasum": "" }, "require": { - "beberlei/assert": "^2.4", + "beberlei/assert": "^2.4|^3.0", "paragonie/constant_time_encoding": "^2.0", "php": "^7.1" }, @@ -1725,20 +1718,20 @@ "otp", "totp" ], - "time": "2018-02-26T13:45:15+00:00" + "time": "2019-01-06T14:05:41+00:00" }, { "name": "swiftmailer/swiftmailer", - "version": "v6.0.2", + "version": "v6.1.3", "source": { "type": "git", "url": "https://github.com/swiftmailer/swiftmailer.git", - "reference": "412333372fb6c8ffb65496a2bbd7321af75733fc" + "reference": "8ddcb66ac10c392d3beb54829eef8ac1438595f4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/412333372fb6c8ffb65496a2bbd7321af75733fc", - "reference": "412333372fb6c8ffb65496a2bbd7321af75733fc", + "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/8ddcb66ac10c392d3beb54829eef8ac1438595f4", + "reference": "8ddcb66ac10c392d3beb54829eef8ac1438595f4", "shasum": "" }, "require": { @@ -1749,10 +1742,14 @@ "mockery/mockery": "~0.9.1", "symfony/phpunit-bridge": "~3.3@dev" }, + "suggest": { + "ext-intl": "Needed to support internationalized email addresses", + "true/punycode": "Needed to support internationalized email addresses, if ext-intl is not installed" + }, "type": "library", "extra": { "branch-alias": { - "dev-master": "6.0-dev" + "dev-master": "6.1-dev" } }, "autoload": { @@ -1774,26 +1771,75 @@ } ], "description": "Swiftmailer, free feature-rich PHP mailer", - "homepage": "http://swiftmailer.symfony.com", + "homepage": "https://swiftmailer.symfony.com", "keywords": [ "email", "mail", "mailer" ], - "time": "2017-09-30T22:39:41+00:00" + "time": "2018-09-11T07:12:52+00:00" }, { - "name": "symfony/http-foundation", - "version": "v3.4.12", + "name": "symfony/finder", + "version": "v4.2.3", "source": { "type": "git", - "url": "https://github.com/symfony/http-foundation.git", - "reference": "1c28679fcbb0d9b35e4fd49fbb74d2ca4ea17bce" + "url": "https://github.com/symfony/finder.git", + "reference": "ef71816cbb264988bb57fe6a73f610888b9aa70c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/1c28679fcbb0d9b35e4fd49fbb74d2ca4ea17bce", - "reference": "1c28679fcbb0d9b35e4fd49fbb74d2ca4ea17bce", + "url": "https://api.github.com/repos/symfony/finder/zipball/ef71816cbb264988bb57fe6a73f610888b9aa70c", + "reference": "ef71816cbb264988bb57fe6a73f610888b9aa70c", + "shasum": "" + }, + "require": { + "php": "^7.1.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Finder\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Finder Component", + "homepage": "https://symfony.com", + "time": "2019-01-16T20:35:37+00:00" + }, + { + "name": "symfony/http-foundation", + "version": "v3.4.22", + "source": { + "type": "git", + "url": "https://github.com/symfony/http-foundation.git", + "reference": "9a81d2330ea255ded06a69b4f7fb7804836e7a05" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/9a81d2330ea255ded06a69b4f7fb7804836e7a05", + "reference": "9a81d2330ea255ded06a69b4f7fb7804836e7a05", "shasum": "" }, "require": { @@ -1834,138 +1880,20 @@ ], "description": "Symfony HttpFoundation Component", "homepage": "https://symfony.com", - "time": "2018-06-21T11:10:19+00:00" - }, - { - "name": "symfony/polyfill-mbstring", - "version": "v1.7.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "78be803ce01e55d3491c1397cf1c64beb9c1b63b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/78be803ce01e55d3491c1397cf1c64beb9c1b63b", - "reference": "78be803ce01e55d3491c1397cf1c64beb9c1b63b", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "suggest": { - "ext-mbstring": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.7-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - }, - "files": [ - "bootstrap.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for the Mbstring extension", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "mbstring", - "polyfill", - "portable", - "shim" - ], - "time": "2018-01-30T19:27:44+00:00" - }, - { - "name": "symfony/polyfill-php70", - "version": "v1.7.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php70.git", - "reference": "3532bfcd8f933a7816f3a0a59682fc404776600f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/3532bfcd8f933a7816f3a0a59682fc404776600f", - "reference": "3532bfcd8f933a7816f3a0a59682fc404776600f", - "shasum": "" - }, - "require": { - "paragonie/random_compat": "~1.0|~2.0", - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.7-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php70\\": "" - }, - "files": [ - "bootstrap.php" - ], - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "time": "2018-01-30T19:27:44+00:00" + "time": "2019-01-27T09:04:14+00:00" }, { "name": "symfony/process", - "version": "v4.0.4", + "version": "v4.2.3", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "e1712002d81de6f39f854bc5bbd9e9f4bb6345b4" + "reference": "6c05edb11fbeff9e2b324b4270ecb17911a8b7ad" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/e1712002d81de6f39f854bc5bbd9e9f4bb6345b4", - "reference": "e1712002d81de6f39f854bc5bbd9e9f4bb6345b4", + "url": "https://api.github.com/repos/symfony/process/zipball/6c05edb11fbeff9e2b324b4270ecb17911a8b7ad", + "reference": "6c05edb11fbeff9e2b324b4270ecb17911a8b7ad", "shasum": "" }, "require": { @@ -1974,7 +1902,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.2-dev" } }, "autoload": { @@ -2001,24 +1929,25 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2018-01-29T09:06:29+00:00" + "time": "2019-01-24T22:05:03+00:00" }, { "name": "webmozart/assert", - "version": "1.3.0", + "version": "1.4.0", "source": { "type": "git", "url": "https://github.com/webmozart/assert.git", - "reference": "0df1908962e7a3071564e857d86874dad1ef204a" + "reference": "83e253c8e0be5b0257b881e1827274667c5c17a9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/0df1908962e7a3071564e857d86874dad1ef204a", - "reference": "0df1908962e7a3071564e857d86874dad1ef204a", + "url": "https://api.github.com/repos/webmozart/assert/zipball/83e253c8e0be5b0257b881e1827274667c5c17a9", + "reference": "83e253c8e0be5b0257b881e1827274667c5c17a9", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0" + "php": "^5.3.3 || ^7.0", + "symfony/polyfill-ctype": "^1.8" }, "require-dev": { "phpunit/phpunit": "^4.6", @@ -2051,7 +1980,7 @@ "check", "validate" ], - "time": "2018-01-29T19:49:41+00:00" + "time": "2018-12-25T11:19:39+00:00" }, { "name": "yiisoft/yii2", @@ -2155,16 +2084,16 @@ }, { "name": "yiisoft/yii2-composer", - "version": "2.0.5", + "version": "2.0.7", "source": { "type": "git", "url": "https://github.com/yiisoft/yii2-composer.git", - "reference": "3f4923c2bde6caf3f5b88cc22fdd5770f52f8df2" + "reference": "1439e78be1218c492e6cde251ed87d3f128b9534" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/yiisoft/yii2-composer/zipball/3f4923c2bde6caf3f5b88cc22fdd5770f52f8df2", - "reference": "3f4923c2bde6caf3f5b88cc22fdd5770f52f8df2", + "url": "https://api.github.com/repos/yiisoft/yii2-composer/zipball/1439e78be1218c492e6cde251ed87d3f128b9534", + "reference": "1439e78be1218c492e6cde251ed87d3f128b9534", "shasum": "" }, "require": { @@ -2193,6 +2122,10 @@ { "name": "Qiang Xue", "email": "qiang.xue@gmail.com" + }, + { + "name": "Carsten Brandt", + "email": "mail@cebe.cc" } ], "description": "The composer plugin for Yii extension installer", @@ -2201,7 +2134,7 @@ "extension installer", "yii2" ], - "time": "2016-12-20T13:26:02+00:00" + "time": "2018-07-05T15:44:47+00:00" }, { "name": "yiisoft/yii2-queue", @@ -2289,16 +2222,16 @@ }, { "name": "yiisoft/yii2-redis", - "version": "2.0.8", + "version": "2.0.9", "source": { "type": "git", "url": "https://github.com/yiisoft/yii2-redis.git", - "reference": "ffe6bff8dc6be4bb84c9495cd3ef7ef1161c1314" + "reference": "29c3ae9f1e1f61d9ab326f92fcacb03218c218dc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/yiisoft/yii2-redis/zipball/ffe6bff8dc6be4bb84c9495cd3ef7ef1161c1314", - "reference": "ffe6bff8dc6be4bb84c9495cd3ef7ef1161c1314", + "url": "https://api.github.com/repos/yiisoft/yii2-redis/zipball/29c3ae9f1e1f61d9ab326f92fcacb03218c218dc", + "reference": "29c3ae9f1e1f61d9ab326f92fcacb03218c218dc", "shasum": "" }, "require": { @@ -2336,25 +2269,25 @@ "session", "yii2" ], - "time": "2018-03-20T11:01:04+00:00" + "time": "2018-09-23T22:34:46+00:00" }, { "name": "yiisoft/yii2-swiftmailer", - "version": "2.1.1", + "version": "2.1.2", "source": { "type": "git", "url": "https://github.com/yiisoft/yii2-swiftmailer.git", - "reference": "fd917fbe63b7ea796c52902143b83b98e65bfb73" + "reference": "09659a55959f9e64b8178d842b64a9ffae42b994" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/yiisoft/yii2-swiftmailer/zipball/fd917fbe63b7ea796c52902143b83b98e65bfb73", - "reference": "fd917fbe63b7ea796c52902143b83b98e65bfb73", + "url": "https://api.github.com/repos/yiisoft/yii2-swiftmailer/zipball/09659a55959f9e64b8178d842b64a9ffae42b994", + "reference": "09659a55959f9e64b8178d842b64a9ffae42b994", "shasum": "" }, "require": { "swiftmailer/swiftmailer": "~6.0", - "yiisoft/yii2": "~2.0.4" + "yiisoft/yii2": ">=2.0.4" }, "type": "yii2-extension", "extra": { @@ -2386,22 +2319,22 @@ "swiftmailer", "yii2" ], - "time": "2018-04-24T23:17:42+00:00" + "time": "2018-09-23T22:00:47+00:00" } ], "packages-dev": [ { "name": "behat/gherkin", - "version": "v4.4.5", + "version": "v4.6.0", "source": { "type": "git", "url": "https://github.com/Behat/Gherkin.git", - "reference": "5c14cff4f955b17d20d088dec1bde61c0539ec74" + "reference": "ab0a02ea14893860bca00f225f5621d351a3ad07" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Behat/Gherkin/zipball/5c14cff4f955b17d20d088dec1bde61c0539ec74", - "reference": "5c14cff4f955b17d20d088dec1bde61c0539ec74", + "url": "https://api.github.com/repos/Behat/Gherkin/zipball/ab0a02ea14893860bca00f225f5621d351a3ad07", + "reference": "ab0a02ea14893860bca00f225f5621d351a3ad07", "shasum": "" }, "require": { @@ -2409,8 +2342,8 @@ }, "require-dev": { "phpunit/phpunit": "~4.5|~5", - "symfony/phpunit-bridge": "~2.7|~3", - "symfony/yaml": "~2.3|~3" + "symfony/phpunit-bridge": "~2.7|~3|~4", + "symfony/yaml": "~2.3|~3|~4" }, "suggest": { "symfony/yaml": "If you want to parse features, represented in YAML files" @@ -2447,21 +2380,20 @@ "gherkin", "parser" ], - "time": "2016-10-30T11:50:56+00:00" + "time": "2019-01-16T14:22:17+00:00" }, { "name": "bower-asset/bootstrap", - "version": "v3.3.7", + "version": "v3.4.1", "source": { "type": "git", "url": "https://github.com/twbs/bootstrap.git", - "reference": "0b9c4a4007c44201dce9a6cc1a38407005c26c86" + "reference": "68b0d231a13201eb14acd3dc84e51543d16e5f7e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twbs/bootstrap/zipball/0b9c4a4007c44201dce9a6cc1a38407005c26c86", - "reference": "0b9c4a4007c44201dce9a6cc1a38407005c26c86", - "shasum": null + "url": "https://api.github.com/repos/twbs/bootstrap/zipball/68b0d231a13201eb14acd3dc84e51543d16e5f7e", + "reference": "68b0d231a13201eb14acd3dc84e51543d16e5f7e" }, "require": { "bower-asset/jquery": ">=1.9.1,<4.0" @@ -2473,31 +2405,29 @@ }, { "name": "codeception/codeception", - "version": "2.3.8", + "version": "2.5.4", "source": { "type": "git", "url": "https://github.com/Codeception/Codeception.git", - "reference": "43eade17a8cd68e9cde401e8585b09d11d41b12d" + "reference": "a2ecfe2f3ad36cc29904d2d566b0d7280854e6c9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Codeception/Codeception/zipball/43eade17a8cd68e9cde401e8585b09d11d41b12d", - "reference": "43eade17a8cd68e9cde401e8585b09d11d41b12d", + "url": "https://api.github.com/repos/Codeception/Codeception/zipball/a2ecfe2f3ad36cc29904d2d566b0d7280854e6c9", + "reference": "a2ecfe2f3ad36cc29904d2d566b0d7280854e6c9", "shasum": "" }, "require": { - "behat/gherkin": "~4.4.0", - "codeception/stub": "^1.0", + "behat/gherkin": "^4.4.0", + "codeception/phpunit-wrapper": "^6.0.9|^7.0.6", + "codeception/stub": "^2.0", + "ext-curl": "*", "ext-json": "*", "ext-mbstring": "*", "facebook/webdriver": ">=1.1.3 <2.0", "guzzlehttp/guzzle": ">=4.1.4 <7.0", "guzzlehttp/psr7": "~1.0", - "php": ">=5.4.0 <8.0", - "phpunit/php-code-coverage": ">=2.2.4 <6.0", - "phpunit/phpunit": ">=4.8.28 <5.0.0 || >=5.6.3 <7.0", - "sebastian/comparator": ">1.1 <3.0", - "sebastian/diff": ">=1.4 <3.0", + "php": ">=5.6.0 <8.0", "symfony/browser-kit": ">=2.7 <5.0", "symfony/console": ">=2.7 <5.0", "symfony/css-selector": ">=2.7 <5.0", @@ -2516,7 +2446,7 @@ "predis/predis": "^1.0", "squizlabs/php_codesniffer": "~2.0", "symfony/process": ">=2.7 <5.0", - "vlucas/phpdotenv": "^2.4.0" + "vlucas/phpdotenv": "^3.0" }, "suggest": { "aws/aws-sdk-php": "For using AWS Auth in REST module and Queue module", @@ -2539,7 +2469,7 @@ }, "autoload": { "psr-4": { - "Codeception\\": "src\\Codeception", + "Codeception\\": "src/Codeception", "Codeception\\Extension\\": "ext" } }, @@ -2563,26 +2493,69 @@ "functional testing", "unit testing" ], - "time": "2018-01-27T22:47:33+00:00" + "time": "2019-02-20T20:45:25+00:00" }, { - "name": "codeception/specify", - "version": "1.0", + "name": "codeception/phpunit-wrapper", + "version": "7.6.1", "source": { "type": "git", - "url": "https://github.com/Codeception/Specify.git", - "reference": "1b1fe23f887aac647d0f7f5be3867b240690449d" + "url": "https://github.com/Codeception/phpunit-wrapper.git", + "reference": "ed4b12beb167dc2ecea293b4f6df6c20ce8d280f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Codeception/Specify/zipball/1b1fe23f887aac647d0f7f5be3867b240690449d", - "reference": "1b1fe23f887aac647d0f7f5be3867b240690449d", + "url": "https://api.github.com/repos/Codeception/phpunit-wrapper/zipball/ed4b12beb167dc2ecea293b4f6df6c20ce8d280f", + "reference": "ed4b12beb167dc2ecea293b4f6df6c20ce8d280f", + "shasum": "" + }, + "require": { + "phpunit/php-code-coverage": "^6.0", + "phpunit/phpunit": ">=7.1 <7.6", + "sebastian/comparator": "^3.0", + "sebastian/diff": "^3.0" + }, + "require-dev": { + "codeception/specify": "*", + "vlucas/phpdotenv": "^2.4" + }, + "type": "library", + "autoload": { + "psr-4": { + "Codeception\\PHPUnit\\": "src\\" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Davert", + "email": "davert.php@resend.cc" + } + ], + "description": "PHPUnit classes used by Codeception", + "time": "2019-01-13T10:34:39+00:00" + }, + { + "name": "codeception/specify", + "version": "1.1", + "source": { + "type": "git", + "url": "https://github.com/Codeception/Specify.git", + "reference": "504ac7a882e6f7226b0cff44c72a6c0bbd0bad95" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Codeception/Specify/zipball/504ac7a882e6f7226b0cff44c72a6c0bbd0bad95", + "reference": "504ac7a882e6f7226b0cff44c72a6c0bbd0bad95", "shasum": "" }, "require": { "myclabs/deep-copy": "~1.1", - "php": ">=7.0.0", - "phpunit/phpunit": "~6.0" + "php": ">=7.1.0", + "phpunit/phpunit": "^7.0" }, "type": "library", "autoload": { @@ -2601,26 +2574,23 @@ } ], "description": "BDD code blocks for PHPUnit and Codeception", - "time": "2017-11-20T23:40:31+00:00" + "time": "2018-03-12T23:55:10+00:00" }, { "name": "codeception/stub", - "version": "1.0.2", + "version": "2.0.4", "source": { "type": "git", "url": "https://github.com/Codeception/Stub.git", - "reference": "95fb7a36b81890dd2e5163e7ab31310df6f1bb99" + "reference": "f50bc271f392a2836ff80690ce0c058efe1ae03e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Codeception/Stub/zipball/95fb7a36b81890dd2e5163e7ab31310df6f1bb99", - "reference": "95fb7a36b81890dd2e5163e7ab31310df6f1bb99", + "url": "https://api.github.com/repos/Codeception/Stub/zipball/f50bc271f392a2836ff80690ce0c058efe1ae03e", + "reference": "f50bc271f392a2836ff80690ce0c058efe1ae03e", "shasum": "" }, "require": { - "phpunit/phpunit-mock-objects": ">2.3 <7.0" - }, - "require-dev": { "phpunit/phpunit": ">=4.8 <8.0" }, "type": "library", @@ -2634,7 +2604,7 @@ "MIT" ], "description": "Flexible Stub wrapper for PHPUnit's Mock Builder", - "time": "2018-02-18T13:56:56+00:00" + "time": "2018-07-26T11:55:37+00:00" }, { "name": "codeception/verify", @@ -2740,16 +2710,16 @@ }, { "name": "composer/xdebug-handler", - "version": "1.1.0", + "version": "1.3.2", "source": { "type": "git", "url": "https://github.com/composer/xdebug-handler.git", - "reference": "c919dc6c62e221fc6406f861ea13433c0aa24f08" + "reference": "d17708133b6c276d6e42ef887a877866b909d892" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/c919dc6c62e221fc6406f861ea13433c0aa24f08", - "reference": "c919dc6c62e221fc6406f861ea13433c0aa24f08", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/d17708133b6c276d6e42ef887a877866b909d892", + "reference": "d17708133b6c276d6e42ef887a877866b909d892", "shasum": "" }, "require": { @@ -2780,7 +2750,7 @@ "Xdebug", "performance" ], - "time": "2018-04-11T15:42:36+00:00" + "time": "2019-01-28T20:25:53+00:00" }, { "name": "doctrine/instantiator", @@ -2838,24 +2808,24 @@ }, { "name": "ely/php-code-style", - "version": "0.1.0", + "version": "0.3.0", "source": { "type": "git", "url": "https://github.com/elyby/php-code-style.git", - "reference": "0bb3e8082753981af4775f5b95d159c9cd9c6bf4" + "reference": "2140798d0aca85f4fa3e70c77bfef066ce115d1a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/elyby/php-code-style/zipball/0bb3e8082753981af4775f5b95d159c9cd9c6bf4", - "reference": "0bb3e8082753981af4775f5b95d159c9cd9c6bf4", + "url": "https://api.github.com/repos/elyby/php-code-style/zipball/2140798d0aca85f4fa3e70c77bfef066ce115d1a", + "reference": "2140798d0aca85f4fa3e70c77bfef066ce115d1a", "shasum": "" }, "require": { - "friendsofphp/php-cs-fixer": "^2.11", + "friendsofphp/php-cs-fixer": "^2.13.0", "php": "^7.0" }, "require-dev": { - "phpunit/phpunit": "^7.0" + "phpunit/phpunit": "^6.5.1" }, "type": "library", "autoload": { @@ -2883,38 +2853,43 @@ "Code style", "php-cs-fixer" ], - "time": "2018-04-17T18:28:51+00:00" + "time": "2019-02-23T17:29:08+00:00" }, { "name": "facebook/webdriver", - "version": "1.5.0", + "version": "1.6.0", "source": { "type": "git", "url": "https://github.com/facebook/php-webdriver.git", - "reference": "86b5ca2f67173c9d34340845dd690149c886a605" + "reference": "bd8c740097eb9f2fc3735250fc1912bc811a954e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/facebook/php-webdriver/zipball/86b5ca2f67173c9d34340845dd690149c886a605", - "reference": "86b5ca2f67173c9d34340845dd690149c886a605", + "url": "https://api.github.com/repos/facebook/php-webdriver/zipball/bd8c740097eb9f2fc3735250fc1912bc811a954e", + "reference": "bd8c740097eb9f2fc3735250fc1912bc811a954e", "shasum": "" }, "require": { "ext-curl": "*", + "ext-json": "*", + "ext-mbstring": "*", "ext-zip": "*", "php": "^5.6 || ~7.0", "symfony/process": "^2.8 || ^3.1 || ^4.0" }, "require-dev": { "friendsofphp/php-cs-fixer": "^2.0", - "guzzle/guzzle": "^3.4.1", - "php-coveralls/php-coveralls": "^1.0.2", + "jakub-onderka/php-parallel-lint": "^0.9.2", + "php-coveralls/php-coveralls": "^2.0", "php-mock/php-mock-phpunit": "^1.1", "phpunit/phpunit": "^5.7", "sebastian/environment": "^1.3.4 || ^2.0 || ^3.0", "squizlabs/php_codesniffer": "^2.6", "symfony/var-dumper": "^3.3 || ^4.0" }, + "suggest": { + "ext-SimpleXML": "For Firefox profile creation" + }, "type": "library", "extra": { "branch-alias": { @@ -2938,7 +2913,7 @@ "selenium", "webdriver" ], - "time": "2017-11-15T11:08:09+00:00" + "time": "2018-05-16T17:37:13+00:00" }, { "name": "flow/jsonpath", @@ -2983,27 +2958,27 @@ }, { "name": "friendsofphp/php-cs-fixer", - "version": "v2.12.2", + "version": "v2.14.2", "source": { "type": "git", "url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git", - "reference": "dcc87d5414e9d0bd316fce81a5bedb9ce720b183" + "reference": "ff401e58261ffc5934a58f795b3f95b355e276cb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/dcc87d5414e9d0bd316fce81a5bedb9ce720b183", - "reference": "dcc87d5414e9d0bd316fce81a5bedb9ce720b183", + "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/ff401e58261ffc5934a58f795b3f95b355e276cb", + "reference": "ff401e58261ffc5934a58f795b3f95b355e276cb", "shasum": "" }, "require": { "composer/semver": "^1.4", - "composer/xdebug-handler": "^1.0", + "composer/xdebug-handler": "^1.2", "doctrine/annotations": "^1.2", "ext-json": "*", "ext-tokenizer": "*", - "php": "^5.6 || >=7.0 <7.3", + "php": "^5.6 || ^7.0", "php-cs-fixer/diff": "^1.3", - "symfony/console": "^3.2 || ^4.0", + "symfony/console": "^3.4.17 || ^4.1.6", "symfony/event-dispatcher": "^3.0 || ^4.0", "symfony/filesystem": "^3.0 || ^4.0", "symfony/finder": "^3.0 || ^4.0", @@ -3013,13 +2988,10 @@ "symfony/process": "^3.0 || ^4.0", "symfony/stopwatch": "^3.0 || ^4.0" }, - "conflict": { - "hhvm": "*" - }, "require-dev": { "johnkary/phpunit-speedtrap": "^1.1 || ^2.0 || ^3.0", "justinrainbow/json-schema": "^5.0", - "keradus/cli-executor": "^1.1", + "keradus/cli-executor": "^1.2", "mikey179/vfsstream": "^1.6", "php-coveralls/php-coveralls": "^2.1", "php-cs-fixer/accessible-object": "^1.0", @@ -3070,20 +3042,20 @@ } ], "description": "A tool to automatically fix PHP code style", - "time": "2018-07-06T10:37:40+00:00" + "time": "2019-02-17T17:44:13+00:00" }, { "name": "fzaninotto/faker", - "version": "v1.7.1", + "version": "v1.8.0", "source": { "type": "git", "url": "https://github.com/fzaninotto/Faker.git", - "reference": "d3ed4cc37051c1ca52d22d76b437d14809fc7e0d" + "reference": "f72816b43e74063c8b10357394b6bba8cb1c10de" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/fzaninotto/Faker/zipball/d3ed4cc37051c1ca52d22d76b437d14809fc7e0d", - "reference": "d3ed4cc37051c1ca52d22d76b437d14809fc7e0d", + "url": "https://api.github.com/repos/fzaninotto/Faker/zipball/f72816b43e74063c8b10357394b6bba8cb1c10de", + "reference": "f72816b43e74063c8b10357394b6bba8cb1c10de", "shasum": "" }, "require": { @@ -3091,7 +3063,7 @@ }, "require-dev": { "ext-intl": "*", - "phpunit/phpunit": "^4.0 || ^5.0", + "phpunit/phpunit": "^4.8.35 || ^5.7", "squizlabs/php_codesniffer": "^1.5" }, "type": "library", @@ -3120,7 +3092,7 @@ "faker", "fixtures" ], - "time": "2017-08-15T16:48:10+00:00" + "time": "2018-07-12T10:23:15+00:00" }, { "name": "hamcrest/hamcrest-php", @@ -3172,16 +3144,16 @@ }, { "name": "mockery/mockery", - "version": "1.0", + "version": "1.2.2", "source": { "type": "git", "url": "https://github.com/mockery/mockery.git", - "reference": "1bac8c362b12f522fdd1f1fa3556284c91affa38" + "reference": "0eb0b48c3f07b3b89f5169ce005b7d05b18cf1d2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mockery/mockery/zipball/1bac8c362b12f522fdd1f1fa3556284c91affa38", - "reference": "1bac8c362b12f522fdd1f1fa3556284c91affa38", + "url": "https://api.github.com/repos/mockery/mockery/zipball/0eb0b48c3f07b3b89f5169ce005b7d05b18cf1d2", + "reference": "0eb0b48c3f07b3b89f5169ce005b7d05b18cf1d2", "shasum": "" }, "require": { @@ -3190,7 +3162,7 @@ "php": ">=5.6.0" }, "require-dev": { - "phpunit/phpunit": "~5.7|~6.1" + "phpunit/phpunit": "~5.7.10|~6.5|~7.0|~8.0" }, "type": "library", "extra": { @@ -3219,8 +3191,8 @@ "homepage": "http://davedevelopment.co.uk" } ], - "description": "Mockery is a simple yet flexible PHP mock object framework for use in unit testing with PHPUnit, PHPSpec or any other testing framework. Its core goal is to offer a test double framework with a succinct API capable of clearly defining all possible object operations and interactions using a human readable Domain Specific Language (DSL). Designed as a drop in alternative to PHPUnit's phpunit-mock-objects library, Mockery is easy to integrate with PHPUnit and can operate alongside phpunit-mock-objects without the World ending.", - "homepage": "http://github.com/mockery/mockery", + "description": "Mockery is a simple yet flexible PHP mock object framework", + "homepage": "https://github.com/mockery/mockery", "keywords": [ "BDD", "TDD", @@ -3233,29 +3205,32 @@ "test double", "testing" ], - "time": "2017-10-06T16:20:43+00:00" + "time": "2019-02-13T09:37:52+00:00" }, { "name": "myclabs/deep-copy", - "version": "1.7.0", + "version": "1.8.1", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e" + "reference": "3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e", - "reference": "3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8", + "reference": "3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8", "shasum": "" }, "require": { - "php": "^5.6 || ^7.0" + "php": "^7.1" + }, + "replace": { + "myclabs/deep-copy": "self.version" }, "require-dev": { "doctrine/collections": "^1.0", "doctrine/common": "^2.6", - "phpunit/phpunit": "^4.1" + "phpunit/phpunit": "^7.1" }, "type": "library", "autoload": { @@ -3278,26 +3253,26 @@ "object", "object graph" ], - "time": "2017-10-19T19:58:43+00:00" + "time": "2018-06-11T23:09:50+00:00" }, { "name": "phar-io/manifest", - "version": "1.0.1", + "version": "1.0.3", "source": { "type": "git", "url": "https://github.com/phar-io/manifest.git", - "reference": "2df402786ab5368a0169091f61a7c1e0eb6852d0" + "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/2df402786ab5368a0169091f61a7c1e0eb6852d0", - "reference": "2df402786ab5368a0169091f61a7c1e0eb6852d0", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/7761fcacf03b4d4f16e7ccb606d4879ca431fcf4", + "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4", "shasum": "" }, "require": { "ext-dom": "*", "ext-phar": "*", - "phar-io/version": "^1.0.1", + "phar-io/version": "^2.0", "php": "^5.6 || ^7.0" }, "type": "library", @@ -3333,20 +3308,20 @@ } ], "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", - "time": "2017-03-05T18:14:27+00:00" + "time": "2018-07-08T19:23:20+00:00" }, { "name": "phar-io/version", - "version": "1.0.1", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/phar-io/version.git", - "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df" + "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/a70c0ced4be299a63d32fa96d9281d03e94041df", - "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df", + "url": "https://api.github.com/repos/phar-io/version/zipball/45a2ec53a73c70ce41d55cedef9063630abaf1b6", + "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6", "shasum": "" }, "require": { @@ -3380,7 +3355,7 @@ } ], "description": "Library for handling version information and constraints", - "time": "2017-03-05T17:38:23+00:00" + "time": "2018-07-08T19:19:57+00:00" }, { "name": "php-cs-fixer/diff", @@ -3435,30 +3410,29 @@ }, { "name": "php-mock/php-mock", - "version": "1.0.1", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/php-mock/php-mock.git", - "reference": "bfa2d17d64dbf129073a7ba2051a96ce52749570" + "reference": "22d297231118e6fd5b9db087fbe1ef866c2b95d2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-mock/php-mock/zipball/bfa2d17d64dbf129073a7ba2051a96ce52749570", - "reference": "bfa2d17d64dbf129073a7ba2051a96ce52749570", + "url": "https://api.github.com/repos/php-mock/php-mock/zipball/22d297231118e6fd5b9db087fbe1ef866c2b95d2", + "reference": "22d297231118e6fd5b9db087fbe1ef866c2b95d2", "shasum": "" }, "require": { - "php": ">=5.5", + "php": ">=5.6", "phpunit/php-text-template": "^1" }, "replace": { "malkusch/php-mock": "*" }, "require-dev": { - "phpunit/phpunit": "^4|^5" + "phpunit/phpunit": "^5.7" }, "suggest": { - "php-mock/php-mock-mockery": "Allows using PHPMockery for Mockery integration", "php-mock/php-mock-phpunit": "Allows integration into PHPUnit testcase with the trait PHPMock." }, "type": "library", @@ -3466,7 +3440,7 @@ "psr-4": { "phpmock\\": [ "classes/", - "tests/unit/" + "tests/" ] } }, @@ -3493,25 +3467,25 @@ "test", "test double" ], - "time": "2015-11-11T22:37:09+00:00" + "time": "2017-02-17T20:52:52+00:00" }, { "name": "php-mock/php-mock-integration", - "version": "1.0.0", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/php-mock/php-mock-integration.git", - "reference": "e83fb65dd20cd3cf250d554cbd4682b96b684f4b" + "reference": "5a0d7d7755f823bc2a230cfa45058b40f9013bc4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-mock/php-mock-integration/zipball/e83fb65dd20cd3cf250d554cbd4682b96b684f4b", - "reference": "e83fb65dd20cd3cf250d554cbd4682b96b684f4b", + "url": "https://api.github.com/repos/php-mock/php-mock-integration/zipball/5a0d7d7755f823bc2a230cfa45058b40f9013bc4", + "reference": "5a0d7d7755f823bc2a230cfa45058b40f9013bc4", "shasum": "" }, "require": { - "php": ">=5.5", - "php-mock/php-mock": "^1", + "php": ">=5.6", + "php-mock/php-mock": "^2", "phpunit/php-text-template": "^1" }, "require-dev": { @@ -3546,26 +3520,26 @@ "test", "test double" ], - "time": "2015-10-26T21:21:42+00:00" + "time": "2017-02-17T21:31:34+00:00" }, { "name": "php-mock/php-mock-mockery", - "version": "1.2.0", + "version": "1.3.0", "source": { "type": "git", "url": "https://github.com/php-mock/php-mock-mockery.git", - "reference": "f3d67a36558c6d1fb912ed8ba786fffaf94e0755" + "reference": "d6d3df9d9232f1623f1ca3cfdaacd53415593825" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-mock/php-mock-mockery/zipball/f3d67a36558c6d1fb912ed8ba786fffaf94e0755", - "reference": "f3d67a36558c6d1fb912ed8ba786fffaf94e0755", + "url": "https://api.github.com/repos/php-mock/php-mock-mockery/zipball/d6d3df9d9232f1623f1ca3cfdaacd53415593825", + "reference": "d6d3df9d9232f1623f1ca3cfdaacd53415593825", "shasum": "" }, "require": { "mockery/mockery": "^1", "php": ">=5.6", - "php-mock/php-mock-integration": "^1" + "php-mock/php-mock-integration": "^2" }, "require-dev": { "phpunit/phpunit": "^4|^5" @@ -3600,7 +3574,7 @@ "test", "test double" ], - "time": "2017-10-13T09:34:01+00:00" + "time": "2018-03-27T07:00:25+00:00" }, { "name": "phpdocumentor/reflection-common", @@ -3756,33 +3730,33 @@ }, { "name": "phpspec/prophecy", - "version": "1.7.5", + "version": "1.8.0", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "dfd6be44111a7c41c2e884a336cc4f461b3b2401" + "reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/dfd6be44111a7c41c2e884a336cc4f461b3b2401", - "reference": "dfd6be44111a7c41c2e884a336cc4f461b3b2401", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/4ba436b55987b4bf311cb7c6ba82aa528aac0a06", + "reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06", "shasum": "" }, "require": { "doctrine/instantiator": "^1.0.2", "php": "^5.3|^7.0", "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0", - "sebastian/comparator": "^1.1|^2.0", + "sebastian/comparator": "^1.1|^2.0|^3.0", "sebastian/recursion-context": "^1.0|^2.0|^3.0" }, "require-dev": { "phpspec/phpspec": "^2.5|^3.2", - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5" + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.7.x-dev" + "dev-master": "1.8.x-dev" } }, "autoload": { @@ -3815,44 +3789,44 @@ "spy", "stub" ], - "time": "2018-02-19T10:16:54+00:00" + "time": "2018-08-05T17:53:17+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "5.3.0", + "version": "6.1.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "661f34d0bd3f1a7225ef491a70a020ad23a057a1" + "reference": "807e6013b00af69b6c5d9ceb4282d0393dbb9d8d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/661f34d0bd3f1a7225ef491a70a020ad23a057a1", - "reference": "661f34d0bd3f1a7225ef491a70a020ad23a057a1", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/807e6013b00af69b6c5d9ceb4282d0393dbb9d8d", + "reference": "807e6013b00af69b6c5d9ceb4282d0393dbb9d8d", "shasum": "" }, "require": { "ext-dom": "*", "ext-xmlwriter": "*", - "php": "^7.0", - "phpunit/php-file-iterator": "^1.4.2", + "php": "^7.1", + "phpunit/php-file-iterator": "^2.0", "phpunit/php-text-template": "^1.2.1", - "phpunit/php-token-stream": "^2.0.1", + "phpunit/php-token-stream": "^3.0", "sebastian/code-unit-reverse-lookup": "^1.0.1", - "sebastian/environment": "^3.0", + "sebastian/environment": "^3.1 || ^4.0", "sebastian/version": "^2.0.1", "theseer/tokenizer": "^1.1" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "^7.0" }, "suggest": { - "ext-xdebug": "^2.5.5" + "ext-xdebug": "^2.6.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.3.x-dev" + "dev-master": "6.1-dev" } }, "autoload": { @@ -3878,29 +3852,32 @@ "testing", "xunit" ], - "time": "2017-12-06T09:29:45+00:00" + "time": "2018-10-31T16:06:48+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "1.4.5", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4" + "reference": "050bedf145a257b1ff02746c31894800e5122946" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/730b01bc3e867237eaac355e06a36b85dd93a8b4", - "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/050bedf145a257b1ff02746c31894800e5122946", + "reference": "050bedf145a257b1ff02746c31894800e5122946", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^7.1" + }, + "require-dev": { + "phpunit/phpunit": "^7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { @@ -3915,7 +3892,7 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", + "email": "sebastian@phpunit.de", "role": "lead" } ], @@ -3925,7 +3902,7 @@ "filesystem", "iterator" ], - "time": "2017-11-27T13:52:08+00:00" + "time": "2018-09-13T20:33:42+00:00" }, { "name": "phpunit/php-text-template", @@ -3970,28 +3947,28 @@ }, { "name": "phpunit/php-timer", - "version": "1.0.9", + "version": "2.1.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f" + "reference": "8b389aebe1b8b0578430bda0c7c95a829608e059" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", - "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/8b389aebe1b8b0578430bda0c7c95a829608e059", + "reference": "8b389aebe1b8b0578430bda0c7c95a829608e059", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0" + "php": "^7.1" }, "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" + "phpunit/phpunit": "^7.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "2.1-dev" } }, "autoload": { @@ -4006,7 +3983,7 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", + "email": "sebastian@phpunit.de", "role": "lead" } ], @@ -4015,33 +3992,33 @@ "keywords": [ "timer" ], - "time": "2017-02-26T11:10:40+00:00" + "time": "2019-02-20T10:12:59+00:00" }, { "name": "phpunit/php-token-stream", - "version": "2.0.2", + "version": "3.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "791198a2c6254db10131eecfe8c06670700904db" + "reference": "c99e3be9d3e85f60646f152f9002d46ed7770d18" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/791198a2c6254db10131eecfe8c06670700904db", - "reference": "791198a2c6254db10131eecfe8c06670700904db", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/c99e3be9d3e85f60646f152f9002d46ed7770d18", + "reference": "c99e3be9d3e85f60646f152f9002d46ed7770d18", "shasum": "" }, "require": { "ext-tokenizer": "*", - "php": "^7.0" + "php": "^7.1" }, "require-dev": { - "phpunit/phpunit": "^6.2.4" + "phpunit/phpunit": "^7.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -4064,57 +4041,57 @@ "keywords": [ "tokenizer" ], - "time": "2017-11-27T05:48:46+00:00" + "time": "2018-10-30T05:52:18+00:00" }, { "name": "phpunit/phpunit", - "version": "6.5.6", + "version": "7.5.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "3330ef26ade05359d006041316ed0fa9e8e3cefe" + "reference": "09c85e14994df92e5ff1f5ec0b481bdb7d3d3df9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3330ef26ade05359d006041316ed0fa9e8e3cefe", - "reference": "3330ef26ade05359d006041316ed0fa9e8e3cefe", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/09c85e14994df92e5ff1f5ec0b481bdb7d3d3df9", + "reference": "09c85e14994df92e5ff1f5ec0b481bdb7d3d3df9", "shasum": "" }, "require": { + "doctrine/instantiator": "^1.1", "ext-dom": "*", "ext-json": "*", "ext-libxml": "*", "ext-mbstring": "*", "ext-xml": "*", - "myclabs/deep-copy": "^1.6.1", - "phar-io/manifest": "^1.0.1", - "phar-io/version": "^1.0", - "php": "^7.0", + "myclabs/deep-copy": "^1.7", + "phar-io/manifest": "^1.0.2", + "phar-io/version": "^2.0", + "php": "^7.1", "phpspec/prophecy": "^1.7", - "phpunit/php-code-coverage": "^5.3", - "phpunit/php-file-iterator": "^1.4.3", + "phpunit/php-code-coverage": "^6.0.7", + "phpunit/php-file-iterator": "^2.0.1", "phpunit/php-text-template": "^1.2.1", - "phpunit/php-timer": "^1.0.9", - "phpunit/phpunit-mock-objects": "^5.0.5", - "sebastian/comparator": "^2.1", - "sebastian/diff": "^2.0", - "sebastian/environment": "^3.1", + "phpunit/php-timer": "^2.0", + "sebastian/comparator": "^3.0", + "sebastian/diff": "^3.0", + "sebastian/environment": "^4.0", "sebastian/exporter": "^3.1", "sebastian/global-state": "^2.0", "sebastian/object-enumerator": "^3.0.3", - "sebastian/resource-operations": "^1.0", + "sebastian/resource-operations": "^2.0", "sebastian/version": "^2.0.1" }, "conflict": { - "phpdocumentor/reflection-docblock": "3.0.2", - "phpunit/dbunit": "<3.0" + "phpunit/phpunit-mock-objects": "*" }, "require-dev": { "ext-pdo": "*" }, "suggest": { + "ext-soap": "*", "ext-xdebug": "*", - "phpunit/php-invoker": "^1.1" + "phpunit/php-invoker": "^2.0" }, "bin": [ "phpunit" @@ -4122,7 +4099,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "6.5.x-dev" + "dev-master": "7.5-dev" } }, "autoload": { @@ -4148,66 +4125,7 @@ "testing", "xunit" ], - "time": "2018-02-01T05:57:37+00:00" - }, - { - "name": "phpunit/phpunit-mock-objects", - "version": "5.0.6", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "33fd41a76e746b8fa96d00b49a23dadfa8334cdf" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/33fd41a76e746b8fa96d00b49a23dadfa8334cdf", - "reference": "33fd41a76e746b8fa96d00b49a23dadfa8334cdf", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.0.5", - "php": "^7.0", - "phpunit/php-text-template": "^1.2.1", - "sebastian/exporter": "^3.1" - }, - "conflict": { - "phpunit/phpunit": "<6.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.5" - }, - "suggest": { - "ext-soap": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Mock Object library for PHPUnit", - "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", - "keywords": [ - "mock", - "xunit" - ], - "time": "2018-01-06T05:45:45+00:00" + "time": "2019-02-18T09:24:50+00:00" }, { "name": "predis/predis", @@ -4261,16 +4179,16 @@ }, { "name": "psr/log", - "version": "1.0.2", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d" + "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", - "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", + "url": "https://api.github.com/repos/php-fig/log/zipball/6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd", + "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd", "shasum": "" }, "require": { @@ -4304,7 +4222,7 @@ "psr", "psr-3" ], - "time": "2016-10-10T12:19:37+00:00" + "time": "2018-11-20T15:27:04+00:00" }, { "name": "roave/security-advisories", @@ -4312,21 +4230,24 @@ "source": { "type": "git", "url": "https://github.com/Roave/SecurityAdvisories.git", - "reference": "0253937ef2720f45fbe421e3ba486587b3080c35" + "reference": "614a9db1df6be4349544311096f8d48ca067ccbb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/0253937ef2720f45fbe421e3ba486587b3080c35", - "reference": "0253937ef2720f45fbe421e3ba486587b3080c35", + "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/614a9db1df6be4349544311096f8d48ca067ccbb", + "reference": "614a9db1df6be4349544311096f8d48ca067ccbb", "shasum": "" }, "conflict": { "3f/pygmentize": "<1.2", "adodb/adodb-php": "<5.20.12", + "alterphp/easyadmin-extension-bundle": ">=1.2,<1.2.11|>=1.3,<1.3.1", "amphp/artax": "<1.0.6|>=2,<2.0.6", "amphp/http": "<1.0.1", + "api-platform/core": ">=2.2,<2.2.10|>=2.3,<2.3.6", "asymmetricrypt/asymmetricrypt": ">=0,<9.9.99", "aws/aws-sdk-php": ">=3,<3.2.1", + "brightlocal/phpwhois": "<=4.2.5", "bugsnag/bugsnag-laravel": ">=2,<2.0.2", "cakephp/cakephp": ">=1.3,<1.3.18|>=2,<2.4.99|>=2.5,<2.5.99|>=2.6,<2.6.12|>=2.7,<2.7.6|>=3,<3.0.15|>=3.1,<3.1.4|>=3.4,<3.4.14|>=3.5,<3.5.17|>=3.6,<3.6.4", "cart2quote/module-quotation": ">=4.1.6,<=4.4.5|>=5,<5.4.4", @@ -4338,6 +4259,7 @@ "contao/core-bundle": ">=4,<4.4.18|>=4.5,<4.5.8", "contao/listing-bundle": ">=4,<4.4.8", "contao/newsletter-bundle": ">=4,<4.1", + "david-garcia/phpwhois": "<=4.3.1", "doctrine/annotations": ">=1,<1.2.7", "doctrine/cache": ">=1,<1.3.2|>=1.4,<1.4.2", "doctrine/common": ">=2,<2.4.3|>=2.5,<2.5.1", @@ -4348,11 +4270,99 @@ "doctrine/mongodb-odm-bundle": ">=2,<3.0.1", "doctrine/orm": ">=2,<2.4.8|>=2.5,<2.5.1", "dompdf/dompdf": ">=0.6,<0.6.2", - "drupal/core": ">=7,<7.59|>=8,<8.4.8|>=8.5,<8.5.3", - "drupal/drupal": ">=7,<7.59|>=8,<8.4.8|>=8.5,<8.5.3", + "drupal/acquia_connector": ">=1,<1.16", + "drupal/autologout": ">=4,<4.5", + "drupal/backup_migrate": ">=3,<3.4", + "drupal/bealestreet": ">=1,<1.2", + "drupal/bible": ">=1,<1.7", + "drupal/bing_autosuggest_api": ">=1,<1.1", + "drupal/bootstrap": ">=3,<3.14", + "drupal/brilliant_gallery": ">=1,<1.10", + "drupal/ckeditor_uploadimage": ">=1,<1.5", + "drupal/cleantalk": ">=2,<2.7", + "drupal/cloud": ">=1,<1.7", + "drupal/commerce": ">=2,<2.9", + "drupal/commerce_custom_order_status": ">=1,<1.1", + "drupal/commerce_klarna_checkout": ">=1,<1.5", + "drupal/config_perms": ">=1,<1.1|>=2,<2.2", + "drupal/config_update": ">=1,<1.5", + "drupal/core": ">=7,<7.62|>=8,<8.5.11|>=8.6,<8.6.10", + "drupal/datereminder": ">=1,<1.15", + "drupal/decoupled_router": ">=1,<1.2", + "drupal/domain_integration": ">=1,<1.2", + "drupal/drupal": ">=7,<7.62|>=8,<8.5.11|>=8.6,<8.6.10", + "drupal/entity": ">=1,<1.9", + "drupal/entity_ref_tab_formatter": ">=1,<1.3", + "drupal/entityqueue_taxonomy": ">=1,<1.1", + "drupal/esign": ">=1,<1.10", + "drupal/eu_cookie_compliance": ">=1,<1.1", + "drupal/exif": ">=1,<1.1", + "drupal/feedback_collect": ">=1,<1.6", + "drupal/filefield_paths": ">=1,<1.1", + "drupal/filefield_sources": ">=1,<1.11", + "drupal/focal_point": ">=1,<1.2", + "drupal/fontawesome": ">=2,<2.12", + "drupal/fraction": ">=1,<1.2", + "drupal/gathercontent": ">=3,<3.5", + "drupal/genpass": ">=1,<1.1", + "drupal/hosting_https": ">=3,<3.170", + "drupal/jsonapi": ">=1,<1.16", + "drupal/lightbox2": ">=2,<2.11", + "drupal/link": ">=1,<1.6", + "drupal/litejazz": ">=2,<2.3", + "drupal/mailhandler": ">=2,<2.11", + "drupal/mass_pwreset": ">=1,<1.1", + "drupal/me": ">=1,<1.3", + "drupal/media": ">=2,<2.19", + "drupal/menu_export": ">=1,<1.2", + "drupal/metatag": ">=1,<1.8", + "drupal/miniorange_oauth_client": ">=1,<1.21", + "drupal/moneysuite": ">=10,<10.4", + "drupal/mosaik": ">=1,<1.2", + "drupal/netforum_authentication": ">=1,<1.1", + "drupal/newsflash": ">=2,<2.6", + "drupal/node_feedback": ">=1,<1.3", + "drupal/node_view_permissions": ">=1,<1.1", + "drupal/nucleus": ">=1,<1.6", + "drupal/nvp": ">=1,<1.1", + "drupal/panels_breadcrumbs": ">=2,<2.4", + "drupal/panopoly_core": ">=1,<1.49", + "drupal/paragraphs": ">=1,<1.6", + "drupal/password_policy": ">=1,<1.16", + "drupal/permissions_by_term": ">=1,<1.35", + "drupal/phonefield": ">=1,<1.1", + "drupal/phpconfig": ">=1,<1.1", + "drupal/preview_link": ">=1,<1.1", + "drupal/print": ">=2,<2.1", + "drupal/provision": ">=3,<3.170", + "drupal/pubdlcnt": ">=1,<1.3", + "drupal/renderkit": ">=1,<1.6", + "drupal/responsive_menus": ">=1,<1.7", + "drupal/restws": ">=2,<2.8", + "drupal/sagepay_payment": ">=1,<1.5", + "drupal/salesforce": ">=3,<3.1", + "drupal/search_api_solr": ">=1,<1.14", + "drupal/search_autocomplete": ">=4,<4.8", + "drupal/services_sso_client": ">=1,<1.6", + "drupal/stacks": ">=1,<1.1", + "drupal/tapestry": ">=2,<2.2", + "drupal/term_reference_tree": ">=1,<1.11", + "drupal/tfa_basic": ">=1,<1.1", + "drupal/tft": ">=1,<1.1", + "drupal/tmgmt": ">=1,<1.7", + "drupal/uuid": ">=1,<1.1", + "drupal/video": ">=1,<1.4", + "drupal/workbench_moderation": ">=1,<1.4", + "drupal/yandex_metrics": ">=3,<3.1", + "drupal/zircon": ">=1,<1.2", "erusev/parsedown": "<1.7", - "ezsystems/ezpublish-legacy": ">=5.3,<5.3.12.3|>=5.4,<5.4.11.3|>=2017.8,<2017.8.1.1|>=2017.12,<2017.12.2.1", + "ezsystems/ezpublish-kernel": ">=5.3,<5.3.12.1|>=5.4,<5.4.13.1|>=6,<6.7.9.1|>=6.8,<6.13.5.1|>=7,<7.2.4.1|>=7.3,<7.3.2.1", + "ezsystems/ezpublish-legacy": ">=5.3,<5.3.12.6|>=5.4,<5.4.12.3|>=2011,<2017.12.4.3|>=2018.6,<2018.6.1.4|>=2018.9,<2018.9.1.3", + "ezsystems/repository-forms": ">=2.3,<2.3.2.1", + "ezyang/htmlpurifier": "<4.1.1", "firebase/php-jwt": "<2", + "fooman/tcpdf": "<6.2.22", + "fossar/tcpdf-parser": "<6.2.22", "friendsofsymfony/rest-bundle": ">=1.2,<1.2.2", "friendsofsymfony/user-bundle": ">=1.2,<1.3.5", "fuel/core": "<1.8.1", @@ -4360,71 +4370,98 @@ "gregwar/rst": "<1.0.3", "guzzlehttp/guzzle": ">=6,<6.2.1|>=4.0.0-rc2,<4.2.4|>=5,<5.3.1", "illuminate/auth": ">=4,<4.0.99|>=4.1,<=4.1.31|>=4.2,<=4.2.22|>=5,<=5.0.35|>=5.1,<=5.1.46|>=5.2,<=5.2.45|>=5.3,<=5.3.31|>=5.4,<=5.4.36|>=5.5,<5.5.10", + "illuminate/cookie": ">=4,<=4.0.11|>=4.1,<=4.1.31|>=4.2,<=4.2.22|>=5,<=5.0.35|>=5.1,<=5.1.46|>=5.2,<=5.2.45|>=5.3,<=5.3.31|>=5.4,<=5.4.36|>=5.5,<5.5.42|>=5.6,<5.6.30", "illuminate/database": ">=4,<4.0.99|>=4.1,<4.1.29", "illuminate/encryption": ">=4,<=4.0.11|>=4.1,<=4.1.31|>=4.2,<=4.2.22|>=5,<=5.0.35|>=5.1,<=5.1.46|>=5.2,<=5.2.45|>=5.3,<=5.3.31|>=5.4,<=5.4.36|>=5.5,<5.5.40|>=5.6,<5.6.15", + "ivankristianto/phpwhois": "<=4.3", + "james-heinrich/getid3": "<1.9.9", "joomla/session": "<1.3.1", + "jsmitty12/phpwhois": "<5.1", + "kazist/phpwhois": "<=4.2.6", "kreait/firebase-php": ">=3.2,<3.8.1", - "laravel/framework": ">=4,<4.0.99|>=4.1,<=4.1.31|>=4.2,<=4.2.22|>=5,<=5.0.35|>=5.1,<=5.1.46|>=5.2,<=5.2.45|>=5.3,<=5.3.31|>=5.4,<=5.4.36|>=5.5,<5.5.40|>=5.6,<5.6.15", + "la-haute-societe/tcpdf": "<6.2.22", + "laravel/framework": ">=4,<4.0.99|>=4.1,<=4.1.31|>=4.2,<=4.2.22|>=5,<=5.0.35|>=5.1,<=5.1.46|>=5.2,<=5.2.45|>=5.3,<=5.3.31|>=5.4,<=5.4.36|>=5.5,<5.5.42|>=5.6,<5.6.30", "laravel/socialite": ">=1,<1.0.99|>=2,<2.0.10", - "magento/magento1ce": ">=1.5.0.1,<1.9.3.2", - "magento/magento1ee": ">=1.9,<1.14.3.2", - "magento/product-community-edition": ">=2,<2.2.5", + "league/commonmark": ">=0.15.6,<0.18.1", + "magento/magento1ce": "<1.9.4", + "magento/magento1ee": ">=1.9,<1.14.4", + "magento/product-community-edition": ">=2,<2.2.7", "monolog/monolog": ">=1.8,<1.12", "namshi/jose": "<2.2", "onelogin/php-saml": "<2.10.4", + "openid/php-openid": "<2.3", "oro/crm": ">=1.7,<1.7.4", "oro/platform": ">=1.7,<1.7.4", "padraic/humbug_get_contents": "<1.1.2", "pagarme/pagarme-php": ">=0,<3", "paragonie/random_compat": "<2", "paypal/merchant-sdk-php": "<3.12", - "phpmailer/phpmailer": ">=5,<5.2.24", + "pear/archive_tar": "<1.4.4", + "phpmailer/phpmailer": ">=5,<5.2.27|>=6,<6.0.6", + "phpoffice/phpexcel": "<=1.8.1", + "phpoffice/phpspreadsheet": "<=1.5", "phpunit/phpunit": ">=4.8.19,<4.8.28|>=5.0.10,<5.6.3", + "phpwhois/phpwhois": "<=4.2.5", "phpxmlrpc/extras": "<0.6.1", "propel/propel": ">=2.0.0-alpha1,<=2.0.0-alpha7", "propel/propel1": ">=1,<=1.7.1", "pusher/pusher-php-server": "<2.2.1", + "robrichards/xmlseclibs": ">=1,<3.0.2", "sabre/dav": ">=1.6,<1.6.99|>=1.7,<1.7.11|>=1.8,<1.8.9", "sensiolabs/connect": "<4.2.3", + "serluck/phpwhois": "<=4.2.6", "shopware/shopware": "<5.3.7", "silverstripe/cms": ">=3,<=3.0.11|>=3.1,<3.1.11", "silverstripe/forum": "<=0.6.1|>=0.7,<=0.7.3", - "silverstripe/framework": ">=3,<3.3", + "silverstripe/framework": ">=3,<3.6.7|>=3.7,<3.7.3|>=4,<4.0.7|>=4.1,<4.1.5|>=4.2,<4.2.4|>=4.3,<4.3.1", "silverstripe/userforms": "<3", + "simple-updates/phpwhois": "<=1", "simplesamlphp/saml2": "<1.10.6|>=2,<2.3.8|>=3,<3.1.4", - "simplesamlphp/simplesamlphp": "<1.15.2", + "simplesamlphp/simplesamlphp": "<1.16.3", "simplesamlphp/simplesamlphp-module-infocard": "<1.0.1", "slim/slim": "<2.6", + "smarty/smarty": "<3.1.33", "socalnick/scn-social-auth": "<1.15.2", + "spoonity/tcpdf": "<6.2.22", "squizlabs/php_codesniffer": ">=1,<2.8.1|>=3,<3.0.1", "stormpath/sdk": ">=0,<9.9.99", "swiftmailer/swiftmailer": ">=4,<5.4.5", + "sylius/admin-bundle": ">=1,<1.0.17|>=1.1,<1.1.9|>=1.2,<1.2.2", + "sylius/sylius": ">=1,<1.0.17|>=1.1,<1.1.9|>=1.2,<1.2.2", "symfony/dependency-injection": ">=2,<2.0.17", - "symfony/form": ">=2.3,<2.3.35|>=2.4,<2.6.12|>=2.7,<2.7.38|>=2.8,<2.8.31|>=3,<3.2.14|>=3.3,<3.3.13", + "symfony/form": ">=2.3,<2.3.35|>=2.4,<2.6.12|>=2.7,<2.7.50|>=2.8,<2.8.49|>=3,<3.4.20|>=4,<4.0.15|>=4.1,<4.1.9|>=4.2,<4.2.1", "symfony/framework-bundle": ">=2,<2.3.18|>=2.4,<2.4.8|>=2.5,<2.5.2", - "symfony/http-foundation": ">=2,<2.7.48|>=2.8,<2.8.41|>=3,<3.3.17|>=3.4,<3.4.11|>=4,<4.0.11", + "symfony/http-foundation": ">=2,<2.7.49|>=2.8,<2.8.44|>=3,<3.3.18|>=3.4,<3.4.14|>=4,<4.0.14|>=4.1,<4.1.3", "symfony/http-kernel": ">=2,<2.3.29|>=2.4,<2.5.12|>=2.6,<2.6.8", "symfony/intl": ">=2.7,<2.7.38|>=2.8,<2.8.31|>=3,<3.2.14|>=3.3,<3.3.13", + "symfony/polyfill": ">=1,<1.10", + "symfony/polyfill-php55": ">=1,<1.10", "symfony/routing": ">=2,<2.0.19", - "symfony/security": ">=2,<2.7.48|>=2.8,<2.8.41|>=3,<3.3.17|>=3.4,<3.4.11|>=4,<4.0.11", + "symfony/security": ">=2,<2.7.50|>=2.8,<2.8.49|>=3,<3.4.19|>=4,<4.0.15|>=4.1,<4.1.9|>=4.2,<4.2.1", "symfony/security-bundle": ">=2,<2.7.48|>=2.8,<2.8.41|>=3,<3.3.17|>=3.4,<3.4.11|>=4,<4.0.11", "symfony/security-core": ">=2.4,<2.6.13|>=2.7,<2.7.9|>=2.7.30,<2.7.32|>=2.8,<2.8.37|>=3,<3.3.17|>=3.4,<3.4.7|>=4,<4.0.7", "symfony/security-csrf": ">=2.4,<2.7.48|>=2.8,<2.8.41|>=3,<3.3.17|>=3.4,<3.4.11|>=4,<4.0.11", "symfony/security-guard": ">=2.8,<2.8.41|>=3,<3.3.17|>=3.4,<3.4.11|>=4,<4.0.11", - "symfony/security-http": ">=2.3,<2.3.41|>=2.4,<2.7.48|>=2.8,<2.8.41|>=3,<3.3.17|>=3.4,<3.4.11|>=4,<4.0.11", + "symfony/security-http": ">=2.3,<2.3.41|>=2.4,<2.7.50|>=2.8,<2.8.49|>=3,<3.4.20|>=4,<4.0.15|>=4.1,<4.1.9|>=4.2,<4.2.1", "symfony/serializer": ">=2,<2.0.11", - "symfony/symfony": ">=2,<2.7.48|>=2.8,<2.8.41|>=3,<3.3.17|>=3.4,<3.4.11|>=4,<4.0.11", + "symfony/symfony": ">=2,<2.7.50|>=2.8,<2.8.49|>=3,<3.4.20|>=4,<4.0.15|>=4.1,<4.1.9|>=4.2,<4.2.1", "symfony/translation": ">=2,<2.0.17", "symfony/validator": ">=2,<2.0.24|>=2.1,<2.1.12|>=2.2,<2.2.5|>=2.3,<2.3.3", "symfony/web-profiler-bundle": ">=2,<2.3.19|>=2.4,<2.4.9|>=2.5,<2.5.4", "symfony/yaml": ">=2,<2.0.22|>=2.1,<2.1.7", + "tecnickcom/tcpdf": "<6.2.22", "thelia/backoffice-default-template": ">=2.1,<2.1.2", - "thelia/thelia": ">=2.1.0-beta1,<2.1.3|>=2.1,<2.1.2", + "thelia/thelia": ">=2.1,<2.1.2|>=2.1.0-beta1,<2.1.3", + "theonedemon/phpwhois": "<=4.2.5", "titon/framework": ">=0,<9.9.99", + "truckersmp/phpwhois": "<=4.3.1", "twig/twig": "<1.20", - "typo3/cms": ">=6.2,<6.2.30|>=7,<7.6.22|>=8,<8.7.5", + "typo3/cms": ">=6.2,<6.2.30|>=7,<7.6.32|>=8,<8.7.23|>=9,<9.5.4", + "typo3/cms-core": ">=8,<8.7.23|>=9,<9.5.4", "typo3/flow": ">=1,<1.0.4|>=1.1,<1.1.1|>=2,<2.0.1|>=2.3,<2.3.16|>=3,<3.0.10|>=3.1,<3.1.7|>=3.2,<3.2.7|>=3.3,<3.3.5", "typo3/neos": ">=1.1,<1.1.3|>=1.2,<1.2.13|>=2,<2.0.4", + "ua-parser/uap-php": "<3.8", + "wallabag/tcpdf": "<6.2.22", "willdurand/js-translation-bundle": "<2.1.1", "yiisoft/yii": ">=1.1.14,<1.1.15", "yiisoft/yii2": "<2.0.15", @@ -4438,9 +4475,10 @@ "zendframework/zend-captcha": ">=2,<2.4.9|>=2.5,<2.5.2", "zendframework/zend-crypt": ">=2,<2.4.9|>=2.5,<2.5.2", "zendframework/zend-db": ">=2,<2.0.99|>=2.1,<2.1.99|>=2.2,<2.2.10|>=2.3,<2.3.5", - "zendframework/zend-diactoros": ">=1,<1.0.4", + "zendframework/zend-diactoros": ">=1,<1.8.4", + "zendframework/zend-feed": ">=1,<2.10.3", "zendframework/zend-form": ">=2,<2.2.7|>=2.3,<2.3.1", - "zendframework/zend-http": ">=2,<2.0.99|>=2.1,<2.1.99|>=2.3,<2.3.8|>=2.4,<2.4.1", + "zendframework/zend-http": ">=1,<2.8.1", "zendframework/zend-json": ">=2.1,<2.1.6|>=2.2,<2.2.6", "zendframework/zend-ldap": ">=2,<2.0.99|>=2.1,<2.1.99|>=2.2,<2.2.8|>=2.3,<2.3.3", "zendframework/zend-mail": ">=2,<2.4.11|>=2.5,<2.7.2", @@ -4449,7 +4487,7 @@ "zendframework/zend-validator": ">=2.3,<2.3.6", "zendframework/zend-view": ">=2,<2.2.7|>=2.3,<2.3.1", "zendframework/zend-xmlrpc": ">=2.1,<2.1.6|>=2.2,<2.2.6", - "zendframework/zendframework": ">=2,<2.4.11|>=2.5,<2.5.1", + "zendframework/zendframework": "<2.5.1", "zendframework/zendframework1": "<1.12.20", "zendframework/zendopenid": ">=2,<2.0.2", "zendframework/zendxml": ">=1,<1.0.1", @@ -4471,7 +4509,7 @@ } ], "description": "Prevents installation of composer packages with known security vulnerabilities: no API, simply require it", - "time": "2018-07-04T05:48:21+00:00" + "time": "2019-02-22T18:40:39+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -4520,30 +4558,30 @@ }, { "name": "sebastian/comparator", - "version": "2.1.3", + "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "34369daee48eafb2651bea869b4b15d75ccc35f9" + "reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/34369daee48eafb2651bea869b4b15d75ccc35f9", - "reference": "34369daee48eafb2651bea869b4b15d75ccc35f9", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/5de4fc177adf9bce8df98d8d141a7559d7ccf6da", + "reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da", "shasum": "" }, "require": { - "php": "^7.0", - "sebastian/diff": "^2.0 || ^3.0", + "php": "^7.1", + "sebastian/diff": "^3.0", "sebastian/exporter": "^3.1" }, "require-dev": { - "phpunit/phpunit": "^6.4" + "phpunit/phpunit": "^7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.1.x-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -4580,32 +4618,33 @@ "compare", "equality" ], - "time": "2018-02-01T13:46:46+00:00" + "time": "2018-07-12T15:12:46+00:00" }, { "name": "sebastian/diff", - "version": "2.0.1", + "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "347c1d8b49c5c3ee30c7040ea6fc446790e6bddd" + "reference": "720fcc7e9b5cf384ea68d9d930d480907a0c1a29" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/347c1d8b49c5c3ee30c7040ea6fc446790e6bddd", - "reference": "347c1d8b49c5c3ee30c7040ea6fc446790e6bddd", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/720fcc7e9b5cf384ea68d9d930d480907a0c1a29", + "reference": "720fcc7e9b5cf384ea68d9d930d480907a0c1a29", "shasum": "" }, "require": { - "php": "^7.0" + "php": "^7.1" }, "require-dev": { - "phpunit/phpunit": "^6.2" + "phpunit/phpunit": "^7.5 || ^8.0", + "symfony/process": "^2 || ^3.3 || ^4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -4630,34 +4669,40 @@ "description": "Diff implementation", "homepage": "https://github.com/sebastianbergmann/diff", "keywords": [ - "diff" + "diff", + "udiff", + "unidiff", + "unified diff" ], - "time": "2017-08-03T08:09:46+00:00" + "time": "2019-02-04T06:01:07+00:00" }, { "name": "sebastian/environment", - "version": "3.1.0", + "version": "4.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5" + "reference": "6fda8ce1974b62b14935adc02a9ed38252eca656" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/cd0871b3975fb7fc44d11314fd1ee20925fce4f5", - "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/6fda8ce1974b62b14935adc02a9ed38252eca656", + "reference": "6fda8ce1974b62b14935adc02a9ed38252eca656", "shasum": "" }, "require": { - "php": "^7.0" + "php": "^7.1" }, "require-dev": { - "phpunit/phpunit": "^6.1" + "phpunit/phpunit": "^7.5" + }, + "suggest": { + "ext-posix": "*" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1.x-dev" + "dev-master": "4.1-dev" } }, "autoload": { @@ -4682,7 +4727,7 @@ "environment", "hhvm" ], - "time": "2017-07-01T08:51:00+00:00" + "time": "2019-02-01T05:27:49+00:00" }, { "name": "sebastian/exporter", @@ -4949,25 +4994,25 @@ }, { "name": "sebastian/resource-operations", - "version": "1.0.0", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52" + "reference": "4d7a795d35b889bf80a0cc04e08d77cedfa917a9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", - "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/4d7a795d35b889bf80a0cc04e08d77cedfa917a9", + "reference": "4d7a795d35b889bf80a0cc04e08d77cedfa917a9", "shasum": "" }, "require": { - "php": ">=5.6.0" + "php": "^7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -4987,7 +5032,7 @@ ], "description": "Provides a list of PHP built-in functions that operate on resources", "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "time": "2015-07-28T20:34:47+00:00" + "time": "2018-10-04T04:07:39+00:00" }, { "name": "sebastian/version", @@ -5034,16 +5079,16 @@ }, { "name": "symfony/browser-kit", - "version": "v4.0.4", + "version": "v4.2.3", "source": { "type": "git", "url": "https://github.com/symfony/browser-kit.git", - "reference": "fee0fcd501304b1c3190f6293f650cceb738a353" + "reference": "ee4462581eb54bf34b746e4a5d522a4f21620160" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/browser-kit/zipball/fee0fcd501304b1c3190f6293f650cceb738a353", - "reference": "fee0fcd501304b1c3190f6293f650cceb738a353", + "url": "https://api.github.com/repos/symfony/browser-kit/zipball/ee4462581eb54bf34b746e4a5d522a4f21620160", + "reference": "ee4462581eb54bf34b746e4a5d522a4f21620160", "shasum": "" }, "require": { @@ -5060,7 +5105,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.2-dev" } }, "autoload": { @@ -5087,30 +5132,34 @@ ], "description": "Symfony BrowserKit Component", "homepage": "https://symfony.com", - "time": "2018-01-03T07:38:00+00:00" + "time": "2019-01-16T21:31:25+00:00" }, { "name": "symfony/console", - "version": "v4.0.4", + "version": "v4.2.3", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "36d5b41e7d4e1ccf0370f6babe966c08ef0a1488" + "reference": "1f0ad51dfde4da8a6070f06adc58b4e37cbb37a4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/36d5b41e7d4e1ccf0370f6babe966c08ef0a1488", - "reference": "36d5b41e7d4e1ccf0370f6babe966c08ef0a1488", + "url": "https://api.github.com/repos/symfony/console/zipball/1f0ad51dfde4da8a6070f06adc58b4e37cbb37a4", + "reference": "1f0ad51dfde4da8a6070f06adc58b4e37cbb37a4", "shasum": "" }, "require": { "php": "^7.1.3", + "symfony/contracts": "^1.0", "symfony/polyfill-mbstring": "~1.0" }, "conflict": { "symfony/dependency-injection": "<3.4", "symfony/process": "<3.3" }, + "provide": { + "psr/log-implementation": "1.0" + }, "require-dev": { "psr/log": "~1.0", "symfony/config": "~3.4|~4.0", @@ -5128,7 +5177,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.2-dev" } }, "autoload": { @@ -5155,20 +5204,88 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2018-01-29T09:06:29+00:00" + "time": "2019-01-25T14:35:16+00:00" }, { - "name": "symfony/css-selector", - "version": "v4.0.4", + "name": "symfony/contracts", + "version": "v1.0.2", "source": { "type": "git", - "url": "https://github.com/symfony/css-selector.git", - "reference": "f97600434e3141ef3cbb9ea42cf500fba88022b7" + "url": "https://github.com/symfony/contracts.git", + "reference": "1aa7ab2429c3d594dd70689604b5cf7421254cdf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/f97600434e3141ef3cbb9ea42cf500fba88022b7", - "reference": "f97600434e3141ef3cbb9ea42cf500fba88022b7", + "url": "https://api.github.com/repos/symfony/contracts/zipball/1aa7ab2429c3d594dd70689604b5cf7421254cdf", + "reference": "1aa7ab2429c3d594dd70689604b5cf7421254cdf", + "shasum": "" + }, + "require": { + "php": "^7.1.3" + }, + "require-dev": { + "psr/cache": "^1.0", + "psr/container": "^1.0" + }, + "suggest": { + "psr/cache": "When using the Cache contracts", + "psr/container": "When using the Service contracts", + "symfony/cache-contracts-implementation": "", + "symfony/service-contracts-implementation": "", + "symfony/translation-contracts-implementation": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\": "" + }, + "exclude-from-classmap": [ + "**/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "A set of abstractions extracted out of the Symfony components", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "time": "2018-12-05T08:06:11+00:00" + }, + { + "name": "symfony/css-selector", + "version": "v4.2.3", + "source": { + "type": "git", + "url": "https://github.com/symfony/css-selector.git", + "reference": "48eddf66950fa57996e1be4a55916d65c10c604a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/48eddf66950fa57996e1be4a55916d65c10c604a", + "reference": "48eddf66950fa57996e1be4a55916d65c10c604a", "shasum": "" }, "require": { @@ -5177,7 +5294,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.2-dev" } }, "autoload": { @@ -5208,24 +5325,25 @@ ], "description": "Symfony CssSelector Component", "homepage": "https://symfony.com", - "time": "2018-01-03T07:38:00+00:00" + "time": "2019-01-16T20:31:39+00:00" }, { "name": "symfony/dom-crawler", - "version": "v4.0.4", + "version": "v4.2.3", "source": { "type": "git", "url": "https://github.com/symfony/dom-crawler.git", - "reference": "39b785e1cf28e9f21bb601a5d62c4992a8e8a290" + "reference": "d8476760b04cdf7b499c8718aa437c20a9155103" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/39b785e1cf28e9f21bb601a5d62c4992a8e8a290", - "reference": "39b785e1cf28e9f21bb601a5d62c4992a8e8a290", + "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/d8476760b04cdf7b499c8718aa437c20a9155103", + "reference": "d8476760b04cdf7b499c8718aa437c20a9155103", "shasum": "" }, "require": { "php": "^7.1.3", + "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-mbstring": "~1.0" }, "require-dev": { @@ -5237,7 +5355,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.2-dev" } }, "autoload": { @@ -5264,24 +5382,25 @@ ], "description": "Symfony DomCrawler Component", "homepage": "https://symfony.com", - "time": "2018-01-03T07:38:00+00:00" + "time": "2019-01-16T20:35:37+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v4.0.4", + "version": "v4.2.3", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "74d33aac36208c4d6757807d9f598f0133a3a4eb" + "reference": "bd09ad265cd50b2b9d09d65ce6aba2d29bc81fe1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/74d33aac36208c4d6757807d9f598f0133a3a4eb", - "reference": "74d33aac36208c4d6757807d9f598f0133a3a4eb", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/bd09ad265cd50b2b9d09d65ce6aba2d29bc81fe1", + "reference": "bd09ad265cd50b2b9d09d65ce6aba2d29bc81fe1", "shasum": "" }, "require": { - "php": "^7.1.3" + "php": "^7.1.3", + "symfony/contracts": "^1.0" }, "conflict": { "symfony/dependency-injection": "<3.4" @@ -5300,7 +5419,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.2-dev" } }, "autoload": { @@ -5327,29 +5446,30 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", - "time": "2018-01-03T07:38:00+00:00" + "time": "2019-01-16T20:35:37+00:00" }, { "name": "symfony/filesystem", - "version": "v4.0.8", + "version": "v4.2.3", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "5d2d655b2c72fc4d9bf7e9bf14f72a447b940f21" + "reference": "7c16ebc2629827d4ec915a52ac809768d060a4ee" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/5d2d655b2c72fc4d9bf7e9bf14f72a447b940f21", - "reference": "5d2d655b2c72fc4d9bf7e9bf14f72a447b940f21", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/7c16ebc2629827d4ec915a52ac809768d060a4ee", + "reference": "7c16ebc2629827d4ec915a52ac809768d060a4ee", "shasum": "" }, "require": { - "php": "^7.1.3" + "php": "^7.1.3", + "symfony/polyfill-ctype": "~1.8" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.2-dev" } }, "autoload": { @@ -5376,69 +5496,20 @@ ], "description": "Symfony Filesystem Component", "homepage": "https://symfony.com", - "time": "2018-02-22T10:50:29+00:00" - }, - { - "name": "symfony/finder", - "version": "v4.0.4", - "source": { - "type": "git", - "url": "https://github.com/symfony/finder.git", - "reference": "8b08180f2b7ccb41062366b9ad91fbc4f1af8601" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/8b08180f2b7ccb41062366b9ad91fbc4f1af8601", - "reference": "8b08180f2b7ccb41062366b9ad91fbc4f1af8601", - "shasum": "" - }, - "require": { - "php": "^7.1.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Finder\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Finder Component", - "homepage": "https://symfony.com", - "time": "2018-01-03T07:38:00+00:00" + "time": "2019-01-16T20:35:37+00:00" }, { "name": "symfony/options-resolver", - "version": "v4.0.8", + "version": "v4.2.3", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", - "reference": "371532a2cfe932f7a3766dd4c45364566def1dd0" + "reference": "831b272963a8aa5a0613a1a7f013322d8161bbbb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/371532a2cfe932f7a3766dd4c45364566def1dd0", - "reference": "371532a2cfe932f7a3766dd4c45364566def1dd0", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/831b272963a8aa5a0613a1a7f013322d8161bbbb", + "reference": "831b272963a8aa5a0613a1a7f013322d8161bbbb", "shasum": "" }, "require": { @@ -5447,7 +5518,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.2-dev" } }, "autoload": { @@ -5479,84 +5550,30 @@ "configuration", "options" ], - "time": "2018-01-18T22:19:33+00:00" - }, - { - "name": "symfony/polyfill-php72", - "version": "v1.7.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "8eca20c8a369e069d4f4c2ac9895144112867422" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/8eca20c8a369e069d4f4c2ac9895144112867422", - "reference": "8eca20c8a369e069d4f4c2ac9895144112867422", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.7-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php72\\": "" - }, - "files": [ - "bootstrap.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "time": "2018-01-31T17:43:24+00:00" + "time": "2019-01-16T21:31:25+00:00" }, { "name": "symfony/stopwatch", - "version": "v4.0.8", + "version": "v4.2.3", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", - "reference": "6795ffa2f8eebedac77f045aa62c0c10b2763042" + "reference": "b1a5f646d56a3290230dbc8edf2a0d62cda23f67" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/6795ffa2f8eebedac77f045aa62c0c10b2763042", - "reference": "6795ffa2f8eebedac77f045aa62c0c10b2763042", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/b1a5f646d56a3290230dbc8edf2a0d62cda23f67", + "reference": "b1a5f646d56a3290230dbc8edf2a0d62cda23f67", "shasum": "" }, "require": { - "php": "^7.1.3" + "php": "^7.1.3", + "symfony/contracts": "^1.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.2-dev" } }, "autoload": { @@ -5583,24 +5600,25 @@ ], "description": "Symfony Stopwatch Component", "homepage": "https://symfony.com", - "time": "2018-02-19T16:50:22+00:00" + "time": "2019-01-16T20:31:39+00:00" }, { "name": "symfony/yaml", - "version": "v4.0.4", + "version": "v4.2.3", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "ffc60bda1d4a00ec0b32eeabf39dc017bf480028" + "reference": "d461670ee145092b7e2a56c1da7118f19cadadb0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/ffc60bda1d4a00ec0b32eeabf39dc017bf480028", - "reference": "ffc60bda1d4a00ec0b32eeabf39dc017bf480028", + "url": "https://api.github.com/repos/symfony/yaml/zipball/d461670ee145092b7e2a56c1da7118f19cadadb0", + "reference": "d461670ee145092b7e2a56c1da7118f19cadadb0", "shasum": "" }, "require": { - "php": "^7.1.3" + "php": "^7.1.3", + "symfony/polyfill-ctype": "~1.8" }, "conflict": { "symfony/console": "<3.4" @@ -5614,7 +5632,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.2-dev" } }, "autoload": { @@ -5641,7 +5659,7 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2018-01-21T19:06:11+00:00" + "time": "2019-01-16T20:35:37+00:00" }, { "name": "theseer/tokenizer", @@ -5685,20 +5703,20 @@ }, { "name": "yiisoft/yii2-bootstrap", - "version": "2.0.8", + "version": "2.0.9", "source": { "type": "git", "url": "https://github.com/yiisoft/yii2-bootstrap.git", - "reference": "3f49c47924bb9fa5363c3fc7b073d954168cf438" + "reference": "4677951dda712dd99d5bf2a127eaee118dfea860" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/yiisoft/yii2-bootstrap/zipball/3f49c47924bb9fa5363c3fc7b073d954168cf438", - "reference": "3f49c47924bb9fa5363c3fc7b073d954168cf438", + "url": "https://api.github.com/repos/yiisoft/yii2-bootstrap/zipball/4677951dda712dd99d5bf2a127eaee118dfea860", + "reference": "4677951dda712dd99d5bf2a127eaee118dfea860", "shasum": "" }, "require": { - "bower-asset/bootstrap": "3.3.* | 3.2.* | 3.1.*", + "bower-asset/bootstrap": "3.4.* | 3.3.* | 3.2.* | 3.1.*", "yiisoft/yii2": "~2.0.6" }, "type": "yii2-extension", @@ -5741,20 +5759,20 @@ "bootstrap", "yii2" ], - "time": "2018-02-16T10:41:52+00:00" + "time": "2019-01-29T21:39:45+00:00" }, { "name": "yiisoft/yii2-debug", - "version": "2.0.13", + "version": "2.0.14", "source": { "type": "git", "url": "https://github.com/yiisoft/yii2-debug.git", - "reference": "b37f414959c2fafefb332020b42037cd17c1cb7f" + "reference": "dc5a4a8529de1a41dbb037dbabf1f3f93002f21d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/yiisoft/yii2-debug/zipball/b37f414959c2fafefb332020b42037cd17c1cb7f", - "reference": "b37f414959c2fafefb332020b42037cd17c1cb7f", + "url": "https://api.github.com/repos/yiisoft/yii2-debug/zipball/dc5a4a8529de1a41dbb037dbabf1f3f93002f21d", + "reference": "dc5a4a8529de1a41dbb037dbabf1f3f93002f21d", "shasum": "" }, "require": { @@ -5769,7 +5787,7 @@ }, "autoload": { "psr-4": { - "yii\\debug\\": "" + "yii\\debug\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -5788,25 +5806,25 @@ "debugger", "yii2" ], - "time": "2017-12-05T07:36:23+00:00" + "time": "2018-09-23T21:41:04+00:00" }, { "name": "yiisoft/yii2-faker", - "version": "2.0.3", + "version": "2.0.4", "source": { "type": "git", "url": "https://github.com/yiisoft/yii2-faker.git", - "reference": "b88ca69ee226a3610b2c26c026c3203d7ac50f6c" + "reference": "3df62b1dcb272a8413f9c6e532c9d73f325ccde1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/yiisoft/yii2-faker/zipball/b88ca69ee226a3610b2c26c026c3203d7ac50f6c", - "reference": "b88ca69ee226a3610b2c26c026c3203d7ac50f6c", + "url": "https://api.github.com/repos/yiisoft/yii2-faker/zipball/3df62b1dcb272a8413f9c6e532c9d73f325ccde1", + "reference": "3df62b1dcb272a8413f9c6e532c9d73f325ccde1", "shasum": "" }, "require": { - "fzaninotto/faker": "*", - "yiisoft/yii2": "*" + "fzaninotto/faker": "~1.4", + "yiisoft/yii2": "~2.0.0" }, "type": "yii2-extension", "extra": { @@ -5835,7 +5853,7 @@ "faker", "yii2" ], - "time": "2015-03-01T06:22:44+00:00" + "time": "2018-02-19T20:27:10+00:00" } ], "aliases": [], @@ -5847,7 +5865,12 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "^7.1" + "php": "^7.2", + "ext-json": "*", + "ext-mbstring": "*", + "ext-pdo": "*", + "ext-libxml": "*", + "ext-simplexml": "*" }, "platform-dev": [] } diff --git a/console/codeception.dist.yml b/console/codeception.dist.yml new file mode 100644 index 0000000..673cb42 --- /dev/null +++ b/console/codeception.dist.yml @@ -0,0 +1,23 @@ +namespace: console\tests +actor_suffix: Tester +paths: + tests: tests + log: tests/_output + data: tests/_data + helpers: tests/_support +settings: + bootstrap: _bootstrap.php + colors: true + memory_limit: 1024M +coverage: + enabled: true + whitelist: + include: + - ./* + exclude: + - config/* + - runtime/* + - migrations/* + - views/* + - codeception.dist.yml + - codeception.yml diff --git a/console/config/config.php b/console/config/config.php index be4d94e..06eba95 100644 --- a/console/config/config.php +++ b/console/config/config.php @@ -1,15 +1,9 @@ 'accounts-console', 'basePath' => dirname(__DIR__), 'bootstrap' => ['log', 'queue'], 'controllerNamespace' => 'console\controllers', - 'params' => $params, 'components' => [ 'log' => [ 'targets' => [ diff --git a/console/config/params.php b/console/config/params.php deleted file mode 100644 index d0b9c34..0000000 --- a/console/config/params.php +++ /dev/null @@ -1,3 +0,0 @@ -execute('SET FOREIGN_KEY_CHECKS=0'); $dbName = $this->db->createCommand('SELECT DATABASE()')->queryScalar(); - $this->execute("ALTER DATABASE {{%$dbName}} CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci"); + $this->execute("ALTER DATABASE {{%{$dbName}}} CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci"); $tables = $this->db->createCommand('SHOW TABLES')->queryColumn(); foreach ($tables as $table) { - $this->execute("ALTER TABLE {{%$table}} CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci"); + $this->execute("ALTER TABLE {{%{$table}}} CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci"); } $this->execute('ALTER TABLE {{%usernames_history}} MODIFY username VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL'); @@ -23,10 +23,10 @@ class m171222_200114_migrate_to_utf8md4_unicode_ci extends Migration { $this->execute('SET FOREIGN_KEY_CHECKS=0'); $dbName = $this->db->createCommand('SELECT DATABASE()')->queryScalar(); - $this->execute("ALTER DATABASE {{%$dbName}} CHARACTER SET = utf8 COLLATE = utf8_general_ci"); + $this->execute("ALTER DATABASE {{%{$dbName}}} CHARACTER SET = utf8 COLLATE = utf8_general_ci"); $tables = $this->db->createCommand('SHOW TABLES')->queryColumn(); foreach ($tables as $table) { - $this->execute("ALTER TABLE {{%$table}} CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci"); + $this->execute("ALTER TABLE {{%{$table}}} CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci"); } $this->execute('ALTER TABLE {{%usernames_history}} MODIFY username VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL'); diff --git a/console/tests/.gitignore b/console/tests/.gitignore new file mode 100644 index 0000000..089cfd4 --- /dev/null +++ b/console/tests/.gitignore @@ -0,0 +1,2 @@ +unit.suite.yml +_support/_generated diff --git a/console/tests/_bootstrap.php b/console/tests/_bootstrap.php new file mode 100644 index 0000000..e919416 --- /dev/null +++ b/console/tests/_bootstrap.php @@ -0,0 +1,10 @@ + fixtures\EmailActivationFixture::class, 'minecraftSessions' => fixtures\MinecraftAccessKeyFixture::class, @@ -28,7 +30,7 @@ class CleanupControllerTest extends TestCase { $expiredConfirmation = $this->tester->grabFixture('emailActivations', 'deeplyExpiredConfirmation'); $controller = new CleanupController('cleanup', Yii::$app); - $this->assertEquals(0, $controller->actionEmailKeys()); + $this->assertSame(0, $controller->actionEmailKeys()); $this->tester->cantSeeRecord(EmailActivation::class, ['key' => $expiredConfirmation->key]); } @@ -38,7 +40,7 @@ class CleanupControllerTest extends TestCase { $expiredSession = $this->tester->grabFixture('minecraftSessions', 'expired-token'); $controller = new CleanupController('cleanup', Yii::$app); - $this->assertEquals(0, $controller->actionMinecraftSessions()); + $this->assertSame(0, $controller->actionMinecraftSessions()); $this->tester->cantSeeRecord(MinecraftAccessKey::class, ['access_token' => $expiredSession->access_token]); } @@ -51,11 +53,11 @@ class CleanupControllerTest extends TestCase { $totalSessionsCount = AccountSession::find()->count(); $controller = new CleanupController('cleanup', Yii::$app); - $this->assertEquals(0, $controller->actionWebSessions()); + $this->assertSame(0, $controller->actionWebSessions()); $this->tester->cantSeeRecord(AccountSession::class, ['id' => $expiredSession->id]); $this->tester->cantSeeRecord(AccountSession::class, ['id' => $notRefreshedSession->id]); - $this->assertEquals($totalSessionsCount - 2, AccountSession::find()->count()); + $this->assertSame($totalSessionsCount - 2, (int)AccountSession::find()->count()); } public function testActionOauthClients() { @@ -63,11 +65,11 @@ class CleanupControllerTest extends TestCase { $totalClientsCount = OauthClient::find()->includeDeleted()->count(); $controller = new CleanupController('cleanup', Yii::$app); - $this->assertEquals(0, $controller->actionOauthClients()); + $this->assertSame(0, $controller->actionOauthClients()); $this->assertNull(OauthClient::find()->includeDeleted()->andWhere(['id' => 'deleted-oauth-client'])->one()); $this->assertNotNull(OauthClient::find()->includeDeleted()->andWhere(['id' => 'deleted-oauth-client-with-sessions'])->one()); - $this->assertEquals($totalClientsCount - 1, OauthClient::find()->includeDeleted()->count()); + $this->assertSame($totalClientsCount - 1, (int)OauthClient::find()->includeDeleted()->count()); /** @var ClearOauthSessions $job */ $job = $this->tester->grabLastQueuedJob(); diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index 7854586..b58867a 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -1,82 +1,136 @@ version: '2' services: - app: - image: registry.ely.by/elyby/accounts:dev - build: - context: . - args: - build_env: dev - depends_on: - - db - - redis - volumes: - - ./:/var/www/html/ - env_file: .env + app: + image: registry.ely.by/elyby/accounts:dev + build: + context: . + args: + build_env: dev + depends_on: + - db + - redis + volumes: + - ./:/var/www/html/ + env_file: .env - worker: - image: registry.ely.by/elyby/accounts:dev - build: - context: . - args: - build_env: dev - command: ['php', 'yii', 'queue/listen', '-v'] - depends_on: - - db - - redis - volumes: - - ./:/var/www/html/ - env_file: .env + worker: + image: registry.ely.by/elyby/accounts:dev + build: + context: . + args: + build_env: dev + command: ['php', 'yii', 'queue/listen', '-v'] + depends_on: + - db + - redis + volumes: + - ./:/var/www/html/ + env_file: .env - cron: - image: registry.ely.by/elyby/accounts:dev - build: - context: . - args: - build_env: dev - command: ['crond', '-s', '/etc/cron.d', '-f', '-L', '/var/log/cron.log'] - depends_on: - - db - - redis - volumes: - - ./:/var/www/html/ - env_file: .env + cron: + image: registry.ely.by/elyby/accounts:dev + build: + context: . + args: + build_env: dev + command: ['crond', '-s', '/etc/cron.d', '-f', '-L', '/var/log/cron.log'] + stop_signal: SIGKILL + depends_on: + - db + - redis + volumes: + - ./:/var/www/html/ + env_file: .env - web: - image: registry.ely.by/elyby/accounts-nginx:latest - volumes_from: - - app - links: - - app:php - env_file: .env - networks: - - default - - nginx-proxy + web: + image: registry.ely.by/elyby/accounts-nginx:latest + volumes_from: + - app + links: + - app:php + env_file: .env + networks: + - default + - nginx-proxy - db: - build: ./docker/mariadb - env_file: .env - volumes: - - ./data/mysql:/var/lib/mysql + db: + build: ./docker/mariadb + env_file: .env + volumes: + - ./data/mysql:/var/lib/mysql - redis: - image: redis:3.0-alpine - volumes: - - ./data/redis:/data + redis: + image: redis:3.0-alpine + volumes: + - ./data/redis:/data - phpmyadmin: - build: ./docker/phpmyadmin - environment: - - PMA_ARBITRARY=1 - - PMA_USER=root - - PMA_PASSWORD= - - VIRTUAL_HOST=pma.account.ely.by.local - depends_on: - - db - networks: - - default - - nginx-proxy + # If you want to use separate databases for the tests follow the next steps: + # 1) Create a file common/config/config-local.php with the next containment: + # + # [ + # 'db' => [ + # 'dsn' => 'mysql:host=testdb;dbname=test', + # 'username' => 'test', + # 'password' => 'test', + # ], + # 'unbufferedDb' => [ + # 'dsn' => 'mysql:host=testdb;dbname=test', + # 'username' => 'test', + # 'password' => 'test', + # ], + # 'redis' => [ + # 'hostname' => 'testredis', + # 'password' => null, + # 'port' => 6379, + # 'database' => 0, + # ], + # ], + # ]; + # + # 2) Clone api/tests/functional.suite.dist.yml into api/test/functional.suite.yml + # and adjust Redis module host value to the "testredis". + # + # 3) Uncomment the next 2 services (testdb and testredis): + # + # testdb: + # build: ./docker/mariadb + # volumes: + # - ./data/mysql-test:/var/lib/mysql + # environment: + # - MYSQL_ALLOW_EMPTY_PASSWORD=yes + # - MYSQL_ROOT_PASSWORD= + # - MYSQL_DATABASE=test + # - MYSQL_USER=test + # - MYSQL_PASSWORD=test + # + # testredis: + # image: redis:3.0-alpine + # volumes: + # - ./data/redis-test:/data + # + # 4) To run migrations on tests database you must execute slightly adjusted + # migrate command: env YII_ENV=test yii migrate + + phpmyadmin: + build: ./docker/phpmyadmin + environment: + - PMA_ARBITRARY=1 + - PMA_USER=root + - PMA_PASSWORD= + - VIRTUAL_HOST=pma.account.ely.by.local # Feel free to adjust this domain + depends_on: + - db + networks: + - default + - nginx-proxy networks: - nginx-proxy: - external: - name: nginx-proxy + nginx-proxy: + external: + name: nginx-proxy diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index 687baab..6b0f928 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -1,57 +1,58 @@ version: '2' services: - app: - image: registry.ely.by/elyby/accounts:latest - restart: always - depends_on: - - db - - redis - env_file: .env + app: + image: registry.ely.by/elyby/accounts:latest + restart: always + depends_on: + - db + - redis + env_file: .env - worker: - image: registry.ely.by/elyby/accounts:latest - restart: always - command: ['php', 'yii', 'queue/listen', '-v'] - depends_on: - - db - - redis - env_file: .env + worker: + image: registry.ely.by/elyby/accounts:latest + restart: always + command: ['php', 'yii', 'queue/listen', '-v'] + depends_on: + - db + - redis + env_file: .env - worker: - image: registry.ely.by/elyby/accounts:latest - restart: always - command: ['crond', '-s', '/etc/cron.d', '-f', '-L', '/var/log/cron.log'] - depends_on: - - db - - redis - env_file: .env + cron: + image: registry.ely.by/elyby/accounts:latest + restart: always + command: ['crond', '-s', '/etc/cron.d', '-f', '-L', '/var/log/cron.log'] + stop_signal: SIGKILL + depends_on: + - db + - redis + env_file: .env - web: - image: registry.ely.by/elyby/accounts-nginx:1.0.3 - restart: always - volumes_from: - - app - links: - - app:php - env_file: .env - networks: - - default - - nginx-proxy + web: + image: registry.ely.by/elyby/accounts-nginx:1.0.3 + restart: always + volumes_from: + - app + links: + - app:php + env_file: .env + networks: + - default + - nginx-proxy - db: - build: ./docker/mariadb - restart: always - env_file: .env - volumes: - - ./data/mysql:/var/lib/mysql + db: + build: ./docker/mariadb + restart: always + env_file: .env + volumes: + - ./data/mysql:/var/lib/mysql - redis: - image: redis:3.0-alpine - restart: always - volumes: - - ./data/redis:/data + redis: + image: redis:3.0-alpine + restart: always + volumes: + - ./data/redis:/data networks: - nginx-proxy: - external: - name: nginx-proxy + nginx-proxy: + external: + name: nginx-proxy diff --git a/tests/.gitignore b/tests/.gitignore deleted file mode 100644 index c40b483..0000000 --- a/tests/.gitignore +++ /dev/null @@ -1 +0,0 @@ -.bash_history diff --git a/tests/codeception.yml b/tests/codeception.yml deleted file mode 100644 index d6db419..0000000 --- a/tests/codeception.yml +++ /dev/null @@ -1,10 +0,0 @@ -include: - - codeception/common - - codeception/console - - codeception/api - -paths: - log: codeception/_output - -settings: - colors: true diff --git a/tests/codeception/api/.gitignore b/tests/codeception/api/.gitignore deleted file mode 100644 index 3217386..0000000 --- a/tests/codeception/api/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# these files are auto generated by codeception build -_support/_generated diff --git a/tests/codeception/api/_bootstrap.php b/tests/codeception/api/_bootstrap.php deleted file mode 100644 index 3bd1f3c..0000000 --- a/tests/codeception/api/_bootstrap.php +++ /dev/null @@ -1,23 +0,0 @@ -getActor()->sendPOST('/authserver/authentication/authenticate', $params); - } - - public function refresh($params) { - $this->getActor()->sendPOST('/authserver/authentication/refresh', $params); - } - - public function validate($params) { - $this->getActor()->sendPOST('/authserver/authentication/validate', $params); - } - - public function invalidate($params) { - $this->getActor()->sendPOST('/authserver/authentication/invalidate', $params); - } - - public function signout($params) { - $this->getActor()->sendPOST('/authserver/authentication/signout', $params); - } - -} diff --git a/tests/codeception/api/_pages/IdentityInfoRoute.php b/tests/codeception/api/_pages/IdentityInfoRoute.php deleted file mode 100644 index c3a8ed4..0000000 --- a/tests/codeception/api/_pages/IdentityInfoRoute.php +++ /dev/null @@ -1,10 +0,0 @@ -getActor()->sendGET('/account/v1/info'); - } - -} diff --git a/tests/codeception/api/_pages/InternalRoute.php b/tests/codeception/api/_pages/InternalRoute.php deleted file mode 100644 index ceacfb8..0000000 --- a/tests/codeception/api/_pages/InternalRoute.php +++ /dev/null @@ -1,10 +0,0 @@ -getActor()->sendGET('/internal/accounts/info', [$param => $value]); - } - -} diff --git a/tests/codeception/api/_pages/OauthRoute.php b/tests/codeception/api/_pages/OauthRoute.php deleted file mode 100644 index 11b5e18..0000000 --- a/tests/codeception/api/_pages/OauthRoute.php +++ /dev/null @@ -1,42 +0,0 @@ -getActor()->sendGET('/oauth2/v1/validate', $queryParams); - } - - public function complete(array $queryParams = [], array $postParams = []): void { - $this->getActor()->sendPOST('/oauth2/v1/complete?' . http_build_query($queryParams), $postParams); - } - - public function issueToken(array $postParams = []): void { - $this->getActor()->sendPOST('/oauth2/v1/token', $postParams); - } - - public function createClient(string $type, array $postParams): void { - $this->getActor()->sendPOST('/v1/oauth2/' . $type, $postParams); - } - - public function updateClient(string $clientId, array $params): void { - $this->getActor()->sendPUT('/v1/oauth2/' . $clientId, $params); - } - - public function deleteClient(string $clientId): void { - $this->getActor()->sendDELETE('/v1/oauth2/' . $clientId); - } - - public function resetClient(string $clientId, bool $regenerateSecret = false): void { - $this->getActor()->sendPOST("/v1/oauth2/$clientId/reset" . ($regenerateSecret ? '?regenerateSecret' : '')); - } - - public function getClient(string $clientId): void { - $this->getActor()->sendGET("/v1/oauth2/$clientId"); - } - - public function getPerAccount(int $accountId): void { - $this->getActor()->sendGET("/v1/accounts/$accountId/oauth2/clients"); - } - -} diff --git a/tests/codeception/api/_pages/OptionsRoute.php b/tests/codeception/api/_pages/OptionsRoute.php deleted file mode 100644 index 9413aeb..0000000 --- a/tests/codeception/api/_pages/OptionsRoute.php +++ /dev/null @@ -1,10 +0,0 @@ -getActor()->sendGET('/options'); - } - -} diff --git a/tests/codeception/api/_pages/SessionServerRoute.php b/tests/codeception/api/_pages/SessionServerRoute.php deleted file mode 100644 index 5d34346..0000000 --- a/tests/codeception/api/_pages/SessionServerRoute.php +++ /dev/null @@ -1,26 +0,0 @@ -getActor()->sendPOST('/minecraft/session/join', $params); - } - - public function joinLegacy(array $params) { - $this->getActor()->sendGET('/minecraft/session/legacy/join', $params); - } - - public function hasJoined(array $params) { - $this->getActor()->sendGET('/minecraft/session/hasJoined', $params); - } - - public function hasJoinedLegacy(array $params) { - $this->getActor()->sendGET('/minecraft/session/legacy/hasJoined', $params); - } - - public function profile($profileUuid) { - $this->getActor()->sendGET("/minecraft/session/profile/{$profileUuid}"); - } - -} diff --git a/tests/codeception/api/codeception.yml b/tests/codeception/api/codeception.yml deleted file mode 100644 index 406850d..0000000 --- a/tests/codeception/api/codeception.yml +++ /dev/null @@ -1,27 +0,0 @@ -namespace: tests\codeception\api -actor: Tester -params: [env] -paths: - tests: . - log: _output - data: _data - helpers: _support -settings: - bootstrap: _bootstrap.php - suite_class: \PHPUnit_Framework_TestSuite - colors: true - memory_limit: 1024M - log: true -config: - test_entry_url: http://localhost/api/web/index.php -coverage: - enabled: true - remote: true - whitelist: - include: - - ../../../api/* - exclude: - - ../../../api/config/* - - ../../../api/web/* - - ../../../api/runtime/* - c3url: 'http://localhost/api/web/index.php' diff --git a/tests/codeception/api/functional.suite.yml b/tests/codeception/api/functional.suite.yml deleted file mode 100644 index 570a025..0000000 --- a/tests/codeception/api/functional.suite.yml +++ /dev/null @@ -1,22 +0,0 @@ -class_name: FunctionalTester -modules: - enabled: - - Filesystem - - Yii2 - - tests\codeception\common\_support\FixtureHelper - - tests\codeception\common\_support\Mockery - - Redis - - Asserts - - REST: - depends: Yii2 - url: /api - config: - Yii2: - configFile: '../config/api/functional.php' - cleanup: true - transaction: false - Redis: - host: "%REDIS_HOST%" - port: 6379 - database: 0 - cleanupBefore: 'test' diff --git a/tests/codeception/api/unit.suite.yml b/tests/codeception/api/unit.suite.yml deleted file mode 100644 index beea248..0000000 --- a/tests/codeception/api/unit.suite.yml +++ /dev/null @@ -1,12 +0,0 @@ -class_name: UnitTester -modules: - enabled: - - Yii2: - part: [orm, email, fixtures] - - tests\codeception\common\_support\queue\CodeceptionQueueHelper - - tests\codeception\common\_support\Mockery - config: - Yii2: - configFile: '../config/api/unit.php' - cleanup: true - transaction: false diff --git a/tests/codeception/api/unit/request/RequestParserTest.php b/tests/codeception/api/unit/request/RequestParserTest.php deleted file mode 100644 index 8dbb3e0..0000000 --- a/tests/codeception/api/unit/request/RequestParserTest.php +++ /dev/null @@ -1,20 +0,0 @@ - 'post']; - $this->assertEquals(['from' => 'post'], $parser->parse('from=post', '')); - $this->assertEquals(['from' => 'post'], $parser->parse('', '')); - $_POST = []; - $this->assertEquals(['from' => 'json'], $parser->parse('{"from":"json"}', '')); - $this->assertEquals(['from' => 'body'], $parser->parse('from=body', '')); - $this->assertEquals(['onlykey' => ''], $parser->parse('onlykey', '')); - } - -} diff --git a/tests/codeception/bin/_bootstrap.php b/tests/codeception/bin/_bootstrap.php deleted file mode 100644 index abbeded..0000000 --- a/tests/codeception/bin/_bootstrap.php +++ /dev/null @@ -1,9 +0,0 @@ -run(); -exit($exitCode); diff --git a/tests/codeception/common/.gitignore b/tests/codeception/common/.gitignore deleted file mode 100644 index 3217386..0000000 --- a/tests/codeception/common/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# these files are auto generated by codeception build -_support/_generated diff --git a/tests/codeception/common/_bootstrap.php b/tests/codeception/common/_bootstrap.php deleted file mode 100644 index a75fbc6..0000000 --- a/tests/codeception/common/_bootstrap.php +++ /dev/null @@ -1,13 +0,0 @@ - 'app-common', - 'basePath' => dirname(__DIR__), - ] -); diff --git a/tests/codeception/config/config.php b/tests/codeception/config/config.php deleted file mode 100644 index 72c5fa3..0000000 --- a/tests/codeception/config/config.php +++ /dev/null @@ -1,30 +0,0 @@ - 'en-US', - 'controllerMap' => [ - 'fixture' => [ - 'class' => yii\faker\FixtureController::class, - 'fixtureDataPath' => '@tests/codeception/common/fixtures/data', - 'templatePath' => '@tests/codeception/common/templates/fixtures', - 'namespace' => 'tests\codeception\common\fixtures', - ], - ], - 'params' => [ - 'fromEmail' => 'ely@ely.by', - ], - 'components' => [ - 'urlManager' => [ - 'showScriptName' => true, - ], - 'security' => [ - // Для тестов нам не сильно важна безопасность, а вот время прохождения тестов значительно сокращается - 'passwordHashCost' => 4, - ], - 'queue' => [ - 'class' => tests\codeception\common\_support\queue\Queue::class, - ], - 'sentry' => [ - 'enabled' => false, - ], - ], -]; diff --git a/tests/codeception/config/console/unit.php b/tests/codeception/config/console/unit.php deleted file mode 100644 index b0ad993..0000000 --- a/tests/codeception/config/console/unit.php +++ /dev/null @@ -1,6 +0,0 @@ - [ - 'request' => [ - // it's not recommended to run functional tests with CSRF validation enabled - 'enableCsrfValidation' => false, - 'enableCookieValidation' => false, - // but if you absolutely need it set cookie domain to localhost - ], - ], -]; diff --git a/tests/codeception/config/unit.php b/tests/codeception/config/unit.php deleted file mode 100644 index bee73cf..0000000 --- a/tests/codeception/config/unit.php +++ /dev/null @@ -1,4 +0,0 @@ -