remi pushed to php-phpunit-phploc (f22). "- update to 2.1.3 (..more)"

notifications at fedoraproject.org notifications at fedoraproject.org
Thu Jun 4 16:01:46 UTC 2015


From a6f3afeb3fa4bff6e8abde9349a8f95f56eeff79 Mon Sep 17 00:00:00 2001
From: Remi Collet <remi at fedoraproject.org>
Date: Thu, 4 Jun 2015 17:50:20 +0200
Subject: - update to 2.1.3 - improve autoloader - lower minimal PHP version to
 5.3.3 - fix license handling


diff --git a/.gitignore b/.gitignore
index b3588e5..4fbf420 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,3 +9,4 @@ phploc-1.5.1.tgz
 /phploc-2.1.0.tar.gz
 /phploc-2.1.1.tar.gz
 /phploc-2.1.2.tar.gz
+/phploc-2.1.3-ab893cb.tar.gz
diff --git a/autoload.php.in b/autoload.php.in
index 52a3f0c..22ad17d 100644
--- a/autoload.php.in
+++ b/autoload.php.in
@@ -1,10 +1,20 @@
 <?php
 /* Inspired from autoload from version 2.0.3 */
 
-require_once 'SebastianBergmann/FinderFacade/autoload.php';
-require_once 'SebastianBergmann/Git/autoload.php';
-require_once 'SebastianBergmann/Version/autoload.php';
-require_once 'Symfony/Component/Console/autoloader.php';
+$vendorDir = '/usr/share/php';
+require_once $vendorDir . '/SebastianBergmann/FinderFacade/autoload.php';
+require_once $vendorDir . '/SebastianBergmann/Git/autoload.php';
+require_once $vendorDir . '/SebastianBergmann/Version/autoload.php';
+
+if (!(isset($sfuloader) && $sfuloader instanceof Symfony\Component\ClassLoader\UniversalClassLoader)) {
+    require_once $vendorDir . '/Symfony/Component/ClassLoader/UniversalClassLoader.php';
+    $sfuloader = new Symfony\Component\ClassLoader\UniversalClassLoader();
+    $sfuloader->register();
+}
+$sfuloader->registerNamespaces(array(
+    'Symfony\\Component\\Console'         => $vendorDir,
+    'Symfony\\Component\\ClassLoader'     => $vendorDir,
+));
 
 spl_autoload_register(
     function($class) {
diff --git a/php-phpunit-phploc.spec b/php-phpunit-phploc.spec
index fc3a4e6..f9eab6d 100644
--- a/php-phpunit-phploc.spec
+++ b/php-phpunit-phploc.spec
@@ -7,7 +7,7 @@
 #
 # Please, preserve the changelog entries
 #
-%global gh_commit    d6b05c9072ed7ec3e365722d129f220c24aa90f1
+%global gh_commit    ab893cbe5c4b63760b1560b370fedc001eb5717f
 %global gh_short     %(c=%{gh_commit}; echo ${c:0:7})
 %global gh_owner     sebastianbergmann
 %global gh_project   phploc
@@ -17,14 +17,14 @@
 %global with_tests   %{?_without_tests:0}%{!?_without_tests:1}
 
 Name:           php-phpunit-phploc
-Version:        2.1.2
+Version:        2.1.3
 Release:        1%{?dist}
 Summary:        A tool for quickly measuring the size of a PHP project
 
 Group:          Development/Libraries
 License:        BSD
 URL:            https://github.com/%{gh_owner}/%{gh_project}
-Source0:        https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}.tar.gz
+Source0:        https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}-%{gh_short}.tar.gz
 
 # Autoload template
 Source1:        autoload.php.in
@@ -33,7 +33,7 @@ Source1:        autoload.php.in
 Patch0:         %{gh_project}-rpm.patch
 
 BuildArch:      noarch
-BuildRequires:  php(language) >= 5.4
+BuildRequires:  php(language) >= 5.3.3
 BuildRequires:  %{_bindir}/phpab
 %if %{with_tests}
 BuildRequires:  %{_bindir}/phpunit
@@ -43,8 +43,9 @@ BuildRequires:  php-composer(sebastian/git) >= 2.0
 BuildRequires:  php-composer(sebastian/git) <  3
 BuildRequires:  php-composer(sebastian/version) >= 1.0.3
 BuildRequires:  php-composer(sebastian/version) <  2
-BuildRequires:  php-symfony-console >= 2.5
-BuildRequires:  php-symfony-console <  3
+BuildRequires:  php-composer(symfony/console) >= 2.5
+BuildRequires:  php-composer(symfony/console) <  3
+BuildRequires:  php-composer(symfony/class-loader)
 %endif
 
 # From composer.json
