From c8d7672868f8f6653cc705873afb33c93a5a7814 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 7 Dec 2016 11:49:43 +0100 Subject: php-mongodb: 1.1.0 --- composer.json | 10 +++++++++- php-mongodb-autoload.php | 15 ++------------- php-mongodb.spec | 30 ++++++++++++++++-------------- 3 files changed, 27 insertions(+), 28 deletions(-) diff --git a/composer.json b/composer.json index 259835f..61ff3b1 100644 --- a/composer.json +++ b/composer.json @@ -11,7 +11,10 @@ ], "require": { "php": ">=5.4", - "ext-mongodb": "^1.1.0" + "ext-mongodb": "^1.2.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8" }, "autoload": { "psr-4": { "MongoDB\\": "src/" }, @@ -19,5 +22,10 @@ }, "autoload-dev": { "psr-4": { "MongoDB\\Tests\\": "tests/" } + }, + "extra": { + "branch-alias": { + "dev-master": "1.1.x-dev" + } } } diff --git a/php-mongodb-autoload.php b/php-mongodb-autoload.php index 4cf36b9..6381225 100644 --- a/php-mongodb-autoload.php +++ b/php-mongodb-autoload.php @@ -1,17 +1,6 @@ register(); -} - -$fedoraClassLoader->addPrefix('MongoDB\\', dirname(__DIR__)); - +require_once '/usr/share/php/Fedora/Autoloader/autoload.php'; +\Fedora\Autoloader\Autoload::addPsr4('MongoDB\\', __DIR__); require_once __DIR__. '/functions.php'; diff --git a/php-mongodb.spec b/php-mongodb.spec index 3d64f0f..97de0e6 100644 --- a/php-mongodb.spec +++ b/php-mongodb.spec @@ -6,7 +6,7 @@ # # Please, preserve the changelog entries # -%global gh_commit 302de20d8302183e1c70b335d81798cec5bcebd4 +%global gh_commit 9dfb2c5fc917d7438b44eb8f4d247ba3e3984e75 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner mongodb #global gh_date 20151102 @@ -22,7 +22,7 @@ #global prever beta2 Name: php-%{gh_owner} -Version: 1.0.4 +Version: 1.1.0 %if 0%{?gh_date} Release: 0.2.%{gh_date}git%{gh_short}%{?dist} %else @@ -45,22 +45,24 @@ BuildRequires: php(language) >= 5.4 BuildRequires: php-reflection BuildRequires: php-spl BuildRequires: php-pecl(mongodb) -BuildRequires: php-composer(phpunit/phpunit) BuildRequires: mongodb-server >= 2.4 +# From composer.json, "require-dev": { +# "phpunit/phpunit": "^4.8" +BuildRequires: php-composer(phpunit/phpunit) >= 4.8 # For autoloader -BuildRequires: php-composer(symfony/class-loader) +BuildRequires: php-composer(fedora/autoloader) %endif # From composer.json, "require": { # "php": ">=5.4" -# "ext-mongodb": "^1.1.0" +# "ext-mongodb": "^1.2.0" Requires: php(language) >= 5.4 -Requires: php-pecl(mongodb) >= 1.1.0 +Requires: php-pecl(mongodb) >= 1.2.0 # From phpcompatinfo report for 1.0.0alpha1 Requires: php-reflection Requires: php-spl # For autoloader -Requires: php-composer(symfony/class-loader) +Requires: php-composer(fedora/autoloader) # Composer Provides: php-composer(%{gh_owner}/%{gh_owner}) = %{version}%{?prever} @@ -116,12 +118,8 @@ cat << 'EOF' | tee tests/bootstrap.php addPrefix("MongoDB\\Tests\\", __DIR__); -$Loader->register(); +\Fedora\Autoloader\Autoload::addPsr4('MongoDB\\Tests\\', __DIR__); EOF : Run the test suite @@ -159,13 +157,17 @@ rm -rf %{buildroot} %{!?_licensedir:%global license %%doc} %license LICENSE %doc composer.json -%doc README.md -%doc RELEASE-* +%doc *.md %doc docs %{_datadir}/php/%{psr0} %changelog +* Wed Dec 7 2016 Remi Collet - 1.1.0-1 +- update to 1.1.0 +- raise dependency on php-pecl-mongodb 1.2.0 +- switch to fedora/autoloader + * Tue Dec 6 2016 Remi Collet - 1.0.4-1 - update to 1.0.4 -- cgit