Skip to content

Commit 14acb4f

Browse files
committed
deprecate some not needed statement filter methods
1 parent 2a9e7fe commit 14acb4f

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ CHANGELOG
44
1.1.0
55
-----
66

7+
* The `StatementsFilter::format()`, `StatementsFilter::includeAttachments()`,
8+
and `StatementsFilter::excludeAttachments()` methods are deprecated and will
9+
be removed in 2.0.
10+
711
* Added a `$content` attribute to the `Attachment` class to make it possible
812
to attach the raw content to an attachment.
913

UPGRADE.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ UPGRADE
44
Upgrading from 1.0 to 1.1
55
-------------------------
66

7+
* The `StatementsFilter::format()`, `StatementsFilter::includeAttachments()`,
8+
and `StatementsFilter::excludeAttachments()` methods are deprecated and will
9+
be removed in 2.0.
10+
711
* Constructing an `Attachment` instance with specifying neither a file URL
812
nor the raw attachment content throws an `\InvalidArgumentException`.
913

src/StatementsFilter.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,8 @@ public function limit($limit)
199199
*/
200200
public function format($format)
201201
{
202+
@trigger_error(sprintf('The "%s()" method is deprecated since 1.1 and will be removed in 2.0.', __METHOD__), E_USER_DEPRECATED);
203+
202204
if (!in_array($format, array('ids', 'exact', 'canonical'))) {
203205
throw new \InvalidArgumentException('Unknown format '.$format.' given');
204206
}
@@ -215,6 +217,8 @@ public function format($format)
215217
*/
216218
public function includeAttachments()
217219
{
220+
@trigger_error(sprintf('The "%s()" method is deprecated since 1.1 and will be removed in 2.0.', __METHOD__), E_USER_DEPRECATED);
221+
218222
$this->filter['attachments'] = 'true';
219223

220224
return $this;
@@ -227,6 +231,8 @@ public function includeAttachments()
227231
*/
228232
public function excludeAttachments()
229233
{
234+
@trigger_error(sprintf('The "%s()" method is deprecated since 1.1 and will be removed in 2.0.', __METHOD__), E_USER_DEPRECATED);
235+
230236
$this->filter['attachments'] = 'false';
231237

232238
return $this;

0 commit comments

Comments
 (0)