Skip to content

Releases: arokettu/torrent-file

3.1.0

02 Dec 09:19

Choose a tag to compare

  • Added version option
    • Creation of V2 torrents is now allowed (BEP-52)
  • New and changed methods to get info hash:
    • getInfoHash() will return V2 info hash if V2 metadata is present
    • New method getInfoHashV1() to get V1 hash explicitly
    • New method getInfoHashV2() to get V2 hash explicitly
    • New method getInfoHashes() to get all metadata hashes as array
  • Fixed detectExec option not having any effect

2.3.0

02 Dec 09:18

Choose a tag to compare

  • Added version option
    • Creation of V2 torrents is now allowed (BEP-52)
  • New and changed methods to get info hash:
    • getInfoHash() will return V2 info hash if V2 metadata is present
    • New method getInfoHashV1() to get V1 hash explicitly
    • New method getInfoHashV2() to get V2 hash explicitly
    • New method getInfoHashes() to get all metadata hashes as array
  • Fixed detectExec option not having any effect

3.0.1

01 Dec 08:01

Choose a tag to compare

  • Node: getters were replaced with readonly properties.
    Getters are kept for now, but they will be deprecated in 3.2.
  • FileDataProgressEvent: getters were returned for smoother upgrade.
    They will be deprecated in 3.2.

3.0.0

30 Nov 17:00

Choose a tag to compare

(forked from 2.2.0)

  • PHP 8.1 is now required
  • In TorrentFile::forPath() options array is removed and replaced with named parameters
  • getCreationDate() now returns an instance of DateTimeImmutable
    • getCreationDateAsDateTime() and getCreationDateAsTimestamp() now trigger silent deprecations
  • getAnnounceList() now returns an instance of AnnounceList
    • getAnnounceListAsArray() and getAnnounceListAsObject() now trigger silent deprecations
  • FileDataProgressEvent: getters were replaced with readonly properties

2.2.0

30 Nov 16:58

Choose a tag to compare

  • Fixed possible announce list corruption if deduplication of trackers happened
  • Fixed null handling on announce and created by
  • getRawData() now always returns the representation as it would appear in the saved file
  • TorrentFile now serializes in cross version compatible manner
  • Added 2 temporary methods: getCreationDateAsDateTime() and getCreationDateAsTimestamp()
    to simplify future migration to 3.x.
    In 3.x getCreationDate() will return DateTimeImmutable instead of int
  • Added 2 temporary methods: getAnnounceListAsArray() and getAnnounceListAsObject()
    to simplify future migration to 3.x.
    In 3.x getAnnounceList() will return AnnounceList instead of string[][]
  • Added support for nodes field (BEP-5)
  • Added support for httpseeds field (BEP-17)
  • Added support for url-list field (BEP-19)
  • Added setName() and getName()
  • Added isDirectory()
  • sortFiles option is deprecated and no longer has any effect. Files are always sorted now (BEP-52 compatibility)
  • pieceLength option is validated to be pow of 2 and at least 16 KiB (BEP-52 compatibility)
  • md5sum option is deprecated and no longer has any effect
  • sha1 sums for all files are now generated (BEP-47)
  • The library now detects executable files and sets the attribute (BEP-47)
    • Enabled by default. Set the new option detectExec to false to disable it
  • The library now detects symlinks (BEP-47)
    • Disabled by default. Set the new option detectSymlinks to true to enable it
  • The library now allows aligning files to piece boundaries (BEP-47)
    • Disabled by default. Set the new option pieceAlign to true or minimum bytes value to enable it

2.1.2

25 Sep 02:24

Choose a tag to compare

  • Allow bencode 3.0, bump requirements to bencode 1.7+/2.7+/3.0+

2.1.1

25 Feb 21:19

Choose a tag to compare

  • Fixed deprecated behavior not removed in 2.0.0:
    TorrentFile::__construct() is now private

2.1.0

19 Feb 00:32

Choose a tag to compare

  • Add Stream API from Bencode 1.5/2.5
  • Add big integer support from Bencode 1.6/2.6

2.0.0

17 Nov 20:20

Choose a tag to compare

  • Bump PHP requirement to PHP 7.4
  • Replace FileDataProgress with Event Dispatcher (PSR-14) + FileDataProgressEvent
  • 100% test coverage

1.3.1

09 Nov 05:01

Choose a tag to compare

  • Use saner url encoder for getMagnetLink()
  • Bump PHP requirement from 7.1.0 to 7.1.3 to match dependencies