summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2022-12-20 10:06:11 +0100
committerRemi Collet <remi@php.net>2022-12-20 10:06:11 +0100
commit8ea28cf38773df58268dafe61f13a654432dbfb1 (patch)
tree60dbc08e9b46f02c3aefaae88ff4a3cd24b2cbaa
parent6f30034c9086f8511a595a0e3445bc28aea94da1 (diff)
update to 2.0.0
rename to php-doctrine-annotations2 install in /usr/share/php/Doctrine/Common/Annotations2 switch to classmap autoloader raise dependency on PHP 7.2 raise dependency on doctrine/lexer 2 or 3
-rw-r--r--composer.json12
-rw-r--r--php-doctrine-annotations2.spec78
2 files changed, 48 insertions, 42 deletions
diff --git a/composer.json b/composer.json
index e322d82..d1d3d8d 100644
--- a/composer.json
+++ b/composer.json
@@ -32,17 +32,17 @@
],
"homepage": "https://www.doctrine-project.org/projects/annotations.html",
"require": {
- "php": "^7.1 || ^8.0",
+ "php": "^7.2 || ^8.0",
"ext-tokenizer": "*",
- "doctrine/lexer": "^1 || ^2",
+ "doctrine/lexer": "^2 || ^3",
"psr/cache": "^1 || ^2 || ^3"
},
"require-dev": {
- "doctrine/cache": "^1.11 || ^2.0",
- "doctrine/coding-standard": "^9 || ^10",
- "phpstan/phpstan": "~1.4.10 || ^1.8.0",
+ "doctrine/cache": "^2.0",
+ "doctrine/coding-standard": "^10",
+ "phpstan/phpstan": "^1.8.0",
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.5",
- "symfony/cache": "^4.4 || ^5.4 || ^6",
+ "symfony/cache": "^5.4 || ^6",
"vimeo/psalm": "^4.10"
},
"suggest": {
diff --git a/php-doctrine-annotations2.spec b/php-doctrine-annotations2.spec
index 2e0f97d..ea68820 100644
--- a/php-doctrine-annotations2.spec
+++ b/php-doctrine-annotations2.spec
@@ -1,8 +1,6 @@
-# remirepo spec file for php-doctrine-annotations, from:
+# Fedora/remirepo spec file for php-doctrine-annotations2
#
-# Fedora spec file for php-doctrine-annotations
-#
-# Copyright (c) 2013-2022 Shawn Iwinski <shawn.iwinski@gmail.com>
+# Copyright (c) 2013-2022 Remi Collet, Shawn Iwinski
#
# License: MIT
# http://opensource.org/licenses/MIT
@@ -15,33 +13,35 @@
%global github_owner doctrine
%global github_name annotations
-%global github_version 1.14.2
-%global github_commit ad785217c1e9555a7d6c6c8c9f406395a5e2882b
+%global github_version 2.0.0
+%global github_commit d02c9f3742044e17d5fa8d28d8402a2d95c33302
+%global major 2
%global composer_vendor doctrine
%global composer_project annotations
-# "php": "^7.1 || ^8.0"
-%global php_min_ver 7.1
-# "doctrine/cache": "^1.11 || ^2."
+# "php": "^7.2 || ^8.0"
+%global php_min_ver 7.2
+# "doctrine/cache": "^2.0"
+# ignore min version for now
%global cache_min_ver 1.11
%global cache_max_ver 3
-# "doctrine/lexer": "^1 || ^2"
-# NOTE: Min version not 1.0 because autoloader required
-%global lexer_min_ver 1.0.1
-%global lexer_max_ver 3
+# "doctrine/lexer": "^2 || ^3"
+%global lexer_min_ver 2
+%global lexer_max_ver 4
# "psr/cache": "^1 || ^2 || ^3"
%global psr_cache_min_ver 1
# only v1 is available for now
%global psr_cache_max_ver 2
-# "symfony/cache": "^4.4 || ^5.2"
+# "symfony/cache": "^5.4 || ^6.0"
+# ignore min version for now
%global symfony_min_ver 4.4
-%global symfony_max_ver 6
+%global symfony_max_ver 7
%{!?phpdir: %global phpdir %{_datadir}/php}
-Name: php-%{composer_vendor}-%{composer_project}
+Name: php-%{composer_vendor}-%{composer_project}%{major}
Version: %{github_version}
Release: 1%{?github_release}%{?dist}
Summary: PHP docblock annotations parser library
@@ -69,8 +69,8 @@ BuildRequires:(php-composer(symfony/cache) >= %{symfony_min_ver} with php-compos
%else
BuildRequires: php-doctrine-cache < %{cache_max_ver}
BuildRequires: php-doctrine-cache >= %{cache_min_ver}
-BuildRequires: php-doctrine-lexer < %{lexer_max_ver}
-BuildRequires: php-doctrine-lexer >= %{lexer_min_ver}
+BuildRequires: php-doctrine-lexer2 < %{lexer_max_ver}
+BuildRequires: php-doctrine-lexer2 >= %{lexer_min_ver}
BuildRequires: php-psr-cache >= %{psr_cache_min_ver}
BuildRequires: php-symfony4-cache >= %{symfony_min_ver}
%endif
@@ -89,7 +89,7 @@ BuildRequires: php-spl
BuildRequires: php-tokenizer
%endif
# Autoloader
-BuildRequires: php-composer(fedora/autoloader)
+BuildRequires: php-fedora-autoloader-devel
# composer.json
Requires: php(language) >= %{php_min_ver}
@@ -100,8 +100,8 @@ Requires: (php-composer(doctrine/lexer) >= %{lexer_min_ver} with php-compose
Requires: (php-composer(psr/cache) >= %{psr_cache_min_ver} with php-composer(psr/cache) < %{psr_cache_max_ver})
# remirepo:6
%else
-Requires: php-doctrine-lexer < %{lexer_max_ver}
-Requires: php-doctrine-lexer >= %{lexer_min_ver}
+Requires: php-doctrine-lexer2 < %{lexer_max_ver}
+Requires: php-doctrine-lexer2 >= %{lexer_min_ver}
Requires: php-psr-cache < %{psr_cache_max_ver}
Requires: php-psr-cache >= %{psr_cache_min_ver}
%endif
@@ -124,7 +124,7 @@ Conflicts: php-pear(pear.doctrine-project.org/DoctrineCommon) < 2.4
%description
%{summary} (extracted from Doctrine Common).
-Autoloader: %{phpdir}/Doctrine/Common/Annotations/autoload.php
+Autoloader: %{phpdir}/Doctrine/Common/Annotations%{major}/autoload.php
%prep
@@ -132,21 +132,18 @@ Autoloader: %{phpdir}/Doctrine/Common/Annotations/autoload.php
%build
-: Create autoloader
-cat <<'AUTOLOAD' | tee lib/Doctrine/Common/Annotations/autoload.php
-<?php
-/**
- * Autoloader for %{name} and its' dependencies
- * (created by %{name}-%{version}-%{release}).
- */
-require_once '%{phpdir}/Fedora/Autoloader/autoload.php';
+: Generate a simple autoloader
+%{_bindir}/phpab \
+ --output lib/Doctrine/Common/Annotations/autoload.php \
+ --template fedora \
+ lib/Doctrine/Common/Annotations
-\Fedora\Autoloader\Autoload::addPsr4('Doctrine\\Common\\Annotations\\', __DIR__);
+cat <<'AUTOLOAD' | tee -a lib/Doctrine/Common/Annotations/autoload.php
\Fedora\Autoloader\Dependencies::required([
[
+ '%{phpdir}/Doctrine/Common/Lexer3/autoload.php',
'%{phpdir}/Doctrine/Common/Lexer2/autoload.php',
- '%{phpdir}/Doctrine/Common/Lexer/autoload.php',
],
'%{phpdir}/Psr/Cache/autoload.php',
]);
@@ -154,8 +151,8 @@ AUTOLOAD
%install
-mkdir -p %{buildroot}%{phpdir}
-cp -rp lib/* %{buildroot}%{phpdir}/
+mkdir -p %{buildroot}%{phpdir}/Doctrine/Common
+cp -rp lib/Doctrine/Common/Annotations %{buildroot}%{phpdir}/Doctrine/Common/Annotations%{major}
%check
@@ -164,12 +161,13 @@ cp -rp lib/* %{buildroot}%{phpdir}/
mkdir vendor
cat <<'BOOTSTRAP' | tee vendor/autoload.php
<?php
-require_once '%{buildroot}%{phpdir}/Doctrine/Common/Annotations/autoload.php';
+require_once '%{buildroot}%{phpdir}/Doctrine/Common/Annotations%{major}/autoload.php';
\Fedora\Autoloader\Dependencies::required([
[
'%{phpdir}/Doctrine/Common/Cache2/autoload.php',
'%{phpdir}/Doctrine/Common/Cache/autoload.php',
], [
+ '%{phpdir}/Symfony6/Component/Cache/autoload.php',
'%{phpdir}/Symfony5/Component/Cache/autoload.php',
'%{phpdir}/Symfony4/Component/Cache/autoload.php',
],
@@ -201,10 +199,18 @@ exit $RETURN_CODE
%license LICENSE
%doc *.md
%doc composer.json
-%{phpdir}/Doctrine/Common/Annotations
+%{phpdir}/Doctrine/Common/Annotations%{major}
%changelog
+* Tue Dec 20 2022 Remi Collet <remi@remirepo.net> - 2.0.0-1
+- update to 2.0.0
+- rename to php-doctrine-annotations2
+- install in /usr/share/php/Doctrine/Common/Annotations2
+- switch to classmap autoloader
+- raise dependency on PHP 7.2
+- raise dependency on doctrine/lexer 2 or 3
+
* Tue Dec 20 2022 Remi Collet <remi@remirepo.net> - 1.14.2-1
- update to 1.14.2