@@ -53,7 +54,7 @@ BuildRequires:  php-symfony-console <  3
 #      "sebastian/git": "~2.0",
 #      "sebastian/version": "~1.0.3",
 #      "symfony/console": "~2.5"
-Requires:       php(language) >= 5.4
+Requires:       php(language) >= 5.3.3
 Requires:       php-cli
 Requires:       php-composer(sebastian/finder-facade) >= 1.1
 Requires:       php-composer(sebastian/finder-facade) <  2
@@ -61,15 +62,16 @@ Requires:       php-composer(sebastian/git) >= 2.0
 Requires:       php-composer(sebastian/git) <  3
 Requires:       php-composer(sebastian/version) >= 1.0.3
 Requires:       php-composer(sebastian/version) <  2
-Requires:       php-symfony-console >= 2.5
-Requires:       php-symfony-console <  3
-# From phpcompatinfo report for version 2.0.5
+Requires:       php-composer(symfony/console) >= 2.5
+Requires:       php-composer(symfony/console) <  3
+# From phpcompatinfo report for version 2.1.3
 Requires:       php-dom
 Requires:       php-spl
 Requires:       php-tokenizer
+# For our autoloader
+Requires:       php-composer(symfony/class-loader)
 
 Provides:       php-composer(phploc/phploc) = %{version}
-
 # For compat
 Provides:       php-pear(%{pear_channel}/%{pear_name}) = %{version}
 Provides:       phploc = %{version}
@@ -119,12 +121,21 @@ fi
 
 
 %files
-%doc LICENSE README.md composer.json
+%{!?_licensedir:%global license %%doc}
+%license LICENSE
+%doc README.md
+%doc composer.json
 %{php_home}/PHPLOC
 %{_bindir}/phploc
 
 
 %changelog
+* Thu Jun  4 2015 Remi Collet <remi at fedoraproject.org> - 2.1.3-1
+- update to 2.1.3
+- improve autoloader
+- lower minimal PHP version to 5.3.3
+- fix license handling
+
 * Tue May 26 2015 Remi Collet <remi at fedoraproject.org> - 2.1.2-1
 - update to 2.1.2
 - ensure compatibility with SCL
diff --git a/phploc-rpm.patch b/phploc-rpm.patch
index 414b0f3..671c679 100644
--- a/phploc-rpm.patch
+++ b/phploc-rpm.patch
@@ -1,7 +1,7 @@
 diff -up ./phploc.rpm ./phploc
---- ./phploc.rpm	2015-05-26 16:03:47.000000000 +0200
-+++ ./phploc	2015-05-26 19:14:44.687212792 +0200
-@@ -9,23 +9,16 @@
+--- ./phploc.rpm	2015-06-04 15:18:14.000000000 +0200
++++ ./phploc	2015-06-04 17:19:24.277906076 +0200
+@@ -9,23 +9,7 @@
   * file that was distributed with this source code.
   */
 
@@ -13,15 +13,8 @@ diff -up ./phploc.rpm ./phploc
 -        $loaded = true;
 -        break;
 -    }
-+// Ensure correct include_path for RHSCL
-+$inc = get_include_path();
-+$dirs = explode(':', $inc);
-+if (!in_array('/usr/share/php', $dirs)) {
-+    $dirs[] = '/usr/share/php';
-+    set_include_path(implode(':', $dirs));
- }
-+unset ($inc, $dirs);
-
+-}
+-
 -if (!$loaded) {
 -    die(
 -        'You need to set up the project dependencies using the following commands:' . PHP_EOL .
@@ -29,7 +22,7 @@ diff -up ./phploc.rpm ./phploc
 -        'php composer.phar install' . PHP_EOL
 -    );
 -}
-+require 'SebastianBergmann/PHPLOC/autoload.php';
++require '/usr/share/php/SebastianBergmann/PHPLOC/autoload.php';
 
  $application = new SebastianBergmann\PHPLOC\CLI\Application;
  $application->run();
diff --git a/sources b/sources
index e646ec0..54852d5 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-0b56578d69aa477cf75c5cc8325402fa  phploc-2.1.2.tar.gz
+c1c32f2b34d2b67767baa5a9752c6d4b  phploc-2.1.3-ab893cb.tar.gz
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/php-phpunit-phploc.git/commit/?h=f22&id=a6f3afeb3fa4bff6e8abde9349a8f95f56eeff79


More information about the scm-commits mailing list