1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
|
# remirepo spec file for php-mockery, from
#
# Fedora spec file for php-deepend-Mockery
#
# License: MIT
# http://opensource.org/licenses/MIT
#
# Please preserve changelog entries
#
%bcond_without tests
%global gh_commit 1f4efdd7d3beafe9807b08156dfcb176d18f1699
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner mockery
%global gh_project mockery
%global ns_project Mockery
%global major 1
Name: php-mockery
Version: 1.6.12
Release: 1%{?dist}
Summary: Mockery is a simple but flexible PHP mock object framework
License: BSD-3-Clause
URL: https://github.com/%{gh_owner}/%{gh_project}
Source0: %{name}-%{version}-%{gh_short}.tgz
Source1: makesrc.sh
# Use our autoloader
Patch0: %{gh_project}-tests.patch
BuildArch: noarch
%if %{with tests}
BuildRequires: php(language) >= 7.3
# From composer.json, "require-dev": {
# "phpunit/phpunit": "^8.5 || ^9.6.17",
# "symplify/easy-coding-standard": "^12.1.4"
%global phpunit %{_bindir}/phpunit9
BuildRequires: phpunit9 >= 9.6.17
# remirepo:1
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
BuildRequires: (php-composer(hamcrest/hamcrest-php) >= 2.0.1 with php-composer(hamcrest/hamcrest-php) < 3)
# remirepo:3
%else
BuildRequires: php-hamcrest2 >= 2.0.1
%endif
BuildRequires: php-pdo
# Autoloader
%endif
BuildRequires: php-fedora-autoloader-devel
# From composer.json, "require": {
# "php": ">=7.3",
# "lib-pcre": ">=7.0",
# "hamcrest/hamcrest-php": "~2.0"
Requires: php(language) >= 7.3
# remirepo:1
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
Requires: (php-composer(hamcrest/hamcrest-php) >= 2.0.1 with php-composer(hamcrest/hamcrest-php) < 3)
# remirepo:3
%else
Requires: php-hamcrest2 >= 2.0.1
%endif
# From phpcompatinfo report for version 1.4.2
Requires: php-pcre
Requires: php-spl
Requires: php-reflection
# Autoloader
Requires: php-composer(fedora/autoloader)
Provides: php-composer(mockery/mockery) = %{version}
%description
Mockery is a simple but flexible PHP mock object framework for use in unit
testing. It is inspired by Ruby's flexmock and Java's Mockito, borrowing
elements from both of their APIs.
Autoloader: %{_datadir}/php/%{ns_project}%{major}/autoload.php
%prep
%setup -q -n %{gh_project}-%{gh_commit}
mv library/*.php library/%{ns_project}/
phpab --template fedora --output library/%{ns_project}/autoload.php library
cat << 'EOF' | tee -a library/%{ns_project}/autoload.php
\Fedora\Autoloader\Dependencies::required([
'/usr/share/php/Hamcrest2/autoload.php',
__DIR__ . '/helpers.php',
]);
EOF
%patch -P0 -p0 -b .rpm
rm -f docs/.gitignore
%build
# Empty build section, most likely nothing required.
%install
mkdir -p %{buildroot}/%{_datadir}/php
cp -rp library/%{ns_project} %{buildroot}/%{_datadir}/php/%{ns_project}%{major}
%check
%if %{with tests}
: Use installed tree and our autoloader
export COMPOSER_VENDOR_DIR=%{buildroot}%{_datadir}/php/%{ns_project}%{major}
phpab --output tests/classmap.php --exclude */SemiReservedWordsAsMethods.php tests/Mockery tests/Fixture
: Run upstream test suite
ret=0
# need investigation
rm tests/Mockery/MockeryCanMockClassesWithSemiReservedWordsTest.php
for cmd in php php81 php82 php83; do
if which $cmd; then
$cmd %{_bindir}/phpunit9 \
--no-coverage \
--verbose || ret=1
fi
done
exit $ret
%endif
%files
%{!?_licensedir:%global license %%doc}
%license LICENSE
%doc *.md docs
%doc composer.json
%{_datadir}/php/%{ns_project}%{major}
%changelog
* Thu May 16 2024 Remi Collet <remi@remirepo.net> - 1.6.12-1
- update to 1.6.12
* Fri Mar 22 2024 Remi Collet <remi@remirepo.net> - 1.6.11-1
- update to 1.6.11
* Wed Mar 20 2024 Remi Collet <remi@remirepo.net> - 1.6.10-1
- update to 1.6.10
* Wed Mar 13 2024 Remi Collet <remi@remirepo.net> - 1.6.9-1
- update to 1.6.9 (revert to 1.6.7 code)
* Tue Mar 12 2024 Remi Collet <remi@remirepo.net> - 1.6.8-1
- update to 1.6.8
* Mon Dec 11 2023 Remi Collet <remi@remirepo.net> - 1.6.7-1
- update to 1.6.7
* Thu Aug 24 2023 Remi Collet <remi@remirepo.net> - 1.6.6-1
- update to 1.6.6
* Thu Jul 20 2023 Remi Collet <remi@remirepo.net> - 1.6.4-1
- update to 1.6.4
* Wed Jul 19 2023 Remi Collet <remi@remirepo.net> - 1.6.3-1
- update to 1.6.3
* Thu Jun 8 2023 Remi Collet <remi@remirepo.net> - 1.6.2-1
- update to 1.6.2
* Tue Jun 6 2023 Remi Collet <remi@remirepo.net> - 1.6.1-1
- update to 1.6.1
* Mon Sep 12 2022 Remi Collet <remi@remirepo.net> - 1.5.1-1
- update to 1.5.1
* Fri Jan 21 2022 Remi Collet <remi@remirepo.net> - 1.5.0-1
- update to 1.5.0
* Tue Sep 14 2021 Remi Collet <remi@remirepo.net> - 1.4.4-1
- update to 1.4.4
* Wed Feb 24 2021 Remi Collet <remi@remirepo.net> - 1.4.3-1
- update to 1.4.3
* Mon Oct 12 2020 Remi Collet <remi@remirepo.net> - 1.4.2-1
- update to 1.4.2
- raise dependency on PHP 7.3
- drop compatibility with old phpunit 5, 6 and 7
- run test suite with both phpunit 8 and 9
* Mon Aug 17 2020 Remi Collet <remi@remirepo.net> - 1.3.3-1
- update to 1.3.3
* Tue Jul 21 2020 Remi Collet <remi@remirepo.net> - 1.3.2-1
- update to 1.3.2
- switch to phpunit9
- raise dependency on hamcrest/hamcrest-php 2.0.1
- sources from git snapshot
* Fri Jan 3 2020 Remi Collet <remi@remirepo.net> - 1.3.1-1
- update to 1.3.1
* Mon Nov 25 2019 Remi Collet <remi@remirepo.net> - 1.3.0-1
- update to 1.3.0
- use phpunit8
* Mon Sep 30 2019 Remi Collet <remi@remirepo.net> - 1.2.4-1
- update to 1.2.4
- drop patch merged upstream
* Mon Aug 19 2019 Remi Collet <remi@remirepo.net> - 1.2.3-1
- update to 1.2.3
- add patch for PHP 7.4 from
https://github.com/mockery/mockery/pull/993
* Wed Feb 13 2019 Remi Collet <remi@remirepo.net> - 1.2.2-1
- update to 1.2.2
* Mon Feb 11 2019 Remi Collet <remi@remirepo.net> - 1.2.1-1
- update to 1.2.1
* Wed Oct 3 2018 Remi Collet <remi@remirepo.net> - 1.2.0-1
- update to 1.2.0
- switch to phpunit7
* Sun May 13 2018 Remi Collet <remi@remirepo.net> - 1.1.0-1
- update to 1.1.0
* Mon Jan 22 2018 Remi Collet <remi@remirepo.net> - 1.0-1
- Update to 1.0
- rename to php-mockery and move to /usr/share/php/Mockery1
- raise dependency on PHP 5.6
- raise dependency on hamcrest/hamcrest-php 2.0
- use phpunit6 on F26+
* Fri Oct 6 2017 Remi Collet <remi@remirepo.net> - 0.9.9-4
- add patches for PHP 7.2
* Tue Feb 28 2017 Remi Collet <remi@remirepo.net> - 0.9.9-1
- Update to 0.9.9
* Fri Feb 10 2017 Remi Collet <remi@remirepo.net> - 0.9.8-1
- Update to 0.9.8
* Fri Dec 23 2016 Remi Collet <remi@fedoraproject.org> - 0.9.7-1
- Update to 0.9.7
* Sat Nov 26 2016 Remi Collet <remi@fedoraproject.org> - 0.9.6-1
- Update to 0.9.6
- switch to fedora/autoloader
* Tue Jun 14 2016 Remi Collet <remi@fedoraproject.org> - 0.9.5-1
- Update to 0.9.5
* Fri Oct 16 2015 Remi Collet <remi@fedoraproject.org> - 0.9.3-1
- downgrade to 0.9.3
* Fri Oct 16 2015 Remi Collet <remi@fedoraproject.org> - 0.9.4-1
- Update to 0.9.4
- add autoloader using symfony/class-loader
- add dependency on hamcrest/hamcrest-php
- run test suite
- use github archive from commit reference
* Wed Jul 16 2014 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 0.9.1-2
- fixed requires (Remi)
- add script which will delete older pear package if installed (Remi)
- fix provides/obsoletes (Remi)
* Tue Jul 15 2014 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 0.9.1-1
- update to 0.9.1 (RHBZ #1119451)
* Tue Feb 11 2014 Remi Collet <remi@fedoraproject.org> - 0.9.0-1
- Update to 0.9.0
* Fri Apr 19 2013 Remi Collet <remi@fedoraproject.org> - 0.8.0-1
- Update to 0.8.0 (backport)
* Thu Apr 18 2013 Christof Damian <christof@damian.net> - 0.8.0-1
- upstream 0.8.0
* Sun Mar 04 2012 Remi Collet <RPMS@FamilleCollet.com> - 0.7.2-1
- upstream 0.7.2, rebuild for remi repository
* Sun Mar 4 2012 Christof Damian <christof@damian.net> - 0.7.2-1
- upstream 0.7.2
* Tue Jul 27 2010 Remi Collet <RPMS@FamilleCollet.com> - 0.6.3-2
- rebuild for remi repository
* Tue Jul 27 2010 Christof Damian <christof@damian.net> - 0.6.3-2
- add license and readme file from github
* Fri May 28 2010 Christof Damian <christof@damian.net> - 0.6.0-1
- initial packaging
|