From owner-svn-ports-all@freebsd.org Wed Oct 24 13:06:12 2018 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 16BC81079F4C; Wed, 24 Oct 2018 13:06:12 +0000 (UTC) (envelope-from gahr@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9B1F78717E; Wed, 24 Oct 2018 13:06:11 +0000 (UTC) (envelope-from gahr@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0A28E21769; Wed, 24 Oct 2018 09:29:16 +0000 (UTC) (envelope-from gahr@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w9O9TF0Y046814; Wed, 24 Oct 2018 09:29:15 GMT (envelope-from gahr@FreeBSD.org) Received: (from gahr@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w9O9TFep046813; Wed, 24 Oct 2018 09:29:15 GMT (envelope-from gahr@FreeBSD.org) Message-Id: <201810240929.w9O9TFep046813@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gahr set sender to gahr@FreeBSD.org using -f From: Pietro Cerutti Date: Wed, 24 Oct 2018 09:29:15 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r482896 - in head/www/baikal: . files X-SVN-Group: ports-head X-SVN-Commit-Author: gahr X-SVN-Commit-Paths: in head/www/baikal: . files X-SVN-Commit-Revision: 482896 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Oct 2018 13:06:12 -0000 Author: gahr Date: Wed Oct 24 09:29:15 2018 New Revision: 482896 URL: https://svnweb.freebsd.org/changeset/ports/482896 Log: www/baikal: Upgrade each() to foreach(), the former is deprecated in php 7.2 Obtained from: https://github.com/sabre-io/Baikal/pull/717 Added: head/www/baikal/files/patch-issue-717 (contents, props changed) Modified: head/www/baikal/Makefile Modified: head/www/baikal/Makefile ============================================================================== --- head/www/baikal/Makefile Wed Oct 24 08:56:40 2018 (r482895) +++ head/www/baikal/Makefile Wed Oct 24 09:29:15 2018 (r482896) @@ -3,7 +3,7 @@ PORTNAME= baikal PORTVERSION= 0.4.6 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= www MASTER_SITES= https://github.com/fruux/Baikal/releases/download/${PORTVERSION}/ Added: head/www/baikal/files/patch-issue-717 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/baikal/files/patch-issue-717 Wed Oct 24 09:29:15 2018 (r482896) @@ -0,0 +1,93 @@ +diff --git Core/Frameworks/Flake/Controller/Cli.php Core/Frameworks/Flake/Controller/Cli.php +index 0fcd10c3..6430b1c3 100644 +--- Core/Frameworks/Flake/Controller/Cli.php ++++ Core/Frameworks/Flake/Controller/Cli.php +@@ -39,9 +39,8 @@ function render() { + } + + function execute() { +- reset($this->aSequence); +- while (list($sKey, ) = each($this->aSequence)) { +- $this->aSequence[$sKey]["block"]->execute(); ++ foreach ($this->aSequence as $aStep) { ++ $aStep["block"]->execute(); + } + } + +diff --git Core/Frameworks/Flake/Core/Render/Container.php Core/Frameworks/Flake/Core/Render/Container.php +index 5f0662cf..ae668151 100644 +--- Core/Frameworks/Flake/Core/Render/Container.php ++++ Core/Frameworks/Flake/Core/Render/Container.php +@@ -58,23 +58,20 @@ function render() { + } + + function execute() { +- reset($this->aSequence); +- while (list($sKey, ) = each($this->aSequence)) { +- $this->aSequence[$sKey]["block"]->execute(); ++ foreach ($this->aSequence as $aStep) { ++ $aStep["block"]->execute(); + } + } + + protected function renderBlocks() { + $aHtml = []; +- reset($this->aSequence); +- while (list($sKey, ) = each($this->aSequence)) { ++ foreach ($this->aSequence as $sKey => $aStep) { + $this->aSequence[$sKey]["rendu"] = $this->aSequence[$sKey]["block"]->render(); + } + + $aHtml = []; +- reset($this->aBlocks); +- while (list($sZone, ) = each($this->aBlocks)) { +- $aHtml[$sZone] = implode("", $this->aBlocks[$sZone]); ++ foreach ($this->aBlocks as $sZone => $aBlock) { ++ $aHtml[$sZone] = implode("", $aBlock); + } + + reset($aHtml); +diff --git Core/Frameworks/Flake/Framework.php Core/Frameworks/Flake/Framework.php +index adc5c781..50b9c12e 100644 +--- Core/Frameworks/Flake/Framework.php ++++ Core/Frameworks/Flake/Framework.php +@@ -122,7 +122,7 @@ static function bootstrap() { + if (isset($_COOKIE) && is_array($_COOKIE)) { $process[] = &$_COOKIE;} + if (isset($_REQUEST) && is_array($_REQUEST)) { $process[] = &$_REQUEST;} + +- while (list($key, $val) = each($process)) { ++ foreach ($process as $key => $val) { + foreach ($val as $k => $v) { + unset($process[$key][$k]); + if (is_array($v)) { +diff --git Core/Frameworks/Flake/Util/Router.php Core/Frameworks/Flake/Util/Router.php +index 15462cb3..02b109d7 100644 +--- Core/Frameworks/Flake/Util/Router.php ++++ Core/Frameworks/Flake/Util/Router.php +@@ -59,10 +59,9 @@ static function getRouteForController($sController) { + + $aRoutes = $GLOBALS["ROUTER"]::getRoutes(); + +- reset($aRoutes); +- while (list($sRoute, ) = each($aRoutes)) { +- if (str_replace("\\Route", "\\Controller", $aRoutes[$sRoute]) === $sController) { +- return $sRoute; ++ foreach ($aRoutes as $sKey => $sRoute) { ++ if (str_replace("\\Route", "\\Controller", $sRoute) === $sController) { ++ return $sKey; + } + } + +diff --git Core/Frameworks/Flake/Util/Tools.php Core/Frameworks/Flake/Util/Tools.php +index 21bf8502..ca371cc3 100644 +--- Core/Frameworks/Flake/Util/Tools.php ++++ Core/Frameworks/Flake/Util/Tools.php +@@ -75,7 +75,7 @@ static function view_array($array_in) { + if (is_array($array_in)) { + $result = ''; + if (!count($array_in)) {$result .= '';} +- while (list($key, $val) = each($array_in)) { ++ foreach ($array_in as $key => $val) { + $result .= '
' . htmlspecialchars("EMPTY!") . '
' . htmlspecialchars((string)$key) . ''; + if (is_array($array_in[$key])) { + $result .= \Flake\Util\Tools::view_array($array_in[$key]);