thiemowmde created this task. thiemowmde added projects: Wikidata, MediaWiki-extensions-WikibaseRepository, MediaWiki-extensions-WikibaseClient, Need-volunteer. Herald added subscribers: PokestarFan, Aklapper. |
TASK DESCRIPTION
Being "PSR-4 compatible" means that the full qualified name of a class is equal to it's directory and file name. For example, the file …/Wikibase/client/includes/Api/ApiClientInfo.php contains the class \Wikibase\Client\Api\ApiClientInfo. The mapping for this can be found in Wikibase.git's composer.json in the "psr-4" section: "Wikibase\\Client\\": "client/includes" and so on.
Even if most classes in the Wikibase.git code base are already PSR-4 compatible, some are not, which is the reason why composer.json still contains such a long "classmap" section.
The goal of this ticket is to get rid of the two "classmap" entries "lib/includes/" and "repo/includes/".
- Note that the "psr-4" section already lists all directories. This does not mean they are fully PSR-4 compatible.
- This ticket is not about the components in the vendor directory (#datavalues, #wikibase-datamodel and so on). Changing these is more troublesome because it usually means a breaking release of the component must be made. This is barely worth the trouble.
- This ticket is only about "classmap" entries that reference directories. Entries for individual files are not a problem. They may also be made PSR-4 compatible while working on this ticket, but only if it's worth the trouble.
- It might not be possible to make the maintenance directories PSR-4 compatible, because the file names must follow the naming scheme of maintenance scripts, and can not be made equal to the class name in these file.
- I suggest to create a chain of small patches, each one only touching a single directory, or even a single class if it happens to be used a lot. This makes reviewing much easier.
- You must make sure other code repositories that use Wikibase.git classes are updated when you change the namespace of a class. Make sure you have the following extensions installed, or an other way to find usages across these projects. Warning: Some usages are hidden in strings!
- ArticlePlaceholder
- Echo
- Math
- MobileFrontend
- PropertySuggester
- WikibaseLexeme
- WikibaseMediaInfo
- WikibaseQuality
- WikibaseQualityConstraints
- WikibaseQualityExternalValidation
- Wikidata.org
- WikidataPageBanner
- WikimediaBadges
TASK DETAIL
EMAIL PREFERENCES
To: thiemowmde
Cc: Aklapper, PokestarFan, WMDE-leszek, Jakob_WMDE, daniel, Aleksey_WMDE, Ladsgroup, Lydia_Pintscher, thiemowmde, GoranSMilovanovic, Soteriaspace, JakeTheDeveloper, QZanden, Izno, Wikidata-bugs, aude, TheDJ, Mbch331
Cc: Aklapper, PokestarFan, WMDE-leszek, Jakob_WMDE, daniel, Aleksey_WMDE, Ladsgroup, Lydia_Pintscher, thiemowmde, GoranSMilovanovic, Soteriaspace, JakeTheDeveloper, QZanden, Izno, Wikidata-bugs, aude, TheDJ, Mbch331
_______________________________________________ Wikidata-bugs mailing list Wikidata-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs