/
UPGRADING
846 lines (511 loc) · 20.9 KB
/
UPGRADING
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
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
=============================
Upgrading Horde_Imap_Client
=============================
:Contact: dev@lists.horde.org
.. contents:: Contents
.. section-numbering::
This lists the API changes between releases of the package.
Upgrading to 2.20.0
===================
- Horde_Imap_Client_Ids
- min
- max
These properties have been added.
Upgrading to 2.19.0
===================
- Horde_Imap_Client_Base
- copy()
Added the 'force_map' parameter.
- Horde_Imap_Client_Cache_Backend_Hashtable
- Constructor
Added the 'lifetime' configuration parameter.
Upgrading to 2.18.0
===================
- Horde_Imap_Client_Exception
Added the $raw_msg parameter.
Upgrading to 2.17.0
===================
- Horde_Imap_Client_Cache_Backend_Hashtable
Added a Hashtable specific caching driver.
- Horde_Imap_Client_Ids
- remove()
This method has been added.
Upgrading to 2.16.0
===================
- Horde_Imap_Client_Base
- Constructor
Added 'tlsv1' option for the 'secure' configuration parameter.
- Horde_Imap_Client_Password_Xoauth2
Added class to abstract production of the necessary token for XOAUTH2 SASL
authentication.
Upgrading to 2.15.0
===================
- Horde_Imap_Client_Base
- Constructor
Added true as an option for the 'secure' configuration parameter.
Upgrading to 2.14.0
===================
- Horde_Imap_Client_Base
- Constructor
The 'encryptKey' parameter is deprecated.
Instead, allow a Horde_Imap_Client_Base_Password object to be passed
via the 'password' parameter.
- $statuscache
This property has been added.
- status()
Added the Horde_Imap_Client::STATUS_FORCE_REFRESH flag.
- Horde_Imap_Client_Socket
- Constructor
The 'xoauth2_token' parameter now accepts a
Horde_Imap_Client_Base_Password object.
Upgrading to 2.13.0
===================
- Horde_Imap_Client_Socket
- Constructor
Added the 'xoauth2_token' parameter.
Upgrading to 2.12.0
===================
- Horde_Imap_Client_Base
- status()
Added the Horde_Imap_Client::STATUS_RECENT_TOTAL return value.
Upgrading to 2.11.0
===================
- Horde_Imap_Client_Data_Fetch
Added the setDowngraded() and isDowngraded() methods.
Upgrading to 2.10.0
===================
- Horde_Imap_Client_Base
- expunge()
The 'delete' option was added.
- status()
The $mailbox argument now supports array input (and will return an
array of multiple mailboxes). Additionally, the third $options
parameter has been added.
- statusMultiple()
This method has been deprecated. Use status() instead.
- Horde_Imap_Client_Interaction_Client
This class is deprecated (and no longer used internally).
Upgrading to 2.9.0
==================
- Horde_Imap_Client_Base
The 'cacheob', 'lifetime', and 'slicesize' parameters to the 'cache'
constructor option have been deprecated. Use the 'backend' parameter
instead.
- Horde_Imap_Client_Cache
Added the clear() method.
Upgrading to 2.8.0
==================
- Horde_Imap_Client_Base
The 'nocache' option was added to fetch().
- Horde_Imap_Client_Data_Sync
The following public properties have been added:
- $highestmodseq
- $map (static value)
- $messages
- $uidnext
- $uidvalidity
Upgrading to 2.7.0
==================
- Horde_Imap_Client_Ids
The split() method was added.
Upgrading to 2.6.0
==================
- Horde_Imap_Client_Fetch_Results
The clear() method was added.
Upgrading to 2.5.0
==================
- Horde_Imap_Client_Base
The 'exists' option was added to fetch().
Upgrading to 2.4.0
==================
- Horde_Imap_Client_Base
The following 'sort' criteria have been added to search():
- SORT_DISPLAYFROM_FALLBACK
- SORT_DISPLAYTO_FALLBACK
Upgrading to 2.3.0
==================
- Horde_Imap_Client_Data_Format_String
The following methods have been added:
- getStream()
Upgrading to 2.2.0
==================
- Horde_Imap_Client_Base
The following methods have been added:
- getSyncToken()
- sync()
The following methods have been marked as deprecated and will be removed
in 3.0:
- getCacheId()
- parseCacheId()
Upgrading to 2.1.0
==================
The Horde_Imap_Client_Ids_Map class has been added.
- Horde_Imap_Client_Cache
The following config options have changed:
- debug
Now requires a Horde_Imap_Client_Base_Debug object. The previous
'true' value will be ignored.
Upgrading to 2.0.0
==================
The cclient drivers have been removed.
Exception logging has been removed; the calling code is now responsible for
logging any errors.
- Horde_Imap_Client
- factory()
The factory method has been removed. The client driver should instead
be directly instantiated.
- Horde_Imap_Client_Base
The following config options have been removed:
- statuscache
The following properties have changed:
- $cache
This public member variable has been removed. Obtain the cache object
by calling getCache() instead.
- $utils
This public member variable has been removed.
The following methods have changed:
- append()
The $mailbox parameter can no longer be a UTF7-IMAP string.
- copy()
The $source and $dest parameters can no longer be UTF7-IMAP strings.
- createMailbox()
The $mailbox parameter can no longer be a UTF7-IMAP string.
- currentMailbox()
The 'mailbox' portion of the return value is always returned as a
Horde_Imap_Client_Mailbox object.
The $options parameter has been removed.
- deleteACL()
This method has been added.
- deleteMailbox()
The $mailbox parameter can no longer be a UTF7-IMAP string.
- expunge()
The $mailbox parameter can no longer be a UTF7-IMAP string.
- fetch()
The 'fetch_res' option has been removed.
The 'vanished' option has been removed - use the vanished() method
instead.
The $mailbox parameter can no longer be a UTF7-IMAP string.
Results are now returned as a Horde_Imap_Client_Fetch_Results object.
- fetchCacheIgnore()
This method has been removed. Use getParam()/setParam() to change
parameter values instead.
- fetchFromSectionString()
This method has been removed.
- getNamespaces()
The array keys, 'name' key, and 'translation' key in the return array
return UTF-8 strings (not UTF7-IMAP).
- getACL()
The $mailbox parameter can no longer be a UTF7-IMAP string.
- getCacheId()
The $mailbox parameter can no longer be a UTF7-IMAP string.
- getMetadata()
The $mailbox parameter can no longer be a UTF7-IMAP string.
- getMyACLRights()
The $mailbox parameter can no longer be a UTF7-IMAP string.
- getQuota()
The $root parameter can no longer be a UTF7-IMAP string.
- getQuotaRoot()
The $mailbox parameter can no longer be a UTF7-IMAP string.
- listACLRights()
The $mailbox parameter can no longer be a UTF7-IMAP string.
- listMailboxes()
The return array keys are in UTF-8 (not UTF7-IMAP).
The 'mailbox' return value is returned as a Horde_Imap_Client_Mailbox
object.
The 'utf8' parameter has been removed.
The 'pattern' parameter now handles Horde_Imap_Client_Mailbox objects
differently than string patterns.
- openMailbox()
The $mailbox parameter can no longer be a UTF7-IMAP string.
- parseCommandArray()
This method has been removed.
- renameMailbox()
The $old and $new parameters can no longer be UTF7-IMAP strings.
- search()
The $mailbox parameter can no longer be a UTF7-IMAP string.
The following constants for use with 'results' have been deprecated
(use SEARCH_RESULTS_* constants instead):
- SORT_RESULTS_COUNT
- SORT_RESULTS_MATCH
- SORT_RESULTS_MAX
- SORT_RESULTS_MIN
- SORT_RESULTS_SAVE
- setACL()
The $mailbox parameter can no longer be a UTF7-IMAP string.
The $options['remove'] parameter has been replaced by a more flexible
$options['action'] parameter. To delete all ACLs for an identifier use
the new deleteACL() method.
- setQuota()
The $root parameter can no longer be a UTF7-IMAP string.
- status()
The $mailbox parameter can no longer be a UTF7-IMAP string.
The STATUS_LASTMODSEQ and STATUS_LASTMODSEQUIDS return options have
been removed.
- statusMultiple()
The return array keys are in UTF-8 (not UTF7-IMAP).
The $mailboxes parameter can no longer contain UTF7-IMAP strings.
- store()
The $mailbox parameter can no longer be a UTF7-IMAP string.
- subscribeMailbox()
The $mailbox parameter can no longer be a UTF7-IMAP string.
- thread()
The $mailbox parameter can no longer be a UTF7-IMAP string.
- Horde_Imap_Client_Cache
Removed the singleton() method.
The 'hostspec', 'port', and 'username' parameters to the constructor have
been removed.
- Horde_Imap_Client_Data_Envelope
Address entries are now returned as a Horde_Mail_Rfc822_List object.
The following properties have been removed:
- bcc_decoded
- bcc_group
- cc_decoded
- cc_group
- from_decoded
- reply_to_decoded
- sender_decoded
- subject_decoded
- to_decoded
- to_group
- Horde_Imap_Client_Data_Thread
- Constructor
The format of the first parameter ($data) has changed.
- getRawData()
This method has been removed.
- getThread()
This method now returns a list of objects. This is now the way that
individual indices of a thread are accessed.
- getThreadBase()
This method has been removed (see getThread() for replacement).
- getThreadIndent()
This method has been removed (see getThread() for replacement).
- getType()
This method has been added.
- lastInLevel()
This method has been removed (see getThread() for replacement).
- messageList()
This method now returns the list of IDs in a Horde_Imap_Client_Ids
object.
- Horde_Imap_Client_Exception
These constants have been removed:
- DRIVER_NOT_FOUND
- POP3_NOT_SUPPORTED
- NOSUPPORTIMAPEXT
- CATENATE_BADURL
- BADSEARCH
- Horde_Imap_Client_Exception_NoSupportExtension
The $extension property has been added.
- Horde_Imap_Client_Mailbox
get() no longer supports the null argument to the $utf7imap parameter.
- Horde_Imap_Client_Search_Query
The $queries argument to andSearch() and orSearch() can be a base query
in addition to an array of queries.
The second argument to charset() has been changed to a boolean indicating
whether the current text queries should be converted to the new charset
provided.
- Horde_Imap_Client_Sort
This class has been removed. Mailbox sorting can now be accomplished with
the Horde_Imap_Client_Mailbox_List class.
- Horde_Imap_Client_Utf7imap
The default argument for the $force parameter to Utf8ToUtf7Imap() has
changed to boolean true.
- Horde_Imap_Client_Utils
This class has been removed. Information on the previous methods (and
their replacements, if any) can be found below.
- createUrl()
This method has been removed. URL creation can now be accomplished with
the Horde_Imap_Client_Url object.
- escape()
This method has been removed. String escaping can now be accomplished
via the Horde_Imap_Client_Data_Format_* objects.
- fromSequenceString()
This method has been removed. Sequence string parsing is now natively
supported within the Horde_Imap_Client_Ids object.
- getBaseSubject()
This method has been removed. Bsae subject determination is now handled
by the Horde_Imap_Client_Utils_BaseSubject class.
- parseCommandArray()
This method has been removed.
- parseUrl()
This method has been removed. URL parsing can now be accomplished with
the Horde_Imap_Client_Url object.
- removeBareNewlines()
This method has been removed.
- stripNonAtomChars()
This method has been removed. The same functionality can now be
accomplished by using the stripNonAtomCharacters() method of the
Horde_Imap_Client_Data_Format_Atom object.
- toSequenceString()
This method has been removed. Sequence string generation is now natively
supported within the Horde_Imap_Client_Ids object.
- Horde_Imap_Client_Utils_Pop3
This class has been removed.
Upgrading To 1.5.0
==================
The following properties have been added to the Horde_Imap_Client_Data_Envelope
object:
- bcc_group
- cc_group
- to_group
Address properties (array return values) returned from
Horde_Imap_Client_Data_Envelope are now Horde_Mail_Rfc822_Address objects.
These objects behave identical to the arrays that were returned previously.
The following methods have been added:
- Horde_Imap_Client_Base#setParam()
Upgrading To 1.4.0
==================
Several exception codes have been deprecated:
- DRIVER_NOT_FOUND
- CATENATE_BADURL
- BADSEARCH
These are coding errors, not run-time errors, so SPL Exceptions are thrown
instead of Horde_Imap_Client_Exceptions with these codes.
These exception codes have also been deprecated:
- NOSUPPORTIMAPEXT
- POP3_NOTSUPPORTED
Instead, a Horde_Imap_Client_Exception_NoSupportExtension will be thrown. This
class is an extension of Horde_Imap_Client_Exception, so current try/catch
statements will automatically catch these exceptions.
Horde_Imap_Client_Exception messages are now translated. Additionally, debug
information from the server MAY be available in the 'details' property of the
Exception object rather than being added to the error message.
Upgrading To 1.3.0
==================
The Cclient drivers have been removed; they are instead mapped to the
appropriate Socket drivers. No code needs to be changed for now as this will
happen automatically. However, the 'Cclient' and 'Cclient_Pop3' driver names
are deprecated and will be removed in 2.0.0.
Upgrading To 1.2.0
==================
There has been a major change in the way mailbox names are handled in this
version. Due to ambiguities with auto-detecting UTF-8 vs. UTF7-IMAP, all
mailbox method parameters and return values are now Horde_Imap_Client_Mailbox
objects. These objects, when cast to a string, will return the UTF-8 version
of the mailbox.
All other non-mailbox strings that previously could be passed in as either
UTF7-IMAP or UTF-8 are now REQUIRED to be passed in as UTF-8.
Auto-detection will still work, but is deprecated, will be removed in 2.0.0,
and is not guaranteed to produce proper results for all mailbox names.
Changed Return Values
---------------------
The following return values have changed:
- Horde_Imap_Client_Base#currentMailbox()
If the 'utf8' parameter is true, a Horde_Imap_Client_Mailbox object
will be returned (an equivalent string representation to the previous
behavior of returning a UTF-8 string).
- Horde_Imap_Client_Base#getNamespaces()
The return array keys and the 'name' parameter are returned in UTF7-IMAP
(the documentation was previously unclear as to the charset of these
items).
- Horde_Imap_Client_Base#listMailboxes()
If both the 'flat' and 'utf8' parameters are true, the array values will
be Horde_Imap_Client_Mailbox objects, instead of a string (an equivalent
string representation to the previous behavior of returning a UTF-8
string).
If the 'flat' parameter is false and the 'utf8' parameter is true, the
'mailbox' array key will be a Horde_Imap_Client_Mailbox object instead of
a string (an equivalent string representation to the previous behavior of
returning a UTF-8 string).
- Horde_Imap_Client_Base#statusMultiple()
The return array keys are returned in UTF7-IMAP (the documentation was
previously unclear as to the charset of these keys).
Deprecated Methods
------------------
The following methods are deprecated and will be removed in 2.0.0:
- Horde_Imap_Client_Cache::singleton()
Use Horde_Imap_Client_Cache::factory() instead.
- Horde_Imap_Client_Base#parseCommandArray()
Use Horde_Imap_Client_Utils#parseCommandArray() instead.
Deprecated Parameters
---------------------
- Horde_Imap_Client_Base#currentMailbox()
The 'utf8' parameter has been deprecated. The 'mailbox' return value will
exclusively return a Horde_Imap_Client_Mailbox object in 2.0.0.
Drivers
-------
The unmaintained Mock driver has been removed.
Method Parameter Changes
------------------------
- Horde_Imap_Client_Base#append()
- Horde_Imap_Client_Base#copy()
- Horde_Imap_Client_Base#createMailbox()
- Horde_Imap_Client_Base#deleteMailbox()
- Horde_Imap_Client_Base#expunge()
- Horde_Imap_Client_Base#fetch()
- Horde_Imap_Client_Base#fetchFromSectionString()
- Horde_Imap_Client_Base#getACL()
- Horde_Imap_Client_Base#getCacheId()
- Horde_Imap_Client_Base#getMetadata()
- Horde_Imap_Client_Base#getMyACLRights()
- Horde_Imap_Client_Base#getQuota()
- Horde_Imap_Client_Base#getQuotaRoot()
- Horde_Imap_Client_Base#listACLRights()
- Horde_Imap_Client_Base#openMailbox()
- Horde_Imap_Client_Base#renameMailbox()
- Horde_Imap_Client_Base#search()
- Horde_Imap_Client_Base#setACL()
- Horde_Imap_Client_Base#setMetadata()
- Horde_Imap_Client_Base#setQuota()
- Horde_Imap_Client_Base#status()
- Horde_Imap_Client_Base#statusMultiple()
- Horde_Imap_Client_Base#store()
- Horde_Imap_Client_Base#subscribeMailbox()
- Horde_Imap_Client_Base#thread()
These methods now require the mailbox parameter(s) to be passed in as
either a Horde_Imap_Client_Mailbox object (RECOMMENDED) or a UTF-8
string. Passing in a UTF7-IMAP string is DEPRECATED and will be removed
in 2.0.0. (The limitation of allowing UTF7-IMAP strings to be continued
to be passed in for now is that auto-detection remains necessary. Passing
in UTF-8 strings will thus break for certain mailbox names - the only
way to guarantee proper mailbox handling for 1.2.0+ is to pass in Mailbox
objects.)
- Horde_Imap_Client_Base#getMetadata()
The $entries parameter now requires the entries to be passed in as
UTF-8 strings ONLY (UTF7-IMAP no longer allowed). Auto-detection will be
removed in 2.0.0. To ensure proper mailbox handling in 1.2.0+, you can pass
the entries as Horde_Imap_Client_Mailbox objects.
- Horde_Imap_Client_Base#getNamespaces()
The $additional parameter now requires the namespaces to be passed in as
UTF-8 strings ONLY (UTF7-IMAP no longer allowed). Auto-detection will be
removed in 2.0.0. To ensure proper mailbox handling in 1.2.0+, you can pass
the namespace names as Horde_Imap_Client_Mailbox objects.
- Horde_Imap_Client_Base#listMailboxes()
The $pattern parameter now requires the patterns to be passed in as
UTF-8 strings ONLY (UTF7-IMAP no longer allowed). Auto-detection will be
removed in 2.0.0. To ensure proper mailbox handling in 1.2.0+, you can pass
the patterns as Horde_Imap_Client_Mailbox objects.
The 'utf8' parameter has been removed.
- Horde_Imap_Client_Base#listACLRights()
- Horde_Imap_Client_Base#setACL()
The $identifier parameter now requires the identifiers to be passed in as
UTF-8 strings ONLY (UTF7-IMAP no longer allowed). Auto-detection will be
removed in 1.3. To ensure proper mailbox handling in 1.2.0+, you can pass
the identifiers as Horde_Imap_Client_Mailbox objects.
- Horde_Imap_Client_Cache#__construct()
A new required parameter 'baseob' has been added. This replaces the
'hostspec', 'port', and 'username' parameters, which are deprecated and
will be removed in 2.0.0.
The 'debug' parameter is now a boolean indicating whether debugging is
desired; debug output is now controlled via the Base object passed in
through 'baseob'. The old usage - passing in a resource - is IMMEDIATELY
deprecated and will be ignored.
- Horde_Imap_Client_Utf7imap::Utf8ToUtf7Imap()
Added the $force parameter.
New Methods
-----------
- Horde_Imap_Client_Base#getIdsOb()
- Horde_Imap_Client_Base#writeDebug()
New Objects
-----------
- Horde_Imap_Client_Ids
- Horde_Imap_Client_Ids_Pop3
- Horde_Imap_Client_Mailbox
- Horde_Imap_Client_Utils_Pop3
Upgrading To 1.1.0
==================
New Object Properties
---------------------
- Horde_Imap_Client_Data_Envelope
Added properties to obtain MIME decoded envelope information. New
properties: 'bcc_decoded', 'cc_decoded', 'from_decoded',
'reply_to_decoded', 'sender_decoded', 'subject_decoded', 'to_decoded'