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 diff --git a/.travis.yml b/.travis.yml index 5fe01c7..bdf761c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,12 +1,12 @@ language: php php: - - 7.1 - - 7.2 - - 7.3 - - master + - 7.4 + - 8.0 + - 8.1 matrix: allow_failures: - - php: master + - php: 8.0 + - php: 8.1 env: - BLUZ_MODULE=auth before_install: @@ -26,7 +26,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..7bc4000 100644 --- a/application/modules/auth/controllers/auth.php +++ b/application/modules/auth/controllers/auth.php @@ -1,7 +1,9 @@ userId); - Auth\Table::tryLogin($user); + Auth\Provider\Token::login($authRow); Messages::addNotice('You are signed'); } else { // User not found diff --git a/composer.json b/composer.json index 03187fe..0f58435 100644 --- a/composer.json +++ b/composer.json @@ -4,8 +4,7 @@ "license": "MIT", "description": "bluz auth module", "require": { - "bluzphp/framework": "~7.11", - "bluzphp/composer-plugin": "~2.3", - "hybridauth/hybridauth": "~3.0" + "bluzphp/composer-plugin": "~2.4", + "hybridauth/hybridauth": "~3.7" } }