From 76d70a9d304f855ee29f1b3d51611b43dc11f344 Mon Sep 17 00:00:00 2001 From: Petr Parolek Date: Thu, 20 Feb 2020 22:05:19 +0100 Subject: [PATCH 1/4] bugfix in installing process closes #699 --- app/Services/SkautIsService.php | 5 +- composer.json | 4 +- composer.lock | 120 ++++++++++++++++---------------- 3 files changed, 65 insertions(+), 64 deletions(-) diff --git a/app/Services/SkautIsService.php b/app/Services/SkautIsService.php index 867500b0b..b93b05552 100644 --- a/app/Services/SkautIsService.php +++ b/app/Services/SkautIsService.php @@ -17,6 +17,7 @@ * * @author Michal Májský * @author Jan Staněk + * @author Petr Parolek */ class SkautIsService { @@ -207,7 +208,7 @@ public function getValidMembership(int $personId) : ?stdClass 'IsValid' => true, ]); - if (empty($membership)) { + if (empty((array) $membership)) { $membership = $this->skautIs->org->MembershipAllPerson([ 'ID_Login' => $this->skautIs->getUser()->getLoginId(), 'ID_Person' => $personId, @@ -215,7 +216,7 @@ public function getValidMembership(int $personId) : ?stdClass 'IsValid' => true, ]); - if (empty($membership)) { + if (empty((array) $membership)) { return null; } } diff --git a/composer.json b/composer.json index fb20c939d..abcd0d553 100644 --- a/composer.json +++ b/composer.json @@ -57,8 +57,8 @@ "janmarek/webloader": "dev-master", "jms/serializer": "^3.4", - "skautis/skautis": "3.0.0-alpha.1", - "skautis/nette": "3.x-dev", + "skautis/skautis": "^2.1", + "skautis/nette": "^2.2", "setasign/fpdf": "^1.8", "setasign/fpdi": "^2.2", diff --git a/composer.lock b/composer.lock index b2840fa52..954396a3c 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": "3dc7d3bef35a5b46d73a864a1fb8f9a3", + "content-hash": "cfb838771c4e7138e09e6ceaf9e6b2e2", "packages": [ { "name": "azuyalabs/yasumi", @@ -1244,16 +1244,16 @@ }, { "name": "doctrine/orm", - "version": "v2.7.0", + "version": "v2.7.1", "source": { "type": "git", "url": "https://github.com/doctrine/orm.git", - "reference": "4d763ca4c925f647b248b9fa01b5f47aa3685d62" + "reference": "445796af0e873d9bd04f2502d322a7d5009b6846" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/orm/zipball/4d763ca4c925f647b248b9fa01b5f47aa3685d62", - "reference": "4d763ca4c925f647b248b9fa01b5f47aa3685d62", + "url": "https://api.github.com/repos/doctrine/orm/zipball/445796af0e873d9bd04f2502d322a7d5009b6846", + "reference": "445796af0e873d9bd04f2502d322a7d5009b6846", "shasum": "" }, "require": { @@ -1266,6 +1266,7 @@ "doctrine/instantiator": "^1.3", "doctrine/persistence": "^1.2", "ext-pdo": "*", + "ocramius/package-versions": "^1.2", "php": "^7.1", "symfony/console": "^3.0|^4.0|^5.0" }, @@ -1323,7 +1324,7 @@ "database", "orm" ], - "time": "2019-11-19T08:38:05+00:00" + "time": "2020-02-15T14:35:56+00:00" }, { "name": "doctrine/persistence", @@ -5621,26 +5622,29 @@ }, { "name": "setasign/fpdi", - "version": "v2.2.0", + "version": "v2.3.0", "source": { "type": "git", "url": "https://github.com/Setasign/FPDI.git", - "reference": "3c266002f8044f61b17329f7cd702d44d73f0f7f" + "reference": "ff7e43e07abb97feb4a1cceaf72d75ce0e175ca0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Setasign/FPDI/zipball/3c266002f8044f61b17329f7cd702d44d73f0f7f", - "reference": "3c266002f8044f61b17329f7cd702d44d73f0f7f", + "url": "https://api.github.com/repos/Setasign/FPDI/zipball/ff7e43e07abb97feb4a1cceaf72d75ce0e175ca0", + "reference": "ff7e43e07abb97feb4a1cceaf72d75ce0e175ca0", "shasum": "" }, "require": { "ext-zlib": "*", "php": "^5.6 || ^7.0" }, + "conflict": { + "setasign/tfpdf": "<1.31" + }, "require-dev": { "phpunit/phpunit": "~5.7", "setasign/fpdf": "~1.8", - "setasign/tfpdf": "1.25", + "setasign/tfpdf": "1.31", "tecnickcom/tcpdf": "~6.2" }, "suggest": { @@ -5678,33 +5682,34 @@ "fpdi", "pdf" ], - "time": "2019-01-30T14:11:19+00:00" + "time": "2020-02-19T11:30:55+00:00" }, { "name": "skautis/nette", - "version": "3.x-dev", + "version": "v2.2.0", "source": { "type": "git", "url": "https://github.com/skaut/SkautisNette.git", - "reference": "3e681f1edcf0d6d43b26385445ae87cbac95ffd7" + "reference": "a962a18fac109c5882e92b7840074de17a89fd65" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/skaut/SkautisNette/zipball/3e681f1edcf0d6d43b26385445ae87cbac95ffd7", - "reference": "3e681f1edcf0d6d43b26385445ae87cbac95ffd7", + "url": "https://api.github.com/repos/skaut/SkautisNette/zipball/a962a18fac109c5882e92b7840074de17a89fd65", + "reference": "a962a18fac109c5882e92b7840074de17a89fd65", "shasum": "" }, "require": { - "nette/di": "^3.0", - "nette/http": "^3.0", - "nette/utils": "^3.0", - "php": ">=7.1", - "skautis/skautis": "3.0.0-alpha.1" + "nette/di": "^2.4.6 || ^3.0.1", + "nette/http": "^2.4.7 || ^3.0", + "nette/utils": "^2.5.4 || ^3.0", + "php": ">=5.6", + "skautis/skautis": "^2.0" }, "require-dev": { - "nette/bootstrap": "^3.0", - "nette/caching": "^3.0", - "nette/tester": "^2.0", + "nette/bootstrap": "^2.4 || ^3.0", + "nette/caching": "^2.5 || ^3.0", + "nette/finder": "^2.4", + "nette/tester": "^2.3.1", "tracy/tracy": "^2.5" }, "suggest": { @@ -5734,34 +5739,30 @@ "nette", "skautis" ], - "time": "2020-02-04T12:56:34+00:00" + "time": "2020-02-14T11:45:16+00:00" }, { "name": "skautis/skautis", - "version": "v3.0.0-alpha.1", + "version": "v2.1.0", "source": { "type": "git", "url": "https://github.com/skaut/Skautis.git", - "reference": "447ff0992692be10f38e7483873405ae1b2c5b56" + "reference": "090fddb9d7d6da2467f52be9f6ff4db16724c1c5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/skaut/Skautis/zipball/447ff0992692be10f38e7483873405ae1b2c5b56", - "reference": "447ff0992692be10f38e7483873405ae1b2c5b56", + "url": "https://api.github.com/repos/skaut/Skautis/zipball/090fddb9d7d6da2467f52be9f6ff4db16724c1c5", + "reference": "090fddb9d7d6da2467f52be9f6ff4db16724c1c5", "shasum": "" }, "require": { "ext-soap": "*", - "php": ">=7.2", - "psr/simple-cache": "1.0.*" + "php": ">=5.6" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^2.15", - "jakub-onderka/php-parallel-lint": "^1.0", - "mockery/mockery": "^1.2", - "phpstan/phpstan": "^0.12", - "phpunit/phpunit": "^8.5", - "symfony/cache": "^4.3" + "fabpot/php-cs-fixer": "@stable", + "mockery/mockery": "0.9.*", + "phpunit/phpunit": "4.5.*" }, "suggest": { "skautis/nette": "Integrace Skautis do Nette", @@ -5796,7 +5797,7 @@ "soap", "wsdl" ], - "time": "2019-12-28T20:17:37+00:00" + "time": "2017-03-07T09:02:13+00:00" }, { "name": "snapappointments/bootstrap-select", @@ -7539,16 +7540,16 @@ }, { "name": "facebook/webdriver", - "version": "1.8.0", + "version": "1.8.1", "source": { "type": "git", "url": "https://github.com/php-webdriver/php-webdriver.git", - "reference": "3e33ee3b8a688d719c55acdd7c6788e3006e1d3e" + "reference": "262ea0d209c292e0330be1041424887bbbffef04" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-webdriver/php-webdriver/zipball/3e33ee3b8a688d719c55acdd7c6788e3006e1d3e", - "reference": "3e33ee3b8a688d719c55acdd7c6788e3006e1d3e", + "url": "https://api.github.com/repos/php-webdriver/php-webdriver/zipball/262ea0d209c292e0330be1041424887bbbffef04", + "reference": "262ea0d209c292e0330be1041424887bbbffef04", "shasum": "" }, "require": { @@ -7580,12 +7581,12 @@ } }, "autoload": { - "files": [ - "lib/Exception/TimeoutException.php" - ], "psr-4": { "Facebook\\WebDriver\\": "lib/" - } + }, + "files": [ + "lib/Exception/TimeoutException.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -7601,7 +7602,7 @@ "webdriver" ], "abandoned": "php-webdriver/webdriver", - "time": "2020-02-10T15:04:25+00:00" + "time": "2020-02-17T08:14:38+00:00" }, { "name": "hamcrest/hamcrest-php", @@ -8339,16 +8340,16 @@ }, { "name": "phpstan/phpstan", - "version": "0.12.10", + "version": "0.12.11", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "39004edc7fc308752f625b89b70ad1710708f45e" + "reference": "ca5f2b7cf81c6d8fba74f9576970399c5817e03b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/39004edc7fc308752f625b89b70ad1710708f45e", - "reference": "39004edc7fc308752f625b89b70ad1710708f45e", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/ca5f2b7cf81c6d8fba74f9576970399c5817e03b", + "reference": "ca5f2b7cf81c6d8fba74f9576970399c5817e03b", "shasum": "" }, "require": { @@ -8374,7 +8375,7 @@ "MIT" ], "description": "PHPStan - PHP Static Analysis Tool", - "time": "2020-02-12T22:03:42+00:00" + "time": "2020-02-16T14:00:29+00:00" }, { "name": "phpstan/phpstan-doctrine", @@ -8850,12 +8851,12 @@ "source": { "type": "git", "url": "https://github.com/Roave/SecurityAdvisories.git", - "reference": "0365bf26eddd4a8be9980d7dabf05ceb2aba2f02" + "reference": "1df6b9d09d2b074fd3f0f10a7696d9f797d4772c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/0365bf26eddd4a8be9980d7dabf05ceb2aba2f02", - "reference": "0365bf26eddd4a8be9980d7dabf05ceb2aba2f02", + "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/1df6b9d09d2b074fd3f0f10a7696d9f797d4772c", + "reference": "1df6b9d09d2b074fd3f0f10a7696d9f797d4772c", "shasum": "" }, "conflict": { @@ -8874,6 +8875,7 @@ "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.5.18|>=3.6,<3.6.15|>=3.7,<3.7.7", "cart2quote/module-quotation": ">=4.1.6,<=4.4.5|>=5,<5.4.4", "cartalyst/sentry": "<=2.1.6", + "centreon/centreon": "<18.10.8|>=19,<19.4.5", "cesnet/simplesamlphp-module-proxystatistics": "<3.1", "codeigniter/framework": "<=3.0.6", "composer/composer": "<=1-alpha.11", @@ -8940,7 +8942,7 @@ "monolog/monolog": ">=1.8,<1.12", "namshi/jose": "<2.2", "onelogin/php-saml": "<2.10.4", - "oneup/uploader-bundle": ">=1,<1.9.3|>=2,<2.1.5", + "oneup/uploader-bundle": "<1.9.3|>=2,<2.1.5", "openid/php-openid": "<2.3", "oro/crm": ">=1.7,<1.7.4", "oro/platform": ">=1.7,<1.7.4", @@ -8976,7 +8978,7 @@ "silverstripe/cms": "<4.3.6|>=4.4,<4.4.4", "silverstripe/comments": ">=1.3,<1.9.99|>=2,<2.9.99|>=3,<3.1.1", "silverstripe/forum": "<=0.6.1|>=0.7,<=0.7.3", - "silverstripe/framework": "<4.4.4", + "silverstripe/framework": "<4.4.5|>=4.5,<4.5.2", "silverstripe/graphql": ">=2,<2.0.5|>=3,<3.1.2", "silverstripe/registry": ">=2.1,<2.1.2|>=2.2,<2.2.1", "silverstripe/restfulserver": ">=1,<1.0.9|>=2,<2.0.4", @@ -9100,7 +9102,7 @@ } ], "description": "Prevents installation of composer packages with known security vulnerabilities: no API, simply require it", - "time": "2020-02-10T16:13:40+00:00" + "time": "2020-02-19T06:23:50+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -10361,8 +10363,6 @@ "stability-flags": { "vojtys/nette-forms-gpspicker": 20, "janmarek/webloader": 20, - "skautis/skautis": 15, - "skautis/nette": 20, "roave/security-advisories": 20 }, "prefer-stable": false, From 5d5ddc43b403cde7b4e12cb90f71e50835794eef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Stan=C4=9Bk?= Date: Sat, 22 Feb 2020 11:01:46 +0100 Subject: [PATCH 2/4] added todo for further update of skautis/nette --- app/Services/SkautIsService.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Services/SkautIsService.php b/app/Services/SkautIsService.php index b93b05552..dad6cda2f 100644 --- a/app/Services/SkautIsService.php +++ b/app/Services/SkautIsService.php @@ -208,7 +208,7 @@ public function getValidMembership(int $personId) : ?stdClass 'IsValid' => true, ]); - if (empty((array) $membership)) { + if (empty((array) $membership)) { // todo: odstranit pretypovani po update skautis/nette $membership = $this->skautIs->org->MembershipAllPerson([ 'ID_Login' => $this->skautIs->getUser()->getLoginId(), 'ID_Person' => $personId, @@ -216,7 +216,7 @@ public function getValidMembership(int $personId) : ?stdClass 'IsValid' => true, ]); - if (empty((array) $membership)) { + if (empty((array) $membership)) { // todo: odstranit pretypovani po update skautis/nette return null; } } From 682a9ee1a5503eb9cf57c0bf3d54452175da046a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Stan=C4=9Bk?= Date: Sat, 22 Feb 2020 11:06:17 +0100 Subject: [PATCH 3/4] coding standard fix --- app/Services/SkautIsService.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/Services/SkautIsService.php b/app/Services/SkautIsService.php index dad6cda2f..f6cae6e39 100644 --- a/app/Services/SkautIsService.php +++ b/app/Services/SkautIsService.php @@ -217,6 +217,7 @@ public function getValidMembership(int $personId) : ?stdClass ]); if (empty((array) $membership)) { // todo: odstranit pretypovani po update skautis/nette + return null; } } From 17313ac9699fd1a65a6668409d8133138e1b8b35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Stan=C4=9Bk?= Date: Sat, 22 Feb 2020 11:09:49 +0100 Subject: [PATCH 4/4] coding standard fix --- app/Services/SkautIsService.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/Services/SkautIsService.php b/app/Services/SkautIsService.php index f6cae6e39..139d0cb19 100644 --- a/app/Services/SkautIsService.php +++ b/app/Services/SkautIsService.php @@ -208,7 +208,7 @@ public function getValidMembership(int $personId) : ?stdClass 'IsValid' => true, ]); - if (empty((array) $membership)) { // todo: odstranit pretypovani po update skautis/nette + if (empty((array) $membership)) { // todo: odstranit obe pretypovani (array) po update skautis/nette $membership = $this->skautIs->org->MembershipAllPerson([ 'ID_Login' => $this->skautIs->getUser()->getLoginId(), 'ID_Person' => $personId, @@ -216,8 +216,7 @@ public function getValidMembership(int $personId) : ?stdClass 'IsValid' => true, ]); - if (empty((array) $membership)) { // todo: odstranit pretypovani po update skautis/nette - + if (empty((array) $membership)) { return null; } }