-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve compatibility with PHP 7.4 (#161)
Improve compatibility with PHP 7.4
- Loading branch information
Showing
51 changed files
with
228 additions
and
141 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ php: | |
- 7.1 | ||
- 7.2 | ||
- 7.3 | ||
- 7.4 | ||
|
||
dist: trusty | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
<?php | ||
|
||
/** | ||
* Acl Extras. | ||
* | ||
|
@@ -10,6 +11,7 @@ | |
* @author Mark Story <[email protected]> | ||
* @license http://www.opensource.org/licenses/mit-license.php The MIT License | ||
*/ | ||
|
||
namespace Acl; | ||
|
||
use Acl\Controller\Component\AclComponent; | ||
|
@@ -252,7 +254,7 @@ protected function _processPlugins($root, array $plugins = []) | |
$pluginAlias = $this->_pluginAlias($plugin); | ||
$path = [ | ||
$this->rootNode, | ||
$pluginAlias | ||
$pluginAlias, | ||
]; | ||
$path = implode('/', Hash::filter($path)); | ||
$pathNode = $this->_checkNode($path, $pluginAlias, $root->id); | ||
|
@@ -268,7 +270,7 @@ protected function _processPlugins($root, array $plugins = []) | |
foreach (array_keys($this->pluginPrefixes[$plugin]) as $prefix) { | ||
$path = [ | ||
$this->rootNode, | ||
$pluginAlias | ||
$pluginAlias, | ||
]; | ||
$path = implode('/', Hash::filter($path)); | ||
$pluginNode = $this->_checkNode($path, $pluginAlias, $root->id); | ||
|
@@ -326,7 +328,7 @@ protected function _updateControllers($root, $controllers, $plugin = null, $pref | |
$this->rootNode, | ||
$pluginPath, | ||
$prefix, | ||
$controllerName | ||
$controllerName, | ||
]; | ||
$path = implode('/', Hash::filter($path)); | ||
$controllerNode = $this->_checkNode($path, $controllerName, $root->id); | ||
|
@@ -445,7 +447,7 @@ protected function _getCallbacks($className, $pluginPath = null, $prefixPath = n | |
protected function _checkMethods($className, $controllerName, $node, $pluginPath = null, $prefixPath = null) | ||
{ | ||
$excludes = $this->_getCallbacks($className, $pluginPath, $prefixPath); | ||
$baseMethods = get_class_methods(new Controller); | ||
$baseMethods = get_class_methods(new Controller()); | ||
$namespace = $this->_getNamespace($className, $pluginPath, $prefixPath); | ||
$methods = get_class_methods($namespace); | ||
if ($methods == null) { | ||
|
@@ -464,7 +466,7 @@ protected function _checkMethods($className, $controllerName, $node, $pluginPath | |
$pluginPath, | ||
$prefixPath, | ||
$controllerName, | ||
$action | ||
$action, | ||
]; | ||
$path = implode('/', Hash::filter($path)); | ||
$this->_checkNode($path, $action, $node->id); | ||
|
@@ -512,7 +514,7 @@ protected function _getNamespace($className, $pluginPath = null, $prefixPath = n | |
$rootNamespace, | ||
'Controller', | ||
$prefixPath, | ||
$namespace | ||
$namespace, | ||
]; | ||
|
||
return implode('\\', Hash::filter($namespace)); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.