summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore7
-rw-r--r--composer.json60
-rw-r--r--php-zendframework-zend-feed-pr35.patch35
-rw-r--r--php-zendframework-zend-feed.spec67
4 files changed, 108 insertions, 61 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..1ab5c4f
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,7 @@
+package-*.xml
+*.tgz
+*.tar.gz
+*.tar.xz
+*.tar.xz.asc
+*.src.rpm
+*/*rpm
diff --git a/composer.json b/composer.json
new file mode 100644
index 0000000..7aff1d6
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,60 @@
+{
+ "name": "zendframework/zend-feed",
+ "description": "provides functionality for consuming RSS and Atom feeds",
+ "license": "BSD-3-Clause",
+ "keywords": [
+ "zf2",
+ "feed"
+ ],
+ "homepage": "https://github.com/zendframework/zend-feed",
+ "autoload": {
+ "psr-4": {
+ "Zend\\Feed\\": "src/"
+ }
+ },
+ "require": {
+ "php": "^5.6 || ^7.0",
+ "zendframework/zend-escaper": "^2.5",
+ "zendframework/zend-stdlib": "^2.7 || ^3.1"
+ },
+ "require-dev": {
+ "zendframework/zend-db": "^2.7",
+ "zendframework/zend-cache": "^2.6",
+ "zendframework/zend-http": "^2.5.4",
+ "zendframework/zend-servicemanager": "^2.7.5 || ^3.0.3",
+ "zendframework/zend-validator": "^2.6",
+ "phpunit/PHPUnit": "^6.0.8 || ^5.7.15",
+ "psr/http-message": "^1.0",
+ "zendframework/zend-coding-standard": "~1.0.0"
+ },
+ "suggest": {
+ "psr/http-message": "PSR-7 ^1.0, if you wish to use Zend\\Feed\\Reader\\Http\\Psr7ResponseDecorator",
+ "zendframework/zend-cache": "Zend\\Cache component, for optionally caching feeds between requests",
+ "zendframework/zend-db": "Zend\\Db component, for use with PubSubHubbub",
+ "zendframework/zend-http": "Zend\\Http for PubSubHubbub, and optionally for use with Zend\\Feed\\Reader",
+ "zendframework/zend-servicemanager": "Zend\\ServiceManager component, for easily extending ExtensionManager implementations",
+ "zendframework/zend-validator": "Zend\\Validator component, for validating email addresses used in Atom feeds and entries ehen using the Writer subcomponent"
+ },
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.8-dev",
+ "dev-develop": "2.9-dev"
+ }
+ },
+ "autoload-dev": {
+ "psr-4": {
+ "ZendTest\\Feed\\": "test/"
+ }
+ },
+ "scripts": {
+ "check": [
+ "@cs-check",
+ "@test"
+ ],
+ "cs-check": "phpcs",
+ "cs-fix": "phpcbf",
+ "test": "phpunit --colors=always",
+ "test-coverage": "phpunit --colors=always --coverage-clover clover.xml",
+ "upload-coverage": "coveralls -v"
+ }
+}
diff --git a/php-zendframework-zend-feed-pr35.patch b/php-zendframework-zend-feed-pr35.patch
deleted file mode 100644
index c7eddf9..0000000
--- a/php-zendframework-zend-feed-pr35.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 39a1255f47f849182f438e8f3d14a9e044925ca9 Mon Sep 17 00:00:00 2001
-From: Remi Collet <fedora@famillecollet.com>
-Date: Tue, 15 Nov 2016 13:47:28 +0100
-Subject: [PATCH] fix "A non-numeric value encountered" with PHP 7.1
-
----
- src/Reader/Extension/AbstractEntry.php | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/src/Reader/Extension/AbstractEntry.php b/src/Reader/Extension/AbstractEntry.php
-index c589146..aac03b9 100644
---- a/src/Reader/Extension/AbstractEntry.php
-+++ b/src/Reader/Extension/AbstractEntry.php
-@@ -135,18 +135,18 @@ public function setType($type)
- if ($type === Reader\Reader::TYPE_RSS_10
- || $type === Reader\Reader::TYPE_RSS_090
- ) {
-- $this->setXpathPrefix('//rss:item[' . ($this->entryKey + 1) . ']');
-+ $this->setXpathPrefix('//rss:item[' . ((int)$this->entryKey + 1) . ']');
- return $this;
- }
-
- if ($type === Reader\Reader::TYPE_ATOM_10
- || $type === Reader\Reader::TYPE_ATOM_03
- ) {
-- $this->setXpathPrefix('//atom:entry[' . ($this->entryKey + 1) . ']');
-+ $this->setXpathPrefix('//atom:entry[' . ((int)$this->entryKey + 1) . ']');
- return $this;
- }
-
-- $this->setXpathPrefix('//item[' . ($this->entryKey + 1) . ']');
-+ $this->setXpathPrefix('//item[' . ((int)$this->entryKey + 1) . ']');
- return $this;
- }
-
diff --git a/php-zendframework-zend-feed.spec b/php-zendframework-zend-feed.spec
index 9180932..3479bf5 100644
--- a/php-zendframework-zend-feed.spec
+++ b/php-zendframework-zend-feed.spec
@@ -7,7 +7,7 @@
# Please, preserve the changelog entries
#
%global bootstrap 0
-%global gh_commit 12b328d382aa5200f1de53d4147033b885776b67
+%global gh_commit 94579e805dd108683209fe14b3b5d4276de3de6e
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner zendframework
%global gh_project zend-feed
@@ -20,8 +20,8 @@
%endif
Name: php-%{gh_owner}-%{gh_project}
-Version: 2.7.0
-Release: 2%{?dist}
+Version: 2.8.0
+Release: 1%{?dist}
Summary: Zend Framework %{library} component
Group: Development/Libraries
@@ -30,13 +30,11 @@ URL: https://zendframework.github.io/%{gh_project}/
Source0: %{gh_commit}/%{name}-%{version}-%{gh_short}.tgz
Source1: makesrc.sh
-Patch0: %{name}-pr35.patch
-
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildArch: noarch
# Tests
%if %{with_tests}
-BuildRequires: php(language) >= 5.5
+BuildRequires: php(language) >= 5.6
BuildRequires: php-ctype
BuildRequires: php-date
BuildRequires: php-dom
@@ -48,21 +46,26 @@ BuildRequires: php-tidy
BuildRequires: php-composer(%{gh_owner}/zend-escaper) >= 2.5
BuildRequires: php-composer(%{gh_owner}/zend-stdlib) >= 2.5
# From composer, "require-dev": {
-# "zendframework/zend-db": "^2.5",
-# "zendframework/zend-cache": "^2.5",
-# "zendframework/zend-http": "^2.5",
+# "zendframework/zend-db": "^2.7",
+# "zendframework/zend-cache": "^2.6",
+# "zendframework/zend-http": "^2.5.4",
# "zendframework/zend-servicemanager": "^2.7.5 || ^3.0.3",
-# "zendframework/zend-validator": "^2.5",
-# "fabpot/php-cs-fixer": "1.7.*",
-# "phpunit/PHPUnit": "~4.0",
-# "psr/http-message": "^1.0"
-BuildRequires: php-composer(%{gh_owner}/zend-db) >= 2.5
-BuildRequires: php-composer(%{gh_owner}/zend-cache) >= 2.5
-BuildRequires: php-composer(%{gh_owner}/zend-http) >= 2.5
+# "zendframework/zend-validator": "^2.6",
+# "phpunit/PHPUnit": "^6.0.8 || ^5.7.15",
+# "psr/http-message": "^1.0",
+# "zendframework/zend-coding-standard": "~1.0.0"
+BuildRequires: php-composer(%{gh_owner}/zend-db) >= 2.7
+BuildRequires: php-composer(%{gh_owner}/zend-cache) >= 2.6
+BuildRequires: php-composer(%{gh_owner}/zend-http) >= 2.5.4
BuildRequires: php-composer(%{gh_owner}/zend-servicemanager) >= 2.7.5
-BuildRequires: php-composer(%{gh_owner}/zend-validator) >= 2.5
-BuildRequires: php-composer(phpunit/phpunit) >= 4.0
+BuildRequires: php-composer(%{gh_owner}/zend-validator) >= 2.6
BuildRequires: php-composer(psr/http-message) >= 1.0
+%if 0%{?fedora} >= 26
+%global phpunit %{_bindir}/phpunit6
+%else
+%global phpunit %{_bindir}/phpunit
+%endif
+BuildRequires: %{phpunit}
# Because of boostraped Db
BuildRequires: php-composer(%{gh_owner}/zend-eventmanager) >= 2.5
# Autoloader
@@ -70,10 +73,10 @@ BuildRequires: php-composer(%{gh_owner}/zend-loader) >= 2.5
%endif
# From composer, "require": {
-# "php": "^5.5 || ^7.0",
+# "php": "^5.6 || ^7.0",
# "zendframework/zend-escaper": "^2.5",
-# "zendframework/zend-stdlib": "^2.7 || ^3.0"
-Requires: php(language) >= 5.5
+# "zendframework/zend-stdlib": "^2.7 || ^3.1"
+Requires: php(language) >= 5.6
%if ! %{bootstrap}
Requires: php-composer(%{gh_owner}/zend-escaper) >= 2.5
Requires: php-composer(%{gh_owner}/zend-escaper) < 3
@@ -122,12 +125,14 @@ Documentation: https://zendframework.github.io/%{gh_project}/
%prep
%setup -q -n %{gh_project}-%{gh_commit}
-%patch0 -p1
mv LICENSE.md LICENSE
-# NOTICE: psr/http-message is PSR-0 compliant
-# autoload will be managed by fallback_autoloader
+: Create dependency autoloader
+cat << 'EOF' | tee autoload.php
+<?php
+require_once '%{php_home}/Psr/Http/Message/autoload.php';
+EOF
%build
@@ -140,12 +145,16 @@ rm -rf %{buildroot}
mkdir -p %{buildroot}%{php_home}/Zend/
cp -pr src %{buildroot}%{php_home}/Zend/%{library}
+install -m644 autoload.php %{buildroot}%{php_home}/Zend/%{library}-autoload.php
+
%check
%if %{with_tests}
mkdir vendor
cat << 'EOF' | tee vendor/autoload.php
<?php
+define('RPM_BUILDROOT', '%{buildroot}%{php_home}/Zend');
+
require_once '%{php_home}/Zend/Loader/AutoloaderFactory.php';
Zend\Loader\AutoloaderFactory::factory(array(
'Zend\Loader\StandardAutoloader' => array(
@@ -168,11 +177,11 @@ if which php56; then
run=1
fi
if which php71; then
- php70 %{_bindir}/phpunit || ret=1
+ php71 %{_bindir}/phpunit6 || ret=1
run=1
fi
if [ $run -eq 0 ]; then
-%{_bindir}/phpunit --verbose
+%{phpunit} --verbose
# remirepo:2
fi
exit $ret
@@ -192,9 +201,15 @@ rm -rf %{buildroot}
%doc *.md
%doc composer.json
%{php_home}/Zend/%{library}
+%{php_home}/Zend/%{library}-autoload.php
%changelog
+* Sun Apr 2 2017 Remi Collet <remi@remirepo.net> - 2.8.0-1
+- Update to 2.8.0
+- raise dependency on PHP 5.6
+- use phpunit6 on F26+
+
* Tue Nov 15 2016 Remi Collet <remi@fedoraproject.org> - 2.7.0-2
- add path for PHP 7.1
open https://github.com/zendframework/zend-feed/pull/35