summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bfa211d98c6c7d1de46092bd1f5658021b508a99.patch123
-rw-r--r--php-theseer-autoload.spec8
2 files changed, 130 insertions, 1 deletions
diff --git a/bfa211d98c6c7d1de46092bd1f5658021b508a99.patch b/bfa211d98c6c7d1de46092bd1f5658021b508a99.patch
new file mode 100644
index 0000000..a5ec24d
--- /dev/null
+++ b/bfa211d98c6c7d1de46092bd1f5658021b508a99.patch
@@ -0,0 +1,123 @@
+From bfa211d98c6c7d1de46092bd1f5658021b508a99 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Sun, 14 Oct 2018 08:01:46 +0200
+Subject: [PATCH] Fix PHP 7.3 warnings => PHP Warning: Uncaught "continue"
+ targeting switch is equivalent to "break". Did you mean to use "continue 2"?
+
+---
+ src/Parser.php | 32 ++++++++++++++++----------------
+ 1 file changed, 16 insertions(+), 16 deletions(-)
+
+diff --git a/src/Parser.php b/src/Parser.php
+index 211ff65..7625317 100644
+--- a/src/Parser.php
++++ b/src/Parser.php
+@@ -166,32 +166,32 @@ private function processClass($pos) {
+ case T_COMMENT:
+ case T_DOC_COMMENT:
+ case T_WHITESPACE: {
+- continue;
++ break;
+ }
+ case T_STRING: {
+ $$mode .= $tok[1];
+- continue;
++ break;
+ }
+ case T_NS_SEPARATOR: {
+ $$mode .= '\\';
+- continue;
++ break;
+ }
+ case T_EXTENDS: {
+ $extendsFound = true;
+ $mode = 'extends';
+- continue;
++ break;
+ }
+ case T_IMPLEMENTS: {
+ $implementsFound = true;
+ $mode = 'implements';
+- continue;
++ break;
+ }
+ case ',': {
+ if ($mode == 'implements') {
+ $implementsList[] = $this->resolveDependencyName($implements);
+ $implements = '';
+ }
+- continue;
++ break;
+ }
+ default: {
+ throw new ParserException(sprintf(
+@@ -233,11 +233,11 @@ private function processInterface($pos) {
+ case T_NS_SEPARATOR:
+ case T_STRING: {
+ $$mode .= $tok[1];
+- continue;
++ break;
+ }
+ case T_EXTENDS: {
+ $mode = 'extends';
+- continue;
++ break;
+ }
+ case ',': {
+ if ($mode == 'extends') {
+@@ -389,18 +389,18 @@ private function parseUseOfTrait($stackSize, $stack) {
+ break;
+ }
+ }
+- continue;
++ break;
+ }
+ case ';':
+ case ',': {
+ $this->dependencies[$this->inUnit][] = $this->resolveDependencyName($use);
+ $use = '';
+- continue;
++ break;
+ }
+ case T_NS_SEPARATOR:
+ case T_STRING: {
+ $use .= $current[1];
+- continue;
++ break;
+ }
+ }
+ }
+@@ -421,11 +421,11 @@ private function parseUseAsImport($stack) {
+ case T_CONST:
+ case T_FUNCTION: {
+ $ignore = true;
+- continue;
++ break;
+ }
+ case '{': {
+ $group = $use;
+- continue;
++ break;
+ }
+ case ';':
+ case ',': {
+@@ -447,16 +447,16 @@ private function parseUseAsImport($stack) {
+ $use = $group;
+ $mode = 'use';
+ $ignore = false;
+- continue;
++ break;
+ }
+ case T_NS_SEPARATOR:
+ case T_STRING: {
+ $$mode .= $current[1];
+- continue;
++ break;
+ }
+ case T_AS: {
+ $mode = 'alias';
+- continue;
++ break;
+ }
+ }
+ }
diff --git a/php-theseer-autoload.spec b/php-theseer-autoload.spec
index a210ed8..f69d3c9 100644
--- a/php-theseer-autoload.spec
+++ b/php-theseer-autoload.spec
@@ -20,7 +20,7 @@
Name: php-theseer-autoload
Version: 1.25.0
-Release: 1%{?dist}
+Release: 3%{?dist}
Summary: A tool and library to generate autoload code
License: BSD
@@ -29,6 +29,8 @@ Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit
# Autoloader path
Patch0: %{gh_project}-rpm.patch
+# Upstream patch
+Patch1: https://github.com/theseer/Autoload/commit/bfa211d98c6c7d1de46092bd1f5658021b508a99.patch
BuildArch: noarch
BuildRequires: php(language) >= 5.3.1
@@ -85,6 +87,7 @@ the option of creating static require lists as well as phar archives.
%setup -q -n %{gh_project}-%{gh_commit}
%patch0 -p0 -b .rpm
+%patch1 -p1
: drop composer dependencies
sed -e '\:../vendor/:d' -i src/autoload.php
@@ -146,6 +149,9 @@ fi
%changelog
+* Mon Oct 15 2018 Remi Collet <remi@remirepo.net> - 1.25.0-3
+- add upstream patch for PHP 7.3
+
* Mon Jul 2 2018 Remi Collet <remi@remirepo.net> - 1.25.0-1
- update to 1.25.0
- use range dependencies