From d5bf182b625aa4a0ab842a621799b2563c87e9ab Mon Sep 17 00:00:00 2001 From: Jan Tvrdik Date: Sun, 23 Aug 2015 21:14:00 +0200 Subject: [PATCH 1/9] fixed using undefined classes in typehints --- src/Security/IUserStorage.php | 2 +- src/Security/User.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Security/IUserStorage.php b/src/Security/IUserStorage.php index 7ecf6c09..2ee6e49f 100644 --- a/src/Security/IUserStorage.php +++ b/src/Security/IUserStorage.php @@ -48,7 +48,7 @@ function getIdentity(); /** * Enables log out from the persistent storage after inactivity. - * @param string|int|DateTime number of seconds or timestamp + * @param string|int|\DateTime number of seconds or timestamp * @param int Log out when the browser is closed | Clear the identity from persistent storage? * @return void */ diff --git a/src/Security/User.php b/src/Security/User.php index 77099c7d..160929c9 100644 --- a/src/Security/User.php +++ b/src/Security/User.php @@ -164,7 +164,7 @@ public function getAuthenticator($need = TRUE) /** * Enables log out after inactivity. - * @param string|int|DateTime number of seconds or timestamp + * @param string|int|\DateTime number of seconds or timestamp * @param bool log out when the browser is closed? * @param bool clear the identity from persistent storage? * @return self From 865d8c7971422023136b551e560de0a689e7b549 Mon Sep 17 00:00:00 2001 From: David Grudl Date: Wed, 23 Sep 2015 18:28:49 +0200 Subject: [PATCH 2/9] removed rarely used @property phpDoc --- src/Security/Identity.php | 1 - src/Security/Permission.php | 5 ----- src/Security/User.php | 1 - 3 files changed, 7 deletions(-) diff --git a/src/Security/Identity.php b/src/Security/Identity.php index 0a358af5..85f744ee 100644 --- a/src/Security/Identity.php +++ b/src/Security/Identity.php @@ -15,7 +15,6 @@ * * @property mixed $id * @property array $roles - * @property-read array $data */ class Identity extends Nette\Object implements IIdentity { diff --git a/src/Security/Permission.php b/src/Security/Permission.php index d1db73a9..0e6c6380 100644 --- a/src/Security/Permission.php +++ b/src/Security/Permission.php @@ -16,11 +16,6 @@ * This solution is mostly based on Zend_Acl (c) Zend Technologies USA Inc. (http://www.zend.com), new BSD license * * @copyright Copyright (c) 2005, 2007 Zend Technologies USA Inc. - * - * @property-read array $roles - * @property-read array $resources - * @property-read mixed $queriedRole - * @property-read mixed $queriedResource */ class Permission extends Nette\Object implements IAuthorizator { diff --git a/src/Security/User.php b/src/Security/User.php index 160929c9..1346d9db 100644 --- a/src/Security/User.php +++ b/src/Security/User.php @@ -18,7 +18,6 @@ * @property-read mixed $id * @property-read array $roles * @property-read int $logoutReason - * @property-read IUserStorage $storage * @property IAuthenticator $authenticator * @property IAuthorizator $authorizator */ From 5ad0a20ea7e73d99e7d4cf19b090dd20cc8a1db5 Mon Sep 17 00:00:00 2001 From: David Grudl Date: Mon, 5 Oct 2015 14:35:47 +0200 Subject: [PATCH 3/9] used https --- composer.json | 6 +++--- contributing.md | 4 ++-- license.md | 2 +- src/Bridges/SecurityDI/SecurityExtension.php | 4 ++-- src/Bridges/SecurityTracy/UserPanel.php | 4 ++-- src/Security/AuthenticationException.php | 4 ++-- src/Security/IAuthenticator.php | 4 ++-- src/Security/IAuthorizator.php | 4 ++-- src/Security/IIdentity.php | 4 ++-- src/Security/IResource.php | 4 ++-- src/Security/IRole.php | 4 ++-- src/Security/IUserStorage.php | 4 ++-- src/Security/Identity.php | 4 ++-- src/Security/Passwords.php | 4 ++-- src/Security/Permission.php | 4 ++-- src/Security/SimpleAuthenticator.php | 4 ++-- src/Security/User.php | 4 ++-- 17 files changed, 34 insertions(+), 34 deletions(-) diff --git a/composer.json b/composer.json index 93ac73ca..c95cdb1d 100644 --- a/composer.json +++ b/composer.json @@ -1,16 +1,16 @@ { "name": "nette/security", "description": "Nette Security: Access Control Component", - "homepage": "http://nette.org", + "homepage": "https://nette.org", "license": ["BSD-3-Clause", "GPL-2.0", "GPL-3.0"], "authors": [ { "name": "David Grudl", - "homepage": "http://davidgrudl.com" + "homepage": "https://davidgrudl.com" }, { "name": "Nette Community", - "homepage": "http://nette.org/contributors" + "homepage": "https://nette.org/contributors" } ], "require": { diff --git a/contributing.md b/contributing.md index a1cbbd53..860882bf 100644 --- a/contributing.md +++ b/contributing.md @@ -5,7 +5,7 @@ The issue tracker is the preferred channel for bug reports, features requests and submitting pull requests, but please respect the following restrictions: * Please **do not** use the issue tracker for personal support requests (use - [Nette forum](http://forum.nette.org) or [Stack Overflow](http://stackoverflow.com)). + [Nette forum](https://forum.nette.org) or [Stack Overflow](http://stackoverflow.com)). * Please **do not** derail or troll issues. Keep the discussion on topic and respect the opinions of others. @@ -21,7 +21,7 @@ fits with the scope and aims of the project. It's up to *you* to make a strong case to convince the project's developers of the merits of this feature. Nette welcomes **pull requests**. If you'd like to contribute, please take a moment -to [read the guidelines](http://nette.org/en/contributing) in order to make +to [read the guidelines](https://nette.org/en/contributing) in order to make the contribution process easy and effective for everyone involved. Thanks! diff --git a/license.md b/license.md index af571d59..cf741bd0 100644 --- a/license.md +++ b/license.md @@ -21,7 +21,7 @@ If your stuff is good, it will not take long to establish a reputation for yours New BSD License --------------- -Copyright (c) 2004, 2014 David Grudl (http://davidgrudl.com) +Copyright (c) 2004, 2014 David Grudl (https://davidgrudl.com) All rights reserved. Redistribution and use in source and binary forms, with or without modification, diff --git a/src/Bridges/SecurityDI/SecurityExtension.php b/src/Bridges/SecurityDI/SecurityExtension.php index afc27cbc..dde3ffed 100644 --- a/src/Bridges/SecurityDI/SecurityExtension.php +++ b/src/Bridges/SecurityDI/SecurityExtension.php @@ -1,8 +1,8 @@ Date: Mon, 5 Oct 2015 14:36:12 +0200 Subject: [PATCH 4/9] travis: removed PHP 7 from allowed failures --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index f48ac6af..3dd7ea8e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,7 +9,6 @@ php: matrix: allow_failures: - - php: 7.0 - php: hhvm include: From ffc476ff770c8c41db006b763888e5709e63a02c Mon Sep 17 00:00:00 2001 From: David Grudl Date: Sat, 6 Feb 2016 23:08:59 +0100 Subject: [PATCH 5/9] typo --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 3dd7ea8e..ff138b1e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,7 +27,7 @@ before_script: # Install Nette Tester & Code Checker - travis_retry composer update --no-interaction --prefer-dist $dependencies - travis_retry composer create-project nette/code-checker code-checker ~2.5 --no-interaction - + sudo: false cache: From e9f3954df255c5f0be1a53a03962972aa8ba2021 Mon Sep 17 00:00:00 2001 From: David Grudl Date: Tue, 23 Feb 2016 14:12:39 +0100 Subject: [PATCH 6/9] UserPanel: ob_start() is protected against flush when error occurs --- src/Bridges/SecurityTracy/UserPanel.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Bridges/SecurityTracy/UserPanel.php b/src/Bridges/SecurityTracy/UserPanel.php index ea0e76c1..46ca603a 100644 --- a/src/Bridges/SecurityTracy/UserPanel.php +++ b/src/Bridges/SecurityTracy/UserPanel.php @@ -36,7 +36,7 @@ public function getTab() return; } - ob_start(); + ob_start(function () {}); $user = $this->user; require __DIR__ . '/templates/UserPanel.tab.phtml'; return ob_get_clean(); @@ -49,7 +49,7 @@ public function getTab() */ public function getPanel() { - ob_start(); + ob_start(function () {}); $user = $this->user; require __DIR__ . '/templates/UserPanel.panel.phtml'; return ob_get_clean(); From 1c07769838546f91ec54153848f3807bb4420f2f Mon Sep 17 00:00:00 2001 From: David Grudl Date: Thu, 21 Apr 2016 11:36:22 +0200 Subject: [PATCH 7/9] travis: fixed PHP 5.3 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index ff138b1e..36aea1df 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ language: php php: - - 5.3.3 + - 5.3 - 5.4 - 5.5 - 5.6 From bcba3db577e7eac81435267ea9ac16343f875490 Mon Sep 17 00:00:00 2001 From: David Grudl Date: Tue, 17 May 2016 12:16:09 +0200 Subject: [PATCH 8/9] tests: compatible with master nette/di --- tests/Security.DI/SecurityExtension.authenticator.phpt | 2 +- tests/Security.DI/SecurityExtension.user.phpt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Security.DI/SecurityExtension.authenticator.phpt b/tests/Security.DI/SecurityExtension.authenticator.phpt index ef6e98d4..657b75df 100644 --- a/tests/Security.DI/SecurityExtension.authenticator.phpt +++ b/tests/Security.DI/SecurityExtension.authenticator.phpt @@ -29,7 +29,7 @@ security: moderator: {password: moderator123, roles: moderator} ', 'neon')); -eval($compiler->compile($config, 'Container1')); +eval(@$compiler->compile($config, 'Container1')); // @ compatibility with DI 2.4 $container = new Container1; $authenticator = $container->getService('security.authenticator'); diff --git a/tests/Security.DI/SecurityExtension.user.phpt b/tests/Security.DI/SecurityExtension.user.phpt index b93d92e5..aa897f16 100644 --- a/tests/Security.DI/SecurityExtension.user.phpt +++ b/tests/Security.DI/SecurityExtension.user.phpt @@ -19,7 +19,7 @@ $compiler->addExtension('foo', new HttpExtension); $compiler->addExtension('bar', new SessionExtension); $compiler->addExtension('security', new SecurityExtension); -eval($compiler->compile(array(), 'Container1')); +eval(@$compiler->compile(array(), 'Container1')); // @ compatibility with DI 2.4 $container = new Container1; Assert::type('Nette\Http\UserStorage', $container->getService('security.userStorage')); From 779254a5484a106344a81c8cb9ce2b8570e38f34 Mon Sep 17 00:00:00 2001 From: David Grudl Date: Tue, 17 May 2016 17:37:18 +0200 Subject: [PATCH 9/9] travis: removed HHVM --- .travis.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 36aea1df..934553b7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,12 +5,8 @@ php: - 5.5 - 5.6 - 7.0 - - hhvm matrix: - allow_failures: - - php: hhvm - include: - php: 5.6 env: dependencies="--prefer-lowest --prefer-stable"