This version doesn't have fundamental changes but will break enough existing code to justify a new major version.
- Removed support for PHP7.4. MphpD v2 only supports PHP8.2 and newer.
- Introduced more strict typing
- Changed argument types:
- All
$pos(position) arguments now only acceptintornull - All
$rangearguments now acceptarrayornull
- All
- Deprecated
DB::findin favor ofDB::search - Deprecated
Playlist::get_songsin favor ofPlaylist::get - Deprecated
Queue::find,Queue::add_findandQueue::add_search - Moved
Queue::add_searchfunctionality toDB::search_add Queue::searchnow has a$case_sensitiveparameter.DB::searchnow has$case_sensitiveparameters.
- Implemented new commands:
sticker incviaSticker::incrementsticker decviaSticker::decrementstickertypesandstickernamesviaMphpD::stickersplaylistlengthviaPlaylist::lengthplaylistfindviaPlaylist::findprotocolviaProtocol-Class- Implement
$rangeforlistplaylistandlistplaylistinfovia newPlaylist::get
- Wrote new tests for pretty much everything
- Fixed empty
$uriinSticker::find
- Fixed
Queue::add_findnot adding songs to queue
Filtermay now have empty$tagand$operatorin constructor.
- Fixed
DB::get_picturenot returningfalseon error.
- Fixed #17 (again)
- You can now search for empty strings when using
Filters.
- Fixed critical parsing bug when using
MPD_CMD_READ_LIST_SINGLE.
- Fixed DB::get_picture and DB::read_picture incorrectly returning false when file did not contain an image.
- Added new
DB::get_picturefunction.
- Fixed return type of
Queue::get. Issue #18.
- Fixed
MPD_CMD_READ_LIST_SINGLEfor real this time. DB::read_picturedoes not throw a warning anymore if the requested file did not contain a picture. In that case an empty string is returned (as before).DB::countandDB::listnow return correct values when$groupis set. This is probably a breaking change but it was broken before.
- Added
$case_sensitive-parameter toDB::count. MPD commandsearchcountis therefore supported as well. - Added new parse-mode
MPD_CMD_READ_GROUPfor grouped responses.
- Fixed
MPD_CMD_READ_LIST_SINGLEfor real this time.
DB::read_picturedoes not throw a warning anymore if the requested file did not contain a picture. In that case an empty string is returned (as before).
- Added
$case_sensitive-parameter toDB::count. MPD commandsearchcountis therefore supported as well. - Added new parse-mode
MPD_CMD_READ_GROUPfor grouped responses.
DB::countandDB::listnow return correct values when$groupis set. This is probably a breaking change but it was broken before.
- [FIX] command parameters are not double-escaped anymore. This caused a lot of problems with special chars.
- [FIX] Fix parsing behaviour for mode
MPD_CMD_READ_LIST_SINGLE. We do not blame the user anymore.
You may now consider the majority of this library stable.
- [FIX] Improved documentation.
- [FIX] Fixed return type of Playlist::get_songs()
- [FIX] Fixed critical unnoticed typo in composer.json
- [BREAKING CHANGE] Reorganized Namespaces of nearly all classes.
- [BREAKING CHANGE] Moved all classes to src/ directory.
- [FIX] Updated namespace in composer.json for psr-4 autoloading.
- [FIX] Cleaned up docblocks and added several docblocks for classes.
- [FIX] The whole documentation is now in this repo including a rather ugly buildscript.
- [MISC] Moved utils.php to classes/Utils.php therefore moved the functions inside into a new Utils class.
- [BREAKING CHANGE] Renamed the main class file
mphpd.phptoMphpD.php. - [FIX]
Floatsreturned from MPD are not casted intointsanymore (#13).MphpD::statusmay now returnfloatif$itemscontain only one item. - The library is now available as a composer package. Hurray.
- [BREAKING CHANGE] Removed Mount.php and moved
mount()andunmount()to MphpD class - [BREAKING CHANGE] (re)moved
DB::list_allandDB::list_filesinto a newDB::lsmethod. - [BREAKING CHANGE]
Player::play()doesn't unpause anymore if no$posis given.$posis now required. - [FIX] Fixed bug in parses with
$mode = MPD_CMD_READ_LIST. - [FIX] Return type of
Queue::add_idis nowint|falseinstead ofarray - [FIX] Return type of
Queue::add_findis nowboolinstead ofarray - [FIX]
$sortis not required anymore inQueue::add_search - [FIX]
Queue::finddoes now work - [FIX]
Queue::getnow returns a list when$pis omitted instead of a single song - [FIX]
Queue::range_iddoes not produce an error anymore if$rangeis omitted - [FIX]
plchangesandplchangesposidinQueue::changesis not reversed anymore. - [FIX]
Player::volumeis not causing anUndefined array key-error anymore - [FIX]
MphpD::get_last_errornow returns an empty array if there was no error yet - [FIX] Return type of
Playlist::renameis nowboolinstead ofarray - [FIX] Fixed bug when saving a playlist on MPD versions before 0.24
- [FIX] Fixed bug in
Sticker::listwhen parsing stickers - [FIX] Fixed bug in
Sticker::findwhen $uri was empty - [FIX] Fixed bug when using UNIX socket (#10)
Player::consumeandPlayer::singlenow throw an MPDException if the given$modeis not supported- Made
MphpD::readlsprivate
This release breaks but also fixes a lot of stuff. I'm lucky this library is A: private and B: still in development so we can break stuff without anyone noticing.
- [BREAKING CHANGE] Renamed a lot of methods to be more consistent (snake_case)
- [BREAKING CHANGE] Split up Status.php
- [BREAKING CHANGE] Moved searchadd,findadd and searchaddpl away from DB.php
- [BREAKING CHANGE] Renamed getError to get_last_error and made it return
arrayinstead ofMPDException - [FIX] Fixed critical bug in response parser
- [FIX] Fixed Filters
- [FIX] Fixed bug in Channel.php where unread messages where thrown away
- [NEW] Introduced
MPD_CMD_READ_BOOLand replaced!== falsein a lot of methods - Added copyright notice to source files
- Wrote some more tests (a lot more need to be written)
- Added required PHP functions to README
This is the first "real" release for MphpD.
- current MPD version (0.23.11) is fully supported
- MphpD::player::volume() now also work on MPD version <0.23.
- MphpD::binarylimit is now ignored for MPD version <0.22.4.
Some cleanup still needs to be done before the 1.0.0 release.