diff options
author | Remi Collet <fedora@famillecollet.com> | 2016-06-14 13:56:29 +0200 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2016-06-14 13:56:29 +0200 |
commit | 12debc4c7ada68434de0ace3f766cbc528671884 (patch) | |
tree | d382abbc5bfc198ee5b32ff96ff09576db195a07 | |
parent | 6f130b77bedf2a1c6514b8acbf1cbef57b13d6a0 (diff) |
php-swiftmailer: add patch for mockery 0.9.x
-rw-r--r-- | php-swiftmailer-mockery.patch | 62 | ||||
-rw-r--r-- | php-swiftmailer.spec | 12 |
2 files changed, 72 insertions, 2 deletions
diff --git a/php-swiftmailer-mockery.patch b/php-swiftmailer-mockery.patch new file mode 100644 index 0000000..eae9ca5 --- /dev/null +++ b/php-swiftmailer-mockery.patch @@ -0,0 +1,62 @@ +From 9470303d8da535053c9ebd85d40feeb75b07307e Mon Sep 17 00:00:00 2001 +From: Remi Collet <fedora@famillecollet.com> +Date: Tue, 14 Jun 2016 13:40:19 +0200 +Subject: [PATCH] allow latest mockery 0.9.x + +--- + composer.json | 2 +- + tests/bootstrap.php | 2 +- + tests/smoke/Swift/Smoke/AttachmentSmokeTest.php | 1 + + tests/smoke/Swift/Smoke/InternationalSmokeTest.php | 1 + + 4 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/composer.json b/composer.json +index 0549006..86691bd 100644 +--- a/composer.json ++++ b/composer.json +@@ -18,7 +18,7 @@ + "php": ">=5.3.3" + }, + "require-dev": { +- "mockery/mockery": "~0.9.1,<0.9.4" ++ "mockery/mockery": "~0.9.1" + }, + "autoload": { + "files": ["lib/swift_required.php"] +diff --git a/tests/bootstrap.php b/tests/bootstrap.php +index 34f56b5..27091a2 100644 +--- a/tests/bootstrap.php ++++ b/tests/bootstrap.php +@@ -7,7 +7,7 @@ + + set_include_path(get_include_path().PATH_SEPARATOR.dirname(__DIR__).'/lib'); + +-Mockery::getConfiguration()->allowMockingNonExistentMethods(false); ++Mockery::getConfiguration()->allowMockingNonExistentMethods(true); + + if (is_file(__DIR__.'/acceptance.conf.php')) { + require_once __DIR__.'/acceptance.conf.php'; +diff --git a/tests/smoke/Swift/Smoke/AttachmentSmokeTest.php b/tests/smoke/Swift/Smoke/AttachmentSmokeTest.php +index d0054d6..c3b61c3 100644 +--- a/tests/smoke/Swift/Smoke/AttachmentSmokeTest.php ++++ b/tests/smoke/Swift/Smoke/AttachmentSmokeTest.php +@@ -9,6 +9,7 @@ class Swift_Smoke_AttachmentSmokeTest extends SwiftMailerSmokeTestCase + + public function setUp() + { ++ parent::setup(); // For skip + $this->_attFile = __DIR__.'/../../../_samples/files/textfile.zip'; + } + +diff --git a/tests/smoke/Swift/Smoke/InternationalSmokeTest.php b/tests/smoke/Swift/Smoke/InternationalSmokeTest.php +index 66e37ec..fafd727 100644 +--- a/tests/smoke/Swift/Smoke/InternationalSmokeTest.php ++++ b/tests/smoke/Swift/Smoke/InternationalSmokeTest.php +@@ -9,6 +9,7 @@ class Swift_Smoke_InternationalSmokeTest extends SwiftMailerSmokeTestCase + + public function setUp() + { ++ parent::setup(); // For skip + $this->_attFile = __DIR__.'/../../../_samples/files/textfile.zip'; + } + diff --git a/php-swiftmailer.spec b/php-swiftmailer.spec index 83589c8..39e5922 100644 --- a/php-swiftmailer.spec +++ b/php-swiftmailer.spec @@ -15,7 +15,7 @@ Name: php-%{gh_project} Version: 5.4.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Free Feature-rich PHP Mailer Group: Development/Libraries @@ -23,6 +23,9 @@ License: MIT URL: http://www.swiftmailer.org/ Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}-%{gh_short}.tar.gz +# https://github.com/swiftmailer/swiftmailer/pull/769 +Patch0: %{name}-mockery.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch %if %{with_tests} @@ -31,7 +34,6 @@ BuildRequires: php-composer(theseer/autoload) # From composer.json, "require-dev": { # "mockery/mockery": "~0.9.1,<0.9.4" BuildRequires: php-composer(mockery/mockery) >= 0.9.1 -BuildRequires: php-composer(mockery/mockery) < 0.9.4 %endif # From composer.json, "require": { @@ -73,6 +75,8 @@ Autoloader: %{php_home}/Swift/swift_required.php %prep %setup -q -n %{gh_project}-%{gh_commit} +%patch0 -p1 + # Install using the same layout than the old PEAR package mv lib/swift_required_pear.php lib/swift_required.php rm lib/swiftmailer_generate_mimes_config.php @@ -148,6 +152,10 @@ rm -rf %{buildroot} %changelog +* Tue Jun 14 2016 Remi Collet <remi@fedoraproject.org> - 5.4.2-2 +- add patch to allow mockery 0.9.x + open https://github.com/swiftmailer/swiftmailer/pull/769 + * Mon May 2 2016 Remi Collet <remi@fedoraproject.org> - 5.4.2-1 - update to 5.4.2 |