Closed oetterer closed 8 years ago
It could indeed be an enhancement to let sysadmins decide whether they want to install Scribunto via Composer or not. If Scribunto is not there this extension could throw a message like other extensions saying that a requirement was not met.
Note: Must be a bug with @GitHub. I just added the "question" label.
Sorry, but no, it would certainly not be an enhancement. The whole point of Composer is to manage dependencies, so you do not have to do that manually. Not declaring the dependency on mediawiki/scribunto
does not make any sense at all.
If you still think you still think managing dev versions manually is a good idea, try adding the following to composer.local.json
:
"replace": {
"mediawiki/scribunto":"1.0.0"
},
You are then of course alone in figuring out the correct version of mediawiki/scribunto
and keeping it up to date. You might also run into issues with the autoloader, not sure.
Not declaring the dependency on mediawiki/scribunto does not make any sense at all.
Exactly, that's the general idea behind a dependency deceleration.
It could indeed be an enhancement to let sysadmins decide whether they want to install Scribunto via Composer or not.
Composer and dependency declarations are more than forcing someone to install the package via Composer (it just so happens that Composer is the tool of choice for PHP). Dependency declarations and hereby management is important to make dependencies explicit and define boundaries of features.
WMF developers write software with a narrow context making borders implicit and forcing others to do the same, resulting in releases that are all but stable. I can cite enough examples for just MW 1.28 where someone just removes some functions leaving others to bend the bridge just to make it work again (and all you get is a " ... I understand your frustration, and it's something that I'm trying to work on as a whole ..." ).
If you are serious about the development process then you define a package and test it with the a defined release to make sure it works for the boundaries defined and doesn't break like an old car [0].
The problem is that the mediawiki/scribunto
doesn't contain any stable releases (you always have a @dev...
release tag), long story short, for now I removed #13 the package.
If Scribunto is not there this extension could throw a message like other extensions saying that a requirement was not met.
I guess this one may be closed and may serve for future reference once all dependencies are in here again.
Setup and configuration
Issue
I ran the install as described in the installation manual. Note that with 1.27.1 composer is used for mediawiki core and stable is the mininum stability required by default. Consequently the install fails with
Which hopefully will be solved when sso has its first stable release.
Running composer require mediawiki/semantic-scribunto:~1.0@dev let us get one step further but still fails with
Adding both
to composer.local.json let me finally install sso. Which brings me to the core of this issue.
It is not so difficult for people to install scribunto and sso both manually and little gained in putting scribunto in sso's require list. In my case as described above I had to install it manually, even though I already downloaded and used it (only not with composer). Also, there might be more users like me trying to keep composer installed extensions at a mininum, so until now I installed Scribunto directly from its repository. [0]
Furthermore my line of thinking: SSO will be installed by users who want to bridge scribunto and smw making it very likely they have both extensions installed already. All functionaliy of SSO on the other hand is tied to the hook ScribuntoExternalLibraries. So in the unlikely case someone does not install Scribunto, SSO simply does nothing and should not produce any exceptions or errors.
Concluding: Could you please either remove the scribunto dependency or put in into the "suggest" section (maybe in require-dev?)?
Regards, Tobi
[0]: long story being, that I have my mw software in a repository and installed all extensions via submodule. Excluded from that are the smw composer extensions which unfortunately always complicate merges, pulls, upgrades, etc...