Update to 0.2.0

- Remove applied patches that are included in 0.2.0
epel9
Shawn Iwinski 8 years ago
parent 89cf19f840
commit 4646429ab1

1
.gitignore vendored

@ -1,2 +1,3 @@
/php-fedora-autoloader-0.1.1-816e4e59061c592f7480a00c6cd9c16067811c1e.tar.gz /php-fedora-autoloader-0.1.1-816e4e59061c592f7480a00c6cd9c16067811c1e.tar.gz
/php-fedora-autoloader-0.1.2-35f7b52f4682276620369bc4bc1a3a5fef93faad.tar.gz /php-fedora-autoloader-0.1.2-35f7b52f4682276620369bc4bc1a3a5fef93faad.tar.gz
/php-fedora-autoloader-0.2.0-acadcf9f2511ac7b777117eb66728f95faabbe99.tar.gz

@ -1,43 +0,0 @@
diff --git a/tests/AutoloadTest.php b/tests/AutoloadTest.php
index c8e53e4..f71f150 100644
--- a/tests/AutoloadTest.php
+++ b/tests/AutoloadTest.php
@@ -89,6 +89,7 @@ class AutoloadTest extends \PHPUnit_Framework_TestCase
**/
public function testAddClassMapTemplateOrderBis()
{
+ $nb = count(Autoload::getClassMap());
$this->assertFalse(class_exists('Foo\\Bar'));
require __DIR__.'/fixtures/Foo2/classmap2.php';
require __DIR__.'/fixtures/Foo/classmap.php';
@@ -98,7 +99,7 @@ class AutoloadTest extends \PHPUnit_Framework_TestCase
$this->assertEquals('three', \Foo\Bar::order);
$classmap = Autoload::getClassMap();
- $this->assertEquals(2, count($classmap));
+ $this->assertEquals($nb+2, count($classmap));
$this->assertArrayHasKey(__DIR__.'/fixtures/Foo', $classmap);
$this->assertArrayHasKey(__DIR__.'/fixtures/Foo2', $classmap);
}
diff --git a/src/Autoload.php b/src/Autoload.php
index 5d08c84..9f85edd 100644
--- a/src/Autoload.php
+++ b/src/Autoload.php
@@ -209,7 +209,7 @@ class Autoload
*/
public static function loadClass($class)
{
- if ($file = static::findFile($class)) {
+ if ($file = static::findFileForClass($class)) {
includeFile($file);
}
}
@@ -219,7 +219,7 @@ class Autoload
*
* Checks for a classmap and then loops through PSR-4 mappings.
*/
- public static function findFile($class)
+ public static function findFileForClass($class)
{
$class = ltrim($class, '\\');
$lower = strtolower($class);

@ -12,8 +12,8 @@
%global github_owner php-fedora %global github_owner php-fedora
%global github_name autoloader %global github_name autoloader
%global github_version 0.1.2 %global github_version 0.2.0
%global github_commit 35f7b52f4682276620369bc4bc1a3a5fef93faad %global github_commit acadcf9f2511ac7b777117eb66728f95faabbe99
%global composer_vendor fedora %global composer_vendor fedora
%global composer_project autoloader %global composer_project autoloader
@ -40,8 +40,6 @@ License: MIT
URL: https://github.com/%{github_owner}/%{github_name} URL: https://github.com/%{github_owner}/%{github_name}
Source0: %{url}/archive/%{github_commit}/%{name}-%{github_version}-%{github_commit}.tar.gz Source0: %{url}/archive/%{github_commit}/%{name}-%{github_version}-%{github_commit}.tar.gz
Patch0: %{name}.patch
BuildArch: noarch BuildArch: noarch
# Tests # Tests
%if %{with_tests} %if %{with_tests}
@ -50,13 +48,13 @@ BuildRequires: php(language) >= %{php_min_ver}
BuildRequires: php-composer(phpunit/phpunit) BuildRequires: php-composer(phpunit/phpunit)
BuildRequires: php-composer(theseer/autoload) >= %{phpab_min_ver} BuildRequires: php-composer(theseer/autoload) >= %{phpab_min_ver}
BuildRequires: php-pear BuildRequires: php-pear
## phpcompatinfo (computed from version 0.1.0) ## phpcompatinfo (computed from version 0.2.0)
BuildRequires: php-spl BuildRequires: php-spl
%endif %endif
# composer.json # composer.json
Requires: php(language) >= %{php_min_ver} Requires: php(language) >= %{php_min_ver}
# phpcompatinfo (computed from version 0.1.0) # phpcompatinfo (computed from version 0.2.0)
Requires: php-spl Requires: php-spl
# Composer # Composer
@ -92,8 +90,6 @@ Provides needed tools to build other packages:
%prep %prep
%setup -qn %{github_name}-%{github_commit} %setup -qn %{github_name}-%{github_commit}
%patch0 -p1 -b .upstream
: Set PHP directory in phpab template : Set PHP directory in phpab template
sed "s#___AUTOLOAD_PATH___#'%{phpdir}/Fedora/Autoloader'#" \ sed "s#___AUTOLOAD_PATH___#'%{phpdir}/Fedora/Autoloader'#" \
-i res/phpab/fedora.php.tpl -i res/phpab/fedora.php.tpl
@ -143,6 +139,10 @@ fi
%changelog %changelog
* Wed Oct 26 2016 Shawn Iwinski <shawn@iwin.ski> - 0.2.0-1
- Update to 0.2.0
- Remove applied patches that are included in 0.2.0
* Tue Oct 25 2016 Remi Collet <remi@fedoraproject.org> - 0.1.2-3 * Tue Oct 25 2016 Remi Collet <remi@fedoraproject.org> - 0.1.2-3
- rename 1 method to avoid conflicts with symfony - rename 1 method to avoid conflicts with symfony

@ -1 +1 @@
94215a2579245ae72f28714e6db3f876 php-fedora-autoloader-0.1.2-35f7b52f4682276620369bc4bc1a3a5fef93faad.tar.gz 4e5d726cdc95d6a2560643c4d1173a49 php-fedora-autoloader-0.2.0-acadcf9f2511ac7b777117eb66728f95faabbe99.tar.gz

Loading…
Cancel
Save