Upgrade from Version 1.1 to 3.0

Maniaplanet public API, ManiaConnect system and the open source PHP SDK.

Moderator: NADEO

Post Reply
User avatar
Electron
Posts: 797
Joined: 15 Jun 2010, 18:02
Contact:

Upgrade from Version 1.1 to 3.0

Post by Electron »

I try to update from version 1.1 to 3.0. But I get the following error:
PHP Fatal error: Class 'ManiaLib\Utils\Singleton' not found in <my_path>\ManiaPlanet-WS-SDK\libraries\Maniaplanet\WebServices\Config.php on line 16
It looks like Maniaplanet Web Services requires now ManiaLib installed. :( Is that true?

If ManiaLib is requires, please explain.
I try to install ManiaLib but it looks like the path to the library is not defined correct in ManiaPlanet-WS-SDK\libraries\autoload.php. How to install ManiaLib? Do I need to configue ManiaLib? Is it possible to use Maniaplanet Web Services without ManiaLib?

It looks like Maniaplanet Web Services and ManiaLib have to merged in one common directory so the 'libraries' folder is shared. But both ZIP files extracts to different folders 'manialib' and 'maniaplanet-ws-sdk'. That's very confusing.

Using the MPWS SDK 1.1 I only uploaded the 'libraries' folder on the server. That seems not be enough with ManiaLib, right?
User avatar
m4rcel
Posts: 650
Joined: 15 Jun 2010, 11:12
Contact:

Re: Upgrade from Version 1.1 to 3.0

Post by m4rcel »

You only need the Singleton class from ManiaLib to make the new SDK working. But I personally would prefer to not have anything from ManiaLib required in the MPWS (i.e. with copy&pasting the Singleton class to MPWS).

To make MPWS work as it is now, do the following:
Let's say the Config class is in libraries\Maniaplanet\WebServices\Config.php, then you simply put the Singleton class into libraries\ManiaLin\Utils\Singleton.php.
If done, it should already work (unless the MPWS uses other ManiaLib classes as well ^^). You may of course merge the two libraries folders to have the full ManiaLib project if needed.
ImageImage
Image
User avatar
magnetik
Posts: 1673
Joined: 01 Feb 2012, 19:13
Location: Bordeaux
Contact:

Re: Upgrade from Version 1.1 to 3.0

Post by magnetik »

It's an error.

We will publishing a new version very soon.
ManiaPlanet technical documentation portal (Dedicated, ManiaLink, ManiaScript, Titles...) -- contribute!
User avatar
gouxim
Nadeo
Nadeo
Posts: 1186
Joined: 14 Jun 2010, 17:20

Re: Upgrade from Version 1.1 to 3.0

Post by gouxim »

Indeed. 3.0.1 released, fixes that bug: http://code.google.com/p/maniaplanet-ws ... -3.0.1.zip
Please do not PM for support. Instead, create a thread so that everyone can contribute or benefit from the answer! 8-)
Post Reply

Return to “Maniaplanet Web Services”

Who is online

Users browsing this forum: No registered users and 0 guests