From 44cea84f7f0cfca473feace7f2d964adef1ef0fa Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 22 May 2017 09:33:41 +0200 Subject: v2.9.2 --- .gitignore | 7 +++++ composer.json | 34 ++++++++++++++------- php-zendframework-zend-log.spec | 66 ++++++++++++++++++++--------------------- 3 files changed, 62 insertions(+), 45 deletions(-) create mode 100644 .gitignore 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 index e98456f..689c87e 100644 --- a/composer.json +++ b/composer.json @@ -8,26 +8,21 @@ "logging" ], "homepage": "https://github.com/zendframework/zend-log", - "autoload": { - "psr-4": { - "Zend\\Log\\": "src/" - } - }, "require": { "php": "^5.6 || ^7.0", + "psr/log": "^1.0", "zendframework/zend-servicemanager": "^2.7.5 || ^3.0.3", - "zendframework/zend-stdlib": "^2.7 || ^3.0", - "psr/log": "^1.0" + "zendframework/zend-stdlib": "^2.7 || ^3.0" }, "require-dev": { + "mikey179/vfsStream": "^1.6", + "phpunit/phpunit": "^5.7.15 || ^6.0.8", + "zendframework/zend-coding-standard": "~1.0.0", "zendframework/zend-db": "^2.6", "zendframework/zend-escaper": "^2.5", "zendframework/zend-filter": "^2.5", "zendframework/zend-mail": "^2.6.1", - "zendframework/zend-validator": "^2.6", - "friendsofphp/php-cs-fixer": "~1.7.0", - "phpunit/PHPUnit": "~4.0", - "mikey179/vfsStream": "^1.6" + "zendframework/zend-validator": "^2.6" }, "provide": { "psr/log-implementation": "1.0.0" @@ -53,12 +48,29 @@ "config-provider": "Zend\\Log\\ConfigProvider" } }, + "autoload": { + "psr-4": { + "Zend\\Log\\": "src/" + } + }, "autoload-dev": { "psr-4": { "ZendTest\\Log\\": "test/" }, "files": [ + "autoload/phpunit.php", "test/Writer/TestAsset/chmod.php" ] + }, + "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-log.spec b/php-zendframework-zend-log.spec index 6427d02..af48b75 100644 --- a/php-zendframework-zend-log.spec +++ b/php-zendframework-zend-log.spec @@ -7,7 +7,7 @@ # Please, preserve the changelog entries # %global bootstrap 0 -%global gh_commit 115d75db1f8fb29efbf1b9a49cb91c662b7195dc +%global gh_commit bf7489578d092d6ff7508117d1d920a4764fbd6a %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner zendframework %global gh_project zend-log @@ -20,7 +20,7 @@ %endif Name: php-%{gh_owner}-%{gh_project} -Version: 2.9.1 +Version: 2.9.2 Release: 1%{?dist} Summary: Zend Framework %{library} component @@ -30,7 +30,6 @@ URL: https://zendframework.github.io/%{gh_project}/ Source0: %{gh_commit}/%{name}-%{version}-%{gh_short}.tgz Source1: makesrc.sh -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildArch: noarch # Tests %if %{with_tests} @@ -45,22 +44,27 @@ BuildRequires: php-composer(%{gh_owner}/zend-servicemanager) >= 2.5 BuildRequires: php-composer(%{gh_owner}/zend-stdlib) >= 2.5 BuildRequires: php-composer(psr/log) >= 1.0 # From composer, "require-dev": { +# "mikey179/vfsStream": "^1.6", +# "phpunit/phpunit": "^5.7.15 || ^6.0.8", +# "zendframework/zend-coding-standard": "~1.0.0", # "zendframework/zend-db": "^2.6", # "zendframework/zend-escaper": "^2.5", # "zendframework/zend-filter": "^2.5", # "zendframework/zend-mail": "^2.6.1", -# "zendframework/zend-validator": "^2.6", -# "friendsofphp/php-cs-fixer": "~1.7.0", -# "phpunit/PHPUnit": "~4.0", -# "mikey179/vfsStream": "^1.6" +# "zendframework/zend-validator": "^2.6" +BuildRequires: php-composer(mikey179/vfsStream) >= 1.6 BuildRequires: php-composer(%{gh_owner}/zend-console) >= 2.5 BuildRequires: php-composer(%{gh_owner}/zend-db) >= 2.6 BuildRequires: php-composer(%{gh_owner}/zend-escaper) >= 2.5 BuildRequires: php-composer(%{gh_owner}/zend-filter) >= 2.5 BuildRequires: php-composer(%{gh_owner}/zend-mail) >= 2.6.1 BuildRequires: php-composer(%{gh_owner}/zend-validator) >= 2.6 -BuildRequires: php-composer(phpunit/phpunit) >= 4.0 -BuildRequires: php-composer(mikey179/vfsStream) >= 1.6 +%if 0%{?fedora} >= 26 +%global phpunit %{_bindir}/phpunit6 +%else +%global phpunit %{_bindir}/phpunit +%endif +BuildRequires: %{phpunit} # Optional dep BuildRequires: php-composer(%{gh_owner}/zend-mime) >= 2.5 # Autoloader @@ -69,17 +73,17 @@ BuildRequires: php-composer(%{gh_owner}/zend-loader) >= 2.5 # From composer, "require": { # "php": "^5.6 || ^7.0", +# "psr/log": "^1.0", # "zendframework/zend-servicemanager": "^2.7.5 || ^3.0.3", -# "zendframework/zend-stdlib": "^2.7 || ^3.0", -# "psr/log": "^1.0" +# "zendframework/zend-stdlib": "^2.7 || ^3.0" Requires: php(language) >= 5.6 %if ! %{bootstrap} +Requires: php-composer(psr/log) >= 1.0 +Requires: php-composer(psr/log) < 2 Requires: php-composer(%{gh_owner}/zend-servicemanager) >= 2.7.5 Requires: php-composer(%{gh_owner}/zend-servicemanager) < 4 Requires: php-composer(%{gh_owner}/zend-stdlib) >= 2.7 Requires: php-composer(%{gh_owner}/zend-stdlib) < 4 -Requires: php-composer(psr/log) >= 1.0 -Requires: php-composer(psr/log) < 2 # From composer, "suggest": { # "ext-mongo": "mongo extension to use Mongo writer", # "ext-mongodb": "mongodb extension to use MongoDB writer", @@ -132,8 +136,6 @@ mv LICENSE.md LICENSE %install -rm -rf %{buildroot} - mkdir -p %{buildroot}%{php_home}/Zend/ cp -pr src %{buildroot}%{php_home}/Zend/%{library} @@ -152,36 +154,28 @@ Zend\Loader\AutoloaderFactory::factory(array( )))); require_once '%{php_home}/Zend/autoload.php'; +require __DIR__ . '/../autoload/phpunit.php'; require __DIR__ . '/../test/Writer/TestAsset/chmod.php'; EOF -# remirepo:11 +# ignore test requiring a MongoDB server +rm test/Writer/MongoDBTest.php + ret=0 -run=0 -if which php56; then - php56 %{_bindir}/phpunit || ret=1 - run=1 -fi -if which php71; then - php71 %{_bindir}/phpunit || ret=1 - run=1 -fi -if [ $run -eq 0 ]; then -%{_bindir}/phpunit --verbose -# remirepo:2 -fi +# PHP 7.2: https://github.com/zendframework/zend-log/issues/76 +for cmdarg in "php %{phpunit}" "php56 %{_bindir}/phpunit" php70 php71; do + if which $cmdarg; then + set $cmdarg + $1 ${2:-%{_bindir}/phpunit6} --verbose || ret=1 + fi +done exit $ret %else : Test suite disabled %endif -%clean -rm -rf %{buildroot} - - %files -%defattr(-,root,root,-) %{!?_licensedir:%global license %%doc} %license LICENSE %doc *.md @@ -190,6 +184,10 @@ rm -rf %{buildroot} %changelog +* Mon May 22 2017 Remi Collet - 2.9.2-1 +- Update to 2.9.2 +- use phpunit6 on F26+ + * Fri Aug 12 2016 Remi Collet - 2.9.1-1 - update to 2.9.1 -- cgit