From 2c2aa05823b3e726aead850b9b6fdae901a9baa9 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 31 Oct 2016 18:15:29 +0100 Subject: php-andrewsville-php-token-reflection: add autooader --- composer.json | 30 ++++++++++++++++++++++++++++++ php-andrewsville-php-token-reflection.spec | 29 +++++++++++++++++++++-------- 2 files changed, 51 insertions(+), 8 deletions(-) create mode 100644 composer.json diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..1569e61 --- /dev/null +++ b/composer.json @@ -0,0 +1,30 @@ +{ + "name": "andrewsville/php-token-reflection", + "type": "library", + "description": "Library emulating the PHP internal reflection using just the tokenized source code.", + "keywords": ["library", "tokenizer", "reflection"], + "homepage": "http://andrewsville.github.com/PHP-Token-Reflection/", + "license": "BSD-3", + + "authors": [ + { + "name": "Ondřej Nešpor", + "homepage": "https://github.com/Andrewsville" + }, + { + "name": "Jaroslav Hanslík", + "homepage": "https://github.com/kukulich" + } + ], + + "require": { + "php": ">=5.3.0", + "ext-tokenizer": "*" + }, + + "autoload": { + "psr-0": { + "TokenReflection": "./" + } + } +} diff --git a/php-andrewsville-php-token-reflection.spec b/php-andrewsville-php-token-reflection.spec index 10d82ae..09a1740 100644 --- a/php-andrewsville-php-token-reflection.spec +++ b/php-andrewsville-php-token-reflection.spec @@ -14,7 +14,7 @@ Name: php-andrewsville-php-token-reflection Version: 1.4.0 -Release: 2%{?dist} +Release: 5%{?dist} Summary: Library emulating the PHP internal reflection Group: Development/Libraries @@ -28,8 +28,9 @@ Source1: makesrc.sh BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: php(language) >= 5.3 +# Autoloader +BuildRequires: php-composer(fedora/autoloader) %if %{with_tests} -BuildRequires: %{_bindir}/phpab BuildRequires: %{_bindir}/phpunit %endif @@ -43,6 +44,8 @@ Requires: php-pcre Requires: php-phar Requires: php-reflection Requires: php-spl +# Autoloader +Requires: php-composer(fedora/autoloader) Provides: php-composer(andrewsville/php-token-reflection) = %{version} @@ -50,12 +53,22 @@ Provides: php-composer(andrewsville/php-token-reflection) = %{version} %description This library emulates the PHP reflection model using the tokenized PHP source. +Autoloader: %{_datadir}/php/TokenReflection/autoload.php + + %prep %setup -q -n %{gh_project}-%{gh_commit} %build -# Nothing +cat << 'EOF' | tee TokenReflection/autoload.php + - 1.4.0-5 +- add autoloader using fedora/autoloader + * Mon May 4 2015 Remi Collet - 1.4.0-2 - add mksrc.sh as source1, per review comment #1207591 * Tue Mar 31 2015 Remi Collet - 1.4.0-1 -- initial package \ No newline at end of file +- initial package -- cgit