- Posts: 13935
- Thank you received: 2551
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Preparing plugin for API update
- DenisChenu
- Topic Author
- Offline
- LimeSurvey Community Team
Some update can be done stay compatible with old LimeSurvey, some not.
I don't test whole (in all version of LimeSurvey), but can be interesting for other plugin dev.
1: extend of class name : usage of
class myPlugin extends PluginBase
class myPlugin extends \ls\pluginmanager\PluginBase
2: constructor
public function __construct(PluginManager $manager, $id) { parent::__construct($manager, $id);
public function init() {
public function __construct(\ls\pluginmanager\PluginManager $manager, $id) { parent::__construct($manager, $id);
Alternative solutuion : use
Adding this 2 lines at start of your class:
use \ls\pluginmanager\PluginBase use \ls\pluginmanager\PluginManager
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
- jelo
- Offline
- Platinum Member
- Posts: 5070
- Thank you received: 1263
What is 2.05? Is that a API version or a LS version?DenisChenu wrote: 1st 2.05 and 2.63.0 : it can be great
If it is a LS version the confusion is that the current LTS version is called 2.6.X.
Referencing to 2.05 will add confusion if LTS is meant.
From just following the forum I wonder if any thread brought attention to a API update pending.
Since you're spending extra time doing this, I just wonder about the silence from LS GmbH about these things.
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
- DenisChenu
- Topic Author
- Offline
- LimeSurvey Community Team
- Posts: 13935
- Thank you received: 2551
I already answer : it's 2.05, not 2.6lts.jelo wrote: What is 2.05? Is that a API version or a LS version?
If it is a LS version the confusion is that the current LTS version is called 2.6.X.
2.6 lts are ready (have init function ready), 1st 2.06 are ready (have init too).
I didn' test with the 1st 2.05 version (and some of our user have 2.05 version)
API update must be done in 3.0/develop version only, since LimeSurvey use Semantic Versioning 2.0.0 ( semver.org/ ) versdionning : all API broker must be done ONLY for major release.
It's not the case between (2.05|2.06.2.6lts) to 2.50.0, but i HOPE it can be the case after 3.0.0
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
- jelo
- Offline
- Platinum Member
- Posts: 5070
- Thank you received: 1263
Thanks for pointing it out to me.DenisChenu wrote: I already answer : it's 2.05, not 2.6lts.
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
- holch
- Offline
- LimeSurvey Community Team
- Posts: 11758
- Thank you received: 2753
2.05
2.06lts
2.6lts
2.5x
2.6x
...
I really think it was an unnecessary move to rename the 2.0x branch to 2.x... totally confusing for "normal" users. But who needs users, right?
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
- Ben_V
- Offline
- Platinum Member
- Posts: 1223
- Thank you received: 351
+1holch wrote: I really think it was an unnecessary move to rename the 2.0x branch to 2.x... totally confusing for "normal" users. But who needs users, right?
Benoît
EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)
- DenisChenu
- Topic Author
- Offline
- LimeSurvey Community Team
- Posts: 13935
- Thank you received: 2551
Updating API protocol with same number ( 2.05 at start have not same API than 2.05 at end).
But it's an old issue, now it's semver and we try to respect API (here the 2.63.1 revert the broken API part).
The : now
1. If you have a template or a plugin or an external system (using RPC) (without bad hack)
2. If in a release YOUR system was broken
3. Report the bug : broke the API => update major version
What is API
- For plugin : you use $this or $this->getEvent : it's in API. You use Yii::app() : you go out of API (but move to Yii 2 is surely a new major version too, then : you follow API of Yii)
- For RPC : usage of function : your function work with such parameters in such order : if LS core update order (for example) => it's a major version
- For template : it's more unclear , but without workaround : you follow API.
Remind : my Point Of View, i didn't (and never) talk for LimeSurvey.
Denis
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
- jelo
- Offline
- Platinum Member
- Posts: 5070
- Thank you received: 1263
LS GmbH is looking for customers, not users. Customers are users which are paying for something.holch wrote: I really think it was an unnecessary move to rename the 2.0x branch to 2.x... totally confusing for "normal" users. But who needs users, right?
The change is OK, but the usage in the forum needs to be stringent.
Version X.Y.Z
Version 2.6 is the same as 2.06 since 6 and 06 is the same value.
So if you mean 2.50 you cannot write 2.5 as we all have done in the past.
5 ist not 50.
X.50.Z is NOT the same as X.5.Z
X.05.Z is the same as X.5.Z
The comfortupdater is showing them like this:
2.6.4-lts (170202) (stable)
2.63.1 (170305) (stable)
The LTS suffix will ease confusion about version schema.
As long as -lts is added it should be no longer a big issue. LS 3.Y.Z will solve that issue completely.
We hopefully won't see a 2.63.Z LTS.
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
- jelo
- Offline
- Platinum Member
- Posts: 5070
- Thank you received: 1263
No need to say it is your POV. Currently the LimeSurvey OpenSource Project is 100% steered by and depended on the business decisions of LimeSurvey GmbH. Hopefully we won't get into a Mambo/Joomla situation.DenisChenu wrote: Remind : my Point Of View, i didn't (and never) talk for LimeSurvey.
I thought a API versioning should be complete independent from the LS version.
Is a move to Yii 2 planned? Never read anything about Yii 2 related to LS.
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
- DenisChenu
- Topic Author
- Offline
- LimeSurvey Community Team
- Posts: 13935
- Thank you received: 2551
You can't really, else you have to leave some buggy code and hard to maintain code.jelo wrote: ....
I thought a API versioning should be complete independent from the LS version.
...
semver allow this : majopr version potentially broke API.
Same for Android : a tool done for android 4 can break in Android 7. You want to leave android unmodified ?
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
- jelo
- Offline
- Platinum Member
- Posts: 5070
- Thank you received: 1263
Buggy and hard to maintain code is the norm.DenisChenu wrote: You can't really, else you have to leave some buggy code and hard to maintain code.
Or in other word: "It’s not just irreducible complexity; it’s unknown complexity." from "Features are faults"
www.tedunangst.com/flak/post/features-are-faults
There is no HOPE.
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
- Ben_V
- Offline
- Platinum Member
- Posts: 1223
- Thank you received: 351
Benoît
EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)