diff options
-rw-r--r-- | composer.json | 5 | ||||
-rw-r--r-- | php-doctrine-persistence2.spec | 38 |
2 files changed, 27 insertions, 16 deletions
diff --git a/composer.json b/composer.json index d750c30..b914d79 100644 --- a/composer.json +++ b/composer.json @@ -30,7 +30,8 @@ "require-dev": { "phpstan/phpstan": "^0.11", "doctrine/coding-standard": "^6.0", - "phpunit/phpunit": "^7.0" + "phpunit/phpunit": "^7.0", + "vimeo/psalm": "^3.11" }, "conflict": { "doctrine/common": "<2.10@dev" @@ -49,7 +50,7 @@ }, "extra": { "branch-alias": { - "dev-master": "1.3.x-dev" + "dev-master": "2.x-dev" } } } diff --git a/php-doctrine-persistence2.spec b/php-doctrine-persistence2.spec index 38ce37b..345a413 100644 --- a/php-doctrine-persistence2.spec +++ b/php-doctrine-persistence2.spec @@ -1,4 +1,4 @@ -# remirepo/fedora spec file for php-doctrine-persistence +# remirepo/fedora spec file for php-doctrine-persistence2 # # Copyright (c) 2018-2020 Remi Collet # License: CC-BY-SA @@ -8,10 +8,11 @@ # %global bootstrap 0 -%global gh_commit 0af483f91bada1c9ded6c2cfd26ab7d5ab2094e0 +%global gh_commit 1dee036f22cd5dc0bc12132f1d1c38415907be55 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner doctrine %global gh_project persistence +%global major 2 # packagist %global pk_vendor %{gh_owner} %global pk_project %{gh_project} @@ -25,8 +26,8 @@ %global with_tests 0%{!?_without_tests:1} %endif -Name: php-%{pk_vendor}-%{pk_project} -Version: 1.3.7 +Name: php-%{pk_vendor}-%{pk_project}%{major} +Version: 2.0.0 Release: 1%{?dist} Summary: Doctrine Persistence abstractions @@ -45,7 +46,8 @@ BuildRequires: php-spl # From composer.json # "phpstan/phpstan": "^0.11", # "doctrine/coding-standard": "^6.0", -# "phpunit/phpunit": "^7.0" +# "phpunit/phpunit": "^7.0", +# "vimeo/psalm": "^3.11" # remirepo:1 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 BuildRequires: (php-composer(doctrine/annotations) >= 1.0 with php-composer(doctrine/annotations) < 2) @@ -114,20 +116,25 @@ Conflicts: php-doctrine-common < 1:2.10 The Doctrine Persistence project is a set of shared interfaces and functionality that the different Doctrine object mappers share. -Autoloader: %{_datadir}/php/%{ns_vendor}/%{ns_subproj}/autoload.php +Autoloader: %{_datadir}/php/%{ns_vendor}/%{ns_subproj}%{major}/autoload.php %prep %setup -q -n %{gh_project}-%{gh_commit} +mv lib/%{ns_vendor}/%{ns_subproj} \ + lib/%{ns_vendor}/%{ns_subproj}%{major} +mv lib/%{ns_vendor}/%{ns_project}/%{ns_subproj} \ + lib/%{ns_vendor}/%{ns_project}/%{ns_subproj}%{major} + %build : Generate a simple autoloader %{_bindir}/phpab \ - --output lib/%{ns_vendor}/%{ns_subproj}/autoload.php \ + --output lib/%{ns_vendor}/%{ns_subproj}%{major}/autoload.php \ --template fedora \ lib/%{ns_vendor} -cat << 'EOF' | tee -a lib/%{ns_vendor}/%{ns_subproj}/autoload.php +cat << 'EOF' | tee -a lib/%{ns_vendor}/%{ns_subproj}%{major}/autoload.php // Dependencies \Fedora\Autoloader\Dependencies::required([ @@ -143,8 +150,6 @@ EOF %install mkdir -p %{buildroot}%{_datadir}/php cp -pr lib/%{ns_vendor} %{buildroot}%{_datadir}/php/%{ns_vendor} -ln -s ../../%{ns_subproj}/autoload.php \ - %{buildroot}%{_datadir}/php/%{ns_vendor}/%{ns_project}/%{ns_subproj}/autoload.php %check @@ -157,7 +162,7 @@ mkdir vendor tests cat << 'EOF' | tee -a vendor/autoload.php -require "%{buildroot}%{_datadir}/php/%{ns_vendor}/%{ns_project}/%{ns_subproj}/autoload.php"; +require "%{buildroot}%{_datadir}/php/%{ns_vendor}/%{ns_subproj}%{major}/autoload.php"; EOF # we don't want PHPStan (which pull nette framework) @@ -165,7 +170,7 @@ find tests -type f -exec grep -q PHPStan {} \; -delete -print : Run test suite ret=0 -for cmd in php php71 php72 php73 php74; do +for cmd in php php72 php73 php74 php80; do if which $cmd; then $cmd %{_bindir}/phpunit7 \ --bootstrap vendor/autoload.php \ @@ -183,11 +188,16 @@ exit $ret %license LICENSE %doc *.md %doc composer.json -%{_datadir}/php/%{ns_vendor}/%{ns_project}/* -%{_datadir}/php/%{ns_vendor}/%{ns_subproj} +%{_datadir}/php/%{ns_vendor}/%{ns_project}/%{ns_subproj}%{major} +%{_datadir}/php/%{ns_vendor}/%{ns_subproj}%{major} %changelog +* Thu May 14 2020 Remi Collet <remi@remirepo.net> - 2.0.0-1 +- update to 2.0.0 +- rename to php-doctrine-persistence2 +- install in /usr/share/php/Doctrine/Persistence2 + * Mon Mar 23 2020 Remi Collet <remi@remirepo.net> - 1.3.7-1 - update to 1.3.7 (no change) - raise dependency on doctrine/reflection 1.2 |