diff options
-rw-r--r-- | composer.json | 37 | ||||
-rw-r--r-- | php-doctrine-migrations.spec | 97 |
2 files changed, 89 insertions, 45 deletions
diff --git a/composer.json b/composer.json index 3217b5c..d9cf727 100644 --- a/composer.json +++ b/composer.json @@ -1,8 +1,8 @@ { "name": "doctrine/migrations", "type": "library", - "description": "Database Schema migrations using Doctrine DBAL", - "keywords": ["migrations", "database"], + "description": "PHP Doctrine Migrations project offer additional functionality on top of the database abstraction layer (DBAL) for versioning your database schema and easily deploying changes to it. It is a very easy to use and a powerful tool.", + "keywords": ["php", "database", "migrations", "dbal"], "homepage": "https://www.doctrine-project.org/projects/migrations.html", "license": "MIT", "authors": [ @@ -12,18 +12,25 @@ ], "require": { "php": "^7.1", - "doctrine/dbal": "~2.6", - "symfony/console": "~3.3|^4.0", - "ocramius/proxy-manager": "^1.0|^2.0" + "doctrine/dbal": "^2.6", + "ocramius/package-versions": "^1.3", + "ocramius/proxy-manager": "^2.0.2", + "symfony/console": "^3.4||^4.0", + "symfony/stopwatch": "^3.4||^4.0" }, "require-dev": { - "doctrine/orm": "~2.5", - "symfony/yaml": "~3.3|^4.0", - "phpunit/phpunit": "~7.0", - "doctrine/coding-standard": "^1.0", - "jdorn/sql-formatter": "~1.1", + "ext-pdo_sqlite": "*", + "doctrine/coding-standard": "^5.0", + "doctrine/orm": "^2.6", + "jdorn/sql-formatter": "^1.1", "mikey179/vfsStream": "^1.6", - "squizlabs/php_codesniffer": "^3.0" + "phpstan/phpstan": "^0.10", + "phpstan/phpstan-deprecation-rules": "^0.10", + "phpstan/phpstan-phpunit": "^0.10", + "phpstan/phpstan-strict-rules": "^0.10", + "phpunit/phpunit": "^7.0", + "symfony/process": "^3.4||^4.0", + "symfony/yaml": "^3.4||^4.0" }, "suggest": { "jdorn/sql-formatter": "Allows to generate formatted SQL with the diff command.", @@ -31,18 +38,20 @@ }, "autoload": { "psr-4": { - "Doctrine\\DBAL\\Migrations\\": "lib/Doctrine/DBAL/Migrations", "Doctrine\\Migrations\\": "lib/Doctrine/Migrations" } }, "autoload-dev": { "psr-4": { - "Doctrine\\DBAL\\Migrations\\Tests\\": "tests/Doctrine/DBAL/Migrations/Tests" + "Doctrine\\Migrations\\Tests\\": "tests/Doctrine/Migrations/Tests" } }, + "config": { + "sort-packages": true + }, "extra": { "branch-alias": { - "dev-master": "v1.8.x-dev" + "dev-master": "2.0.x-dev" } }, "bin": [ diff --git a/php-doctrine-migrations.spec b/php-doctrine-migrations.spec index b3ed72c..045d917 100644 --- a/php-doctrine-migrations.spec +++ b/php-doctrine-migrations.spec @@ -8,7 +8,7 @@ # %global bootstrap 0 -%global gh_commit 215438c0eef3e5f9b7da7d09c6b90756071b43e6 +%global gh_commit 0101f5bd7f4e5043bf8630db2930f8fd7da552b6 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner doctrine %global gh_project migrations @@ -25,8 +25,8 @@ %endif Name: php-%{pk_vendor}-%{pk_project} -Version: 1.8.1 -Release: 2%{?dist} +Version: 2.0.0 +Release: 1%{?dist} Summary: PHP Doctrine Migrations project License: MIT @@ -34,6 +34,9 @@ URL: https://github.com/%{gh_owner}/%{gh_project} Source0: %{name}-%{version}-%{gh_short}.tgz Source1: makesrc.sh +# get rid of ocramius/package-versions +Patch0: %{name}-rpm.patch + BuildArch: noarch BuildRequires: php-fedora-autoloader-devel %if %{with_tests} @@ -50,28 +53,37 @@ BuildRequires: php-spl # remirepo:1 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 BuildRequires: (php-composer(doctrine/dbal) >= 2.6 with php-composer(doctrine/dbal) < 3) -BuildRequires: (php-composer(symfony/console) >= 3.3 with php-composer(symfony/console) < 5) -BuildRequires: (php-composer(ocramius/proxy-manager) >= 2.0 with php-composer(ocramius/proxy-manager) < 3) +BuildRequires: (php-composer(symfony/console) >= 3.4 with php-composer(symfony/console) < 5) +BuildRequires: (php-composer(symfony/stopwatch) >= 3.4 with php-composer(symfony/stopwatch) < 5) +BuildRequires: (php-composer(ocramius/proxy-manager) >= 2.0.2 with php-composer(ocramius/proxy-manager) < 3) # From composer.json # "require-dev": { -# "doctrine/orm": "~2.5", -# "symfony/yaml": "~3.3|^4.0", -# "phpunit/phpunit": "~7.0", -# "doctrine/coding-standard": "^1.0", -# "jdorn/sql-formatter": "~1.1", +# "ext-pdo_sqlite": "*", +# "doctrine/coding-standard": "^5.0", +# "doctrine/orm": "^2.6", +# "jdorn/sql-formatter": "^1.1", # "mikey179/vfsStream": "^1.6", -# "squizlabs/php_codesniffer": "^3.0" -BuildRequires: (php-composer(doctrine/orm) >= 2.5 with php-composer(doctrine/orm) < 3) -BuildRequires: (php-composer(symfony/yaml) >= 3.3 with php-composer(symfony/yaml) < 5) +# "phpstan/phpstan": "^0.10", +# "phpstan/phpstan-deprecation-rules": "^0.10", +# "phpstan/phpstan-phpunit": "^0.10", +# "phpstan/phpstan-strict-rules": "^0.10", +# "phpunit/phpunit": "^7.0", +# "symfony/process": "^3.4||^4.0", +# "symfony/yaml": "^3.4||^4.0" +BuildRequires: php-pdo_sqlite +BuildRequires: (php-composer(doctrine/orm) >= 2.6 with php-composer(doctrine/orm) < 3) +BuildRequires: (php-composer(symfony/process) >= 3.4 with php-composer(symfony/process) < 5) +BuildRequires: (php-composer(symfony/yaml) >= 3.4 with php-composer(symfony/yaml) < 5) BuildRequires: (php-composer(jdorn/sql-formatter) >= 1.1 with php-composer(jdorn/sql-formatter) < 2) BuildRequires: (php-composer(mikey179/vfsStream) >= 1.6 with php-composer(mikey179/vfsStream) < 2) # remirepo:14 %else -BuildRequires: php-composer(doctrine/dbal) < 3 -BuildRequires: php-composer(doctrine/dbal) >= 2.6 -BuildRequires: php-symfony3-console >= 3.3 +BuildRequires: php-composer(doctrine/orm) < 3 +BuildRequires: php-composer(doctrine/orm) >= 2.6 +BuildRequires: php-symfony3-console >= 3.4 +BuildRequires: php-symfony3-stopwatch >= 3.4 BuildRequires: php-composer(ocramius/proxy-manager) < 3 -BuildRequires: php-composer(ocramius/proxy-manager) >= 2.0 +BuildRequires: php-composer(ocramius/proxy-manager) >= 2.0.2 BuildRequires: php-composer(doctrine/orm) < 3 BuildRequires: php-composer(doctrine/orm) >= 2.5 BuildRequires: php-symfony3-yaml >= 3.3 @@ -86,9 +98,11 @@ BuildRequires: phpunit7 # From composer.json # "require": { # "php": "^7.1", -# "doctrine/dbal": "~2.6", -# "symfony/console": "~3.3|^4.0", -# "ocramius/proxy-manager": "^1.0|^2.0" +# "doctrine/dbal": "^2.6", +# "ocramius/package-versions": "^1.3", +# "ocramius/proxy-manager": "^2.0.2", +# "symfony/console": "^3.4||^4.0", +# "symfony/stopwatch": "^3.4||^4.0" # "suggest": { # "jdorn/sql-formatter": "Allows to generate formatted SQL with the diff command.", # "symfony/yaml": "Allows the use of yaml for migration configuration files." @@ -97,17 +111,19 @@ Requires: php(language) >= 7.1 # remirepo:1 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 Requires: (php-composer(doctrine/dbal) >= 2.6 with php-composer(doctrine/dbal) < 3) -Requires: (php-composer(symfony/console) >= 3.3 with php-composer(symfony/console) < 5) -Requires: (php-composer(ocramius/proxy-manager) >= 2.0 with php-composer(ocramius/proxy-manager) < 3) +Requires: (php-composer(symfony/console) >= 3.4 with php-composer(symfony/console) < 5) +Requires: (php-composer(symfony/stopwatch) >= 3.4 with php-composer(symfony/stopwatch) < 5) +Requires: (php-composer(ocramius/proxy-manager) >= 2.0.2 with php-composer(ocramius/proxy-manager) < 3) Recommends: (php-composer(mikey179/vfsStream) >= 1.6 with php-composer(mikey179/vfsStream) < 2) Recommends: (php-composer(symfony/yaml) >= 3.3 with php-composer(symfony/yaml) < 5) # remirepo:7 %else Requires: php-composer(doctrine/dbal) < 3 Requires: php-composer(doctrine/dbal) >= 2.6 -Requires: php-symfony3-console >= 3.3 +Requires: php-symfony3-console >= 3.4 +Requires: php-symfony3-stopwatch >= 3.4 Requires: php-composer(ocramius/proxy-manager) < 3 -Requires: php-composer(ocramius/proxy-manager) >= 2.0 +Requires: php-composer(ocramius/proxy-manager) >= 2.0.2 %endif # From phpcompatinfo report for version 1.8.1 Requires: php-simplexml @@ -137,14 +153,22 @@ Autoloader: %{_datadir}/php/%{ns_vendor}/DBAL/%{ns_project}/autoload.php %prep %setup -q -n %{gh_project}-%{gh_commit} +: Cleanup to get rid of ocramius/package-versions +%patch0 -p1 -b .rpm +sed -e 's/@VERSION@/%{version}/' -i \ + lib/%{ns_vendor}/%{ns_project}/Tools/Console/ConsoleRunner.php \ + tests/%{ns_vendor}/%{ns_project}/Tests/Functional/CliTest.php +grep 'new Application' lib/%{ns_vendor}/%{ns_project}/Tools/Console/ConsoleRunner.php +find lib -name \*.rpm -delete -print + %build : Generate a simple autoloader %{_bindir}/phpab \ - --output lib/%{ns_vendor}/DBAL/%{ns_project}/autoload.php \ + --output lib/%{ns_vendor}/%{ns_project}/autoload.php \ --template fedora \ lib/%{ns_vendor} -cat << 'EOF' | tee -a lib/%{ns_vendor}/DBAL/%{ns_project}/autoload.php +cat << 'EOF' | tee -a lib/%{ns_vendor}/%{ns_project}/autoload.php // Dependencies \Fedora\Autoloader\Dependencies::required([ @@ -153,11 +177,19 @@ cat << 'EOF' | tee -a lib/%{ns_vendor}/DBAL/%{ns_project}/autoload.php '%{_datadir}/php/Symfony4/Component/Console/autoload.php', '%{_datadir}/php/Symfony3/Component/Console/autoload.php', ], + [ + '%{_datadir}/php/Symfony4/Component/Stopwatch/autoload.php', + '%{_datadir}/php/Symfony3/Component/Stopwatch/autoload.php', + ], '%{_datadir}/php/ProxyManager/autoload.php', ]); \Fedora\Autoloader\Dependencies::optional([ '%{_datadir}/php/jdorn-sql-formatter/autoload.php', [ + '%{_datadir}/php/Symfony4/Component/Process/autoload.php', + '%{_datadir}/php/Symfony3/Component/Process/autoload.php', + ], + [ '%{_datadir}/php/Symfony4/Component/Yaml/autoload.php', '%{_datadir}/php/Symfony3/Component/Yaml/autoload.php', ], @@ -168,7 +200,6 @@ EOF %install mkdir -p %{buildroot}%{_datadir}/php/%{ns_vendor} cp -pr lib/%{ns_vendor}/%{ns_project} %{buildroot}%{_datadir}/php/%{ns_vendor}/%{ns_project} -cp -pr lib/%{ns_vendor}/DBAL %{buildroot}%{_datadir}/php/%{ns_vendor}/DBAL %check @@ -182,14 +213,14 @@ mkdir vendor cat << 'EOF' | tee -a vendor/autoload.php \Fedora\Autoloader\Dependencies::required([ - '%{buildroot}%{_datadir}/php/%{ns_vendor}/DBAL/%{ns_project}/autoload.php', + '%{buildroot}%{_datadir}/php/%{ns_vendor}/%{ns_project}/autoload.php', '%{_datadir}/php/%{ns_vendor}/ORM/autoload.php', '%{_datadir}/php/org/bovigo/vfs/autoload.php', ]); EOF # need investigation (migrations directory deleted during test suite?) -chmod -w tests/Doctrine/DBAL/Migrations/Tests/Functional/_files +chmod -w tests/Doctrine/Migrations/Tests/Functional/_files : Run test suite ret=0 @@ -202,7 +233,7 @@ for cmd in php php71 php72 php73; do done # restore -chmod +w tests/Doctrine/DBAL/Migrations/Tests/Functional/_files +chmod +w tests/Doctrine/Migrations/Tests/Functional/_files exit $ret %else @@ -217,10 +248,14 @@ exit $ret %doc *.md %doc composer.json %{_datadir}/php/%{ns_vendor}/%{ns_project}/ -%{_datadir}/php/%{ns_vendor}/DBAL/%{ns_project} %changelog +* Wed Mar 27 2019 Remi Collet <remi@remirepo.net> - 2.0.0-1 +- update to 2.0.0 +- raise dependency on symfony 3.4 +- add dependency on symfony/stopwatch 3.4 + * Thu Jan 3 2019 Remi Collet <remi@remirepo.net> - 1.8.1-2 - move autoloader in Doctrine/DBAL/Migration for compatibility with version 1.5.0 |