From 16098559b16d5c4356b1c7d0b8680499423ab255 Mon Sep 17 00:00:00 2001 From: Anton Shevchuk Date: Wed, 21 Jul 2021 17:01:09 +0300 Subject: [PATCH 1/5] Updated codestyle --- .travis.yml | 9 ++++----- LICENSE.md | 2 +- README.md | 6 +++--- application/modules/auth/controllers/auth.php | 2 ++ composer.json | 6 +++--- 5 files changed, 13 insertions(+), 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5fe01c7..9e32f79 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,12 +1,11 @@ language: php php: - - 7.1 - - 7.2 - 7.3 - - master + - 7.4 + - 8.0 matrix: allow_failures: - - php: master + - php: 8.0 env: - BLUZ_MODULE=auth before_install: @@ -26,7 +25,7 @@ before_script: - php vendor/bin/bluzman db:seed:run script: # Check code style - - php vendor/bin/phpcs ./application --standard=PSR1,PSR2 --encoding=utf-8 --ignore=./application/_loader.php + - php vendor/bin/phpcs ./application --standard=PSR12 --encoding=utf-8 --ignore=./application/_loader.php # Run built-in web-server - php vendor/bin/bluzman server:start --host 127.0.0.1 -b -e testing # Run codeception tests diff --git a/LICENSE.md b/LICENSE.md index 56619f6..5a97ab7 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2012-2019 by Bluz PHP Team +Copyright (c) by Bluz PHP Team Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index f9f89c8..00d34e3 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![Latest Stable Version](https://img.shields.io/packagist/v/bluzphp/module-auth.svg?label=version&style=flat)](https://packagist.org/packages/bluzphp/module-auth) -[![Build Status](https://img.shields.io/travis/bluzphp/module-auth/master.svg?style=flat)](https://travis-ci.org/bluzphp/module-auth) +[![Build Status](https://img.shields.io/travis/bluzphp/module-auth/master.svg?style=flat)](https://travis-ci.com/bluzphp/module-auth) [![Scrutinizer Code Quality](https://img.shields.io/scrutinizer/g/bluzphp/module-auth.svg?style=flat)](https://scrutinizer-ci.com/g/bluzphp/module-auth/) @@ -16,12 +16,12 @@ To install the module run the command: ```bash -php /vendor/bin/bluzman module:install auth +php ./vendor/bin/bluzman module:install auth ``` ### Remove module To remove the module, run the command: ```bash -php /vendor/bin/bluzman module:remove auth +php ./vendor/bin/bluzman module:remove auth ``` diff --git a/application/modules/auth/controllers/auth.php b/application/modules/auth/controllers/auth.php index b8a7c43..e579b51 100644 --- a/application/modules/auth/controllers/auth.php +++ b/application/modules/auth/controllers/auth.php @@ -1,7 +1,9 @@ Date: Wed, 21 Jul 2021 18:01:56 +0300 Subject: [PATCH 2/5] Updated Auth --- application/modules/auth/controllers/auth.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/application/modules/auth/controllers/auth.php b/application/modules/auth/controllers/auth.php index e579b51..7bc4000 100644 --- a/application/modules/auth/controllers/auth.php +++ b/application/modules/auth/controllers/auth.php @@ -72,8 +72,7 @@ Response::redirectTo('users', 'profile'); } elseif ($authRow) { // Try to login - $user = Users\Table::findRow($authRow->userId); - Auth\Table::tryLogin($user); + Auth\Provider\Token::login($authRow); Messages::addNotice('You are signed'); } else { // User not found From 4f1cca583e5782a21ff15d0f23c7ea58eaae40d7 Mon Sep 17 00:00:00 2001 From: Anton Shevchuk Date: Thu, 22 Jul 2021 13:14:04 +0300 Subject: [PATCH 3/5] Updated Scrutinizer config --- .scrutinizer.yml | 37 ++++++++++++++++++++++++++----------- 1 file changed, 26 insertions(+), 11 deletions(-) diff --git a/.scrutinizer.yml b/.scrutinizer.yml index 8c6ae28..b7335cb 100644 --- a/.scrutinizer.yml +++ b/.scrutinizer.yml @@ -1,29 +1,44 @@ +checks: + php: + code_rating: true + deprecated_code_usage: true + duplication: true + no_short_open_tag: true build: + cache: + directories: + - "vendor" + - "~/.composer" nodes: analysis: tests: override: - php-scrutinizer-run -checks: - php: - psr2_switch_declaration: true - psr2_class_declaration: true - no_short_open_tag: true - deprecated_code_usage: true - code_rating: true + dependencies: + override: + - COMPOSER_ROOT_VERSION=dev-master filter: - excluded_paths: [bin, docs, docker, data, tests, vendor] + excluded_paths: + - "bin/" + - "data/" + - "docs/" + - "docker/" + - "public/" + - "tests/" + dependency_paths: + - "vendor/" tools: + external_code_coverage: false php_analyzer: true php_code_sniffer: config: - standard: PSR2 + standard: PSR12 php_cpd: enabled: true - excluded_dirs: [bin, docs, docker, data, tests, vendor] + excluded_dirs: [bin, data, docs, docker, public, tests, vendor] php_loc: enabled: true - excluded_dirs: [bin, docs, docker, data, tests, vendor] + excluded_dirs: [bin, data, docs, docker, public, tests, vendor] php_mess_detector: true php_pdepend: true sensiolabs_security_checker: true From d971f91684c552a73d7b6564253338c587685127 Mon Sep 17 00:00:00 2001 From: Anton Shevchuk Date: Thu, 26 Aug 2021 13:59:07 +0300 Subject: [PATCH 4/5] Universal format for configs --- composer.json | 1 - 1 file changed, 1 deletion(-) diff --git a/composer.json b/composer.json index 3c44e2b..0f58435 100644 --- a/composer.json +++ b/composer.json @@ -4,7 +4,6 @@ "license": "MIT", "description": "bluz auth module", "require": { - "bluzphp/framework": "~7.13", "bluzphp/composer-plugin": "~2.4", "hybridauth/hybridauth": "~3.7" } From 9cf6f5a8a130924faa30aeeb67468ff81f716947 Mon Sep 17 00:00:00 2001 From: Anton Shevchuk Date: Thu, 30 Dec 2021 12:14:44 +0200 Subject: [PATCH 5/5] Updated CI config --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 9e32f79..bdf761c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,11 +1,12 @@ language: php php: - - 7.3 - 7.4 - 8.0 + - 8.1 matrix: allow_failures: - php: 8.0 + - php: 8.1 env: - BLUZ_MODULE=auth before_install: