summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--81.patch68
-rw-r--r--composer.json10
-rw-r--r--php-zendframework-zend-stdlib.spec21
3 files changed, 18 insertions, 81 deletions
diff --git a/81.patch b/81.patch
deleted file mode 100644
index c90600d..0000000
--- a/81.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-From 5c2f528c5e3b775b960adc128efc7717ff2db64c Mon Sep 17 00:00:00 2001
-From: Remi Collet <remi@remirepo.net>
-Date: Tue, 24 Oct 2017 10:49:02 +0200
-Subject: [PATCH] Fix testCount for PHP 7.2
-
-PHP 7.2 raise a deprecated message
- Parameter must be an array or an object that implements Countable
-
-I think this should not be hidden (count could take care of this),
-so this change declare the message as expected.
-
-A new test is added for object which are really countable
----
- test/ArrayObjectTest.php | 12 ++++++++++++
- test/TestAsset/ArrayObjectObjectCount.php | 17 +++++++++++++++++
- 2 files changed, 29 insertions(+)
- create mode 100644 test/TestAsset/ArrayObjectObjectCount.php
-
-diff --git a/test/ArrayObjectTest.php b/test/ArrayObjectTest.php
-index b09cab7e..1ab3e97b 100644
---- a/test/ArrayObjectTest.php
-+++ b/test/ArrayObjectTest.php
-@@ -103,10 +103,22 @@ public function testAsort()
-
- public function testCount()
- {
-+ if (version_compare(PHP_VERSION, '7.2', '>=')) {
-+ $this->setExpectedException(
-+ 'PHPUnit_Framework_Error_Warning',
-+ 'Parameter must be an array or an object that implements Countable'
-+ );
-+ }
- $ar = new ArrayObject(new TestAsset\ArrayObjectObjectVars());
- $this->assertEquals(1, $ar->count());
- }
-
-+ public function testCountable()
-+ {
-+ $ar = new ArrayObject(new TestAsset\ArrayObjectObjectCount());
-+ $this->assertEquals(42, $ar->count());
-+ }
-+
- public function testExchangeArray()
- {
- $ar = new ArrayObject(['foo' => 'bar']);
-diff --git a/test/TestAsset/ArrayObjectObjectCount.php b/test/TestAsset/ArrayObjectObjectCount.php
-new file mode 100644
-index 00000000..7b40dbee
---- /dev/null
-+++ b/test/TestAsset/ArrayObjectObjectCount.php
-@@ -0,0 +1,17 @@
-+<?php
-+/**
-+ * Zend Framework (http://framework.zend.com/)
-+ *
-+ * @link http://github.com/zendframework/zf2 for the canonical source repository
-+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
-+ * @license http://framework.zend.com/license/new-bsd New BSD License
-+ */
-+
-+namespace ZendTest\Stdlib\TestAsset;
-+
-+class ArrayObjectObjectCount implements \Countable
-+{
-+ public function count() {
-+ return 42;
-+ }
-+}
diff --git a/composer.json b/composer.json
index 7396611..679d1f3 100644
--- a/composer.json
+++ b/composer.json
@@ -18,7 +18,7 @@
"require-dev": {
"athletic/athletic": "~0.1",
"phpunit/PHPUnit": "~4.0",
- "squizlabs/php_codesniffer": "^2.6.2"
+ "zendframework/zend-coding-standard": "~1.0.0"
},
"extra": {
"branch-alias": {
@@ -33,8 +33,12 @@
}
},
"scripts": {
- "cs-check": "phpcs --colors",
- "cs-fix": "phpcbf --colors",
+ "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-stdlib.spec b/php-zendframework-zend-stdlib.spec
index d0318a8..cebeff3 100644
--- a/php-zendframework-zend-stdlib.spec
+++ b/php-zendframework-zend-stdlib.spec
@@ -1,13 +1,13 @@
# remirepo/Fedora spec file for php-zendframework-zend-stdlib
#
-# Copyright (c) 2015-2017 Remi Collet
+# Copyright (c) 2015-2018 Remi Collet
# License: CC-BY-SA
# http://creativecommons.org/licenses/by-sa/4.0/
#
# Please, preserve the changelog entries
#
%global bootstrap 0
-%global gh_commit debedcfc373a293f9250cc9aa03cf121428c8e78
+%global gh_commit 10ef03144902d1955f935fff5346ed52f7d99bcc
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner zendframework
%global gh_project zend-stdlib
@@ -20,8 +20,8 @@
%endif
Name: php-%{gh_owner}-%{gh_project}
-Version: 3.1.0
-Release: 6%{?dist}
+Version: 3.1.1
+Release: 1%{?dist}
Summary: Zend Framework %{library} component
Group: Development/Libraries
@@ -30,8 +30,6 @@ URL: https://zendframework.github.io/%{gh_project}/
Source0: %{gh_commit}/%{name}-%{version}-%{gh_short}.tgz
Source1: makesrc.sh
-Patch0: https://patch-diff.githubusercontent.com/raw/zendframework/zend-stdlib/pull/81.patch
-
BuildArch: noarch
# Tests
%if %{with_tests}
@@ -46,7 +44,7 @@ BuildRequires: php-spl
# "athletic/athletic": "~0.1",
# "fabpot/php-cs-fixer": "1.7.*",
# "phpunit/PHPUnit": "~4.0",
-# "squizlabs/php_codesniffer": "^2.6.2"
+# "zendframework/zend-coding-standard": "~1.0.0"
BuildRequires: php-composer(phpunit/phpunit) >= 4.0
# Autoloader
BuildRequires: php-fedora-autoloader-devel
@@ -86,7 +84,6 @@ Documentation: https://zendframework.github.io/%{gh_project}/
%prep
%setup -q -n %{gh_project}-%{gh_commit}
-%patch0 -p1
mv LICENSE.md LICENSE
@@ -106,11 +103,11 @@ mkdir vendor
cat << 'EOF' | tee vendor/autoload.php
<?php
require_once '%{buildroot}%{php_home}/Zend/%{library}/autoload.php';
-\Fedora\Autoloader\Autoload::addPsr4('ZendTest\\Stdlib\\', dirname(__DIR__) . '/test');
+\Fedora\Autoloader\Autoload::addPsr4('ZendTest\\%{library}\\', dirname(__DIR__) . '/test');
EOF
ret=0
-for cmd in php php56 php70 php71 php72; do
+for cmd in php php70 php71 php72; do
if which $cmd; then
$cmd %{_bindir}/phpunit --verbose || ret=1
fi
@@ -126,10 +123,14 @@ exit $ret
%license LICENSE
%doc *.md
%doc composer.json
+%dir %{php_home}/Zend
%{php_home}/Zend/%{library}
%changelog
+* Mon Apr 16 2018 Remi Collet <remi@remirepo.net> - 3.1.1-1
+- update to 3.1.1
+
* Thu Nov 23 2017 Remi Collet <remi@fedoraproject.org> - 3.1.0-6
- provide php-autoloader(zendframework/zend-stdlib)