-
-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix composer autoload #79
base: master
Are you sure you want to change the base?
Fix composer autoload #79
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #79 +/- ##
=========================================
Coverage 97.28% 97.28%
Complexity 67 67
=========================================
Files 6 6
Lines 184 184
=========================================
Hits 179 179
Misses 5 5 ☔ View full report in Codecov by Sentry. |
@@ -28,11 +28,9 @@ | |||
}, | |||
"require": { | |||
"php": ">=7.1", | |||
"composer/installers": "1.*,>=1.0.1", | |||
"mediawiki/semantic-media-wiki": "~3.1|~4.0" | |||
"composer/installers": "1.*,>=1.0.1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@thomas-topway-it Out of curiosity: How does the extension know it requires SMW hard?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kghbln hello Karsten, from SemanticMetaTags.php
public static function onExtensionFunction() {
if ( !defined( 'SMW_VERSION' ) ) {
if ( PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg' ) {
die( "\nThe 'Semantic Meta Tags' extension requires 'Semantic MediaWiki' to be installed and enabled.\n" );
} else {
die(
'<b>Error:</b> The <a href="https://www.semantic-mediawiki.org/wiki/Extension:Semantic_Meta_Tags">Semantic Meta Tags</a> ' .
'extension requires <a href="https://www.semantic-mediawiki.org/wiki/Semantic_MediaWiki">Semantic MediaWiki</a> to be ' .
'installed and enabled.<br>'
);
}
}
(if I understood correctly the question)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, you did understand correctly. I was asking out of curiosity since other extensions still do it even both in https://github.com/SemanticMediaWiki/SemanticExtraSpecialProperties/blob/master/extension.json#L18 and https://github.com/SemanticMediaWiki/SemanticExtraSpecialProperties/blob/master/composer.json#L48 though that particular extension does no longer have a SemanticExtraSpecialProperties.php to be able to check this information.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the main reason I've removed it, it is for testing purposes to allow installing the required libraries (mainly easyRdf and json-ld, see here #80 ) in the extension's folder. Therefore once that #80 will be merged the SMW require in composer could be restored back. (if deemed necessary, for this actually we should check the strategy followed by all similar extensions dependent on SMW)
@thomas-topway-it Is this still a work in progress? If not, your changes should be reviewed and merged for a new release. |
I'm sorry, I have to fix the tests before |
No worries. |
so now it should work. @kghbln and @gesinn-it-gea are you able to test/check it together with #80 ? once that the 2 PRs will be merged or verified, we could also restore the loading through composer, also if in my opinion is not necessary |
I currently do not have the time to test. |
Fixes #76
composer.json
toextension.json
semantic-media-wiki
require to allow running composer in the extension folder