summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2019-12-13 10:00:56 +0100
committerRemi Collet <remi@remirepo.net>2019-12-13 10:00:56 +0100
commit20d8e568224fdcf69ac60ef0a00fdfabd9b116fb (patch)
treed30c12d153f84030736dbfb158b1f904809a287b
parent56c857f0b2fd08864bc2c0817c02dc293543d27a (diff)
- update to 0.11.3
- allow Symfony 5
-rw-r--r--1603.patch24
-rw-r--r--composer.json11
-rw-r--r--phinx-autoload.php3
-rw-r--r--phinx-version.patch19
-rw-r--r--phinx.spec28
5 files changed, 32 insertions, 53 deletions
diff --git a/1603.patch b/1603.patch
deleted file mode 100644
index edc0221..0000000
--- a/1603.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From 5843afa20a3e9d39580d710dd927736c747ad47b Mon Sep 17 00:00:00 2001
-From: Remi Collet <remi@remirepo.net>
-Date: Thu, 29 Aug 2019 13:39:59 +0200
-Subject: [PATCH] Fix: Trying to access array offset on value of type bool
-
----
- src/Phinx/Migration/Manager.php | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/Phinx/Migration/Manager.php b/src/Phinx/Migration/Manager.php
-index 8b7040a05..9cea06674 100644
---- a/src/Phinx/Migration/Manager.php
-+++ b/src/Phinx/Migration/Manager.php
-@@ -206,8 +206,8 @@ public function printStatus($environment, $format = null)
- '%s %14.0f %19s %19s <comment>%s</comment>',
- $status,
- $migration->getVersion(),
-- $version['start_time'],
-- $version['end_time'],
-+ ($version ? $version['start_time'] : ''),
-+ ($version ? $version['end_time'] : ''),
- $migration->getName()
- ));
-
diff --git a/composer.json b/composer.json
index 2ceebbb..4d0d979 100644
--- a/composer.json
+++ b/composer.json
@@ -5,7 +5,6 @@
"keywords": ["phinx", "migrations", "database", "db", "database migrations"],
"homepage": "https://phinx.org",
"license": "MIT",
- "version": "0.11.1",
"authors": [{
"name": "Rob Morgan",
"email": "robbym@gmail.com",
@@ -31,9 +30,9 @@
"cakephp/core": "^3.6",
"cakephp/database": "^3.6",
"cakephp/datasource": "^3.6",
- "symfony/console": "^3.4|^4.0",
- "symfony/config": "^3.4|^4.0",
- "symfony/yaml": "^3.4|^4.0"
+ "symfony/console": "^3.4|^4.0|^5.0",
+ "symfony/config": "^3.4|^4.0|^5.0",
+ "symfony/yaml": "^3.4|^4.0|^5.0"
},
"require-dev": {
"phpunit/phpunit": ">=5.7,<8.0",
@@ -55,8 +54,8 @@
"@test",
"@cs-check"
],
- "cs-check": "phpcs --colors -p --standard=vendor/cakephp/cakephp-codesniffer/CakePHP src/ tests/ app/",
- "cs-fix": "phpcbf --colors --standard=vendor/cakephp/cakephp-codesniffer/CakePHP src/ tests/ app/",
+ "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/",
"test": "phpunit --colors=always"
},
"bin": ["bin/phinx"]
diff --git a/phinx-autoload.php b/phinx-autoload.php
index 762a00f..8186fec 100644
--- a/phinx-autoload.php
+++ b/phinx-autoload.php
@@ -10,14 +10,17 @@ require_once '/usr/share/php/Fedora/Autoloader/autoload.php';
'/usr/share/php/Cake/Database/autoload.php',
'/usr/share/php/Cake/Datasource/autoload.php',
[
+ '/usr/share/php/Symfony5/Component/Console/autoload.php',
'/usr/share/php/Symfony4/Component/Console/autoload.php',
'/usr/share/php/Symfony3/Component/Console/autoload.php',
],
[
+ '/usr/share/php/Symfony5/Component/Config/autoload.php',
'/usr/share/php/Symfony4/Component/Config/autoload.php',
'/usr/share/php/Symfony3/Component/Config/autoload.php',
],
[
+ '/usr/share/php/Symfony5/Component/Yaml/autoload.php',
'/usr/share/php/Symfony4/Component/Yaml/autoload.php',
'/usr/share/php/Symfony3/Component/Yaml/autoload.php',
],
diff --git a/phinx-version.patch b/phinx-version.patch
index d1410c8..0262d85 100644
--- a/phinx-version.patch
+++ b/phinx-version.patch
@@ -1,13 +1,12 @@
diff -up src/Phinx/Console/PhinxApplication.php.rpm src/Phinx/Console/PhinxApplication.php
---- src/Phinx/Console/PhinxApplication.php.rpm 2018-06-11 12:27:52.883341516 +0200
-+++ src/Phinx/Console/PhinxApplication.php 2018-06-11 12:28:29.982556962 +0200
-@@ -50,8 +50,7 @@ class PhinxApplication extends Applicati
- public function __construct($version = null)
+--- src/Phinx/Console/PhinxApplication.php.rpm 2019-12-13 09:56:58.153369975 +0100
++++ src/Phinx/Console/PhinxApplication.php 2019-12-13 09:57:01.871352539 +0100
+@@ -56,7 +56,7 @@ class PhinxApplication extends Applicati
+ */
+ public function __construct()
{
- if ($version === null) {
-- $composerConfig = json_decode(file_get_contents(__DIR__ . '/../../../composer.json'));
-- $version = $composerConfig->version;
-+ $version = '@VERSION@';
- }
+- parent::__construct('Phinx by CakePHP - https://phinx.org.');
++ parent::__construct('Phinx by CakePHP - https://phinx.org.', '@VERSION@');
- parent::__construct('Phinx by CakePHP - https://phinx.org.', $version);
+ $this->addCommands([
+ new Init(),
diff --git a/phinx.spec b/phinx.spec
index 1dbfbf4..e27397d 100644
--- a/phinx.spec
+++ b/phinx.spec
@@ -10,7 +10,7 @@
# For compatibility with SCL
%undefine __brp_mangle_shebangs
-%global gh_commit a6cced878695d26396b26dfd62ce300aea07de05
+%global gh_commit 3c6a171b0455225cf42716dc4864feb620da716f
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner robmorgan
#global gh_date 20150820
@@ -19,8 +19,8 @@
%global with_tests 0%{!?_without_tests:1}
Name: %{gh_project}
-Version: 0.11.1
-Release: 2%{?gh_date?%{gh_date}git%{gh_short}}%{?dist}
+Version: 0.11.3
+Release: 1%{?gh_date?%{gh_date}git%{gh_short}}%{?dist}
Summary: Manage the database migrations for your PHP app
License: MIT
@@ -29,9 +29,8 @@ Source0: %{name}-%{version}-%{?gh_short}.tgz
Source1: %{name}-autoload.php
Source2: makesrc.sh
-# hardcode version instead of read it from composer.json
+# Add version in application
Patch0: %{name}-version.patch
-Patch1: https://patch-diff.githubusercontent.com/raw/cakephp/phinx/pull/1603.patch
BuildArch: noarch
%if %{with_tests}
@@ -42,9 +41,9 @@ BuildRequires: (php-composer(cakephp/collection) >= 3.6 with php-composer(cake
BuildRequires: (php-composer(cakephp/core) >= 3.6 with php-composer(cakephp/core) < 4)
BuildRequires: (php-composer(cakephp/database) >= 3.6 with php-composer(cakephp/database) < 4)
BuildRequires: (php-composer(cakephp/datasource) >= 3.6 with php-composer(cakephp/datasource) < 4)
-BuildRequires: (php-composer(symfony/console) >= 3.4 with php-composer(symfony/console) < 5)
-BuildRequires: (php-composer(symfony/config) >= 3.4 with php-composer(symfony/config) < 5)
-BuildRequires: (php-composer(symfony/yaml) >= 3.4 with php-composer(symfony/yaml) < 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.6
BuildRequires: php-cakephp-core >= 3.6
@@ -83,9 +82,9 @@ Requires: (php-composer(cakephp/collection) >= 3.6 with php-composer(cake
Requires: (php-composer(cakephp/core) >= 3.6 with php-composer(cakephp/core) < 4)
Requires: (php-composer(cakephp/database) >= 3.6 with php-composer(cakephp/database) < 4)
Requires: (php-composer(cakephp/datasource) >= 3.6 with php-composer(cakephp/datasource) < 4)
-Requires: (php-composer(symfony/console) >= 3.4 with php-composer(symfony/console) < 5)
-Requires: (php-composer(symfony/config) >= 3.4 with php-composer(symfony/config) < 5)
-Requires: (php-composer(symfony/yaml) >= 3.4 with php-composer(symfony/yaml) < 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.6
Requires: php-cakephp-core >= 3.6
@@ -124,7 +123,6 @@ Documentation: http://docs.phinx.org
%patch0 -p0
sed -e 's/@VERSION@/%{version}/' \
-i src/Phinx/Console/PhinxApplication.php
-%patch1 -p1
cp %{SOURCE1} src/%{psr0}/autoload.php
@@ -177,7 +175,7 @@ sed -e '/_ENABLED/s/true/false/;/SQLITE_ENABLED/s/false/true/' \
: Run upstream test suite
ret=0
-for cmd in "php %{phpunit}" php71 php72 php73; do
+for cmd in "php %{phpunit}" php71 php72 php73 php74; do
if which $cmd; then
set $cmd
$1 ${2:-%{_bindir}/phpunit6} \
@@ -201,6 +199,10 @@ exit $ret
%changelog
+* Fri Dec 13 2019 Remi Collet <remi@remirepo.net> - 0.11.3-1
+- update to 0.11.3
+- allow Symfony 5
+
* Thu Aug 29 2019 Remi Collet <remi@remirepo.net> - 0.11.1-2
- add patch for PHP 7.4 from
https://github.com/cakephp/phinx/pull/1603