From 8a3e46fd25277f870dc3b4210a3e81005a75bc0a Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 10 Apr 2020 07:48:13 +0200 Subject: update to 0.12.0 raise dependency on PHP 7.2 switch to cakephp v4 switch to phpunit v8 --- composer.json | 10 ++++++---- phinx-autoload.php | 4 ++-- phinx.spec | 45 +++++++++++++++++++++++++-------------------- 3 files changed, 33 insertions(+), 26 deletions(-) diff --git a/composer.json b/composer.json index dbb6392..c61d7a7 100644 --- a/composer.json +++ b/composer.json @@ -25,15 +25,15 @@ "homepage": "https://github.com/cakephp/phinx/graphs/contributors" }], "require": { - "php": ">=5.6", - "cakephp/collection": "^3.7", - "cakephp/database": "^3.7", + "php": ">=7.2", + "cakephp/collection": "^4.0", + "cakephp/database": "^4.0", "symfony/console": "^3.4|^4.0|^5.0", "symfony/config": "^3.4|^4.0|^5.0" }, "require-dev": { "ext-json": "*", - "phpunit/phpunit": ">=5.7,<8.0", + "phpunit/phpunit": "^8.5", "sebastian/comparator": ">=1.2.3", "cakephp/cakephp-codesniffer": "^3.0", "symfony/yaml": "^3.4|^4.0|^5.0" @@ -59,6 +59,8 @@ ], "cs-check": "phpcs --colors -p --standard=vendor/cakephp/cakephp-codesniffer/CakePHP --ignore=/tests/Phinx/Config/_rootDirectories/,/tests/log/ src/ tests/ app/", "cs-fix": "phpcbf --colors -p --standard=vendor/cakephp/cakephp-codesniffer/CakePHP --ignore=/tests/Phinx/Config/_rootDirectories/,/tests/log/ src/ tests/ app/", + "stan": "phpstan analyse src/", + "stan-setup": "cp composer.json composer.backup && composer require --dev phpstan/phpstan:^0.12 && mv composer.backup composer.json", "test": "phpunit --colors=always" }, "bin": ["bin/phinx"] diff --git a/phinx-autoload.php b/phinx-autoload.php index 1398bbb..f46128b 100644 --- a/phinx-autoload.php +++ b/phinx-autoload.php @@ -5,8 +5,8 @@ require_once '/usr/share/php/Fedora/Autoloader/autoload.php'; \Fedora\Autoloader\Autoload::addPsr4('Phinx\\', __DIR__); \Fedora\Autoloader\Dependencies::required(array( - '/usr/share/php/Cake/Collection/autoload.php', - '/usr/share/php/Cake/Database/autoload.php', + '/usr/share/php/Cake4/Collection/autoload.php', + '/usr/share/php/Cake4/Database/autoload.php', [ '/usr/share/php/Symfony5/Component/Console/autoload.php', '/usr/share/php/Symfony4/Component/Console/autoload.php', diff --git a/phinx.spec b/phinx.spec index f9274c5..df7dcba 100644 --- a/phinx.spec +++ b/phinx.spec @@ -10,7 +10,7 @@ # For compatibility with SCL %undefine __brp_mangle_shebangs -%global gh_commit 6bac1f51c8e35201ec281e842e6ae6dbe066212f +%global gh_commit 415000ce988af20c2e4a8110f32171975f31743e %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner robmorgan #global gh_date 20150820 @@ -19,7 +19,7 @@ %global with_tests 0%{!?_without_tests:1} Name: %{gh_project} -Version: 0.11.6 +Version: 0.12.0 Release: 1%{?gh_date?%{gh_date}git%{gh_short}}%{?dist} Summary: Manage the database migrations for your PHP app @@ -34,17 +34,16 @@ Patch0: %{name}-version.patch BuildArch: noarch %if %{with_tests} -# Because we use PHPUnit 7 -BuildRequires: php(language) >= 7.1 +BuildRequires: php(language) >= 7.2 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 -BuildRequires: (php-composer(cakephp/collection) >= 3.7 with php-composer(cakephp/collection) < 4) -BuildRequires: (php-composer(cakephp/database) >= 3.7 with php-composer(cakephp/database) < 4) +BuildRequires: (php-composer(cakephp/collection) >= 4.0 with php-composer(cakephp/collection) < 5) +BuildRequires: (php-composer(cakephp/database) >= 4.0 with php-composer(cakephp/database) < 5) BuildRequires: (php-composer(symfony/console) >= 3.4 with php-composer(symfony/console) < 6) BuildRequires: (php-composer(symfony/config) >= 3.4 with php-composer(symfony/config) < 6) BuildRequires: (php-composer(symfony/yaml) >= 3.4 with php-composer(symfony/yaml) < 6) %else -BuildRequires: php-cakephp-collection >= 3.7 -BuildRequires: php-cakephp-database >= 3.7 +BuildRequires: php-cakephp4-collection +BuildRequires: php-cakephp4-database BuildRequires: php-symfony3-console >= 3.4 BuildRequires: php-symfony3-config >= 3.4 BuildRequires: php-symfony3-yaml >= 3.4 @@ -56,35 +55,35 @@ BuildRequires: php-pcre BuildRequires: php-spl # For tests, from composer.json "require-dev": { # "ext-json": "*", -# "phpunit/phpunit": ">=5.7,<8.0", +# "phpunit/phpunit": ^8.5", # "sebastian/comparator": ">=1.2.3", # "cakephp/cakephp-codesniffer": "^3.0", # "symfony/yaml": "^3.4|^4.0|^5.0" -%global phpunit %{_bindir}/phpunit7 -BuildRequires: phpunit7 +%global phpunit %{_bindir}/phpunit8 +BuildRequires: phpunit8 %endif # For autoloader BuildRequires: php-composer(fedora/autoloader) # From composer.json, "require": { -# "php": ">=5.6", -# "cakephp/collection": "^3.7", -# "cakephp/database": "^3.7", +# "php": ">=7.2", +# "cakephp/collection": "^4.0", +# "cakephp/database": "^4.0", # "symfony/console": "^3.4|^4.0|^5.0", # "symfony/config": "^3.4|^4.0|^5.0" # From composer.json, "suggest": { # "ext-json": "Install if using JSON configuration format", # "symfony/yaml": "Install if using YAML configuration format" -Requires: php(language) >= 5.6 +Requires: php(language) >= 7.2 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 -Requires: (php-composer(cakephp/collection) >= 3.7 with php-composer(cakephp/collection) < 4) -Requires: (php-composer(cakephp/database) >= 3.7 with php-composer(cakephp/database) < 4) +Requires: (php-composer(cakephp/collection) >= 4.0 with php-composer(cakephp/collection) < 5) +Requires: (php-composer(cakephp/database) >= 4.0 with php-composer(cakephp/database) < 5) Requires: (php-composer(symfony/console) >= 3.4 with php-composer(symfony/console) < 6) Requires: (php-composer(symfony/config) >= 3.4 with php-composer(symfony/config) < 6) Requires: (php-composer(symfony/yaml) >= 3.4 with php-composer(symfony/yaml) < 6) %else -Requires: php-cakephp-collection >= 3.7 -Requires: php-cakephp-database >= 3.7 +Requires: php-cakephp4-collection +Requires: php-cakephp4-database Requires: php-symfony3-console >= 3.4 Requires: php-symfony3-config >= 3.4 Requires: php-symfony3-yaml >= 3.4 @@ -173,7 +172,7 @@ ret=0 for cmd in "php %{phpunit}" php72 php73 php74; do if which $cmd; then set $cmd - $1 ${2:-%{_bindir}/phpunit7} \ + $1 ${2:-%{_bindir}/phpunit8} \ --no-coverage || ret=1 fi done @@ -194,6 +193,12 @@ exit $ret %changelog +* Fri Apr 10 2020 Remi Collet - 0.12.0-1 +- update to 0.12.0 +- raise dependency on PHP 7.2 +- switch to cakephp v4 +- switch to phpunit v8 + * Tue Apr 7 2020 Remi Collet - 0.11.6-1 - update to 0.11.6 -- cgit