Page MenuHomePhabricator

Use strict types everywhere in Wikibase.git
Open, LowPublic

Description

Estimation of completion (note: requires Bash, not Zsh or other sh):

done=$(grep --exclude-dir={vendor,node_modules,.idea,.phan} --include=\*.php -rwl . -e strict_types | wc -l) &&
todo=$(grep --exclude-dir={vendor,node_modules,.idea,.phan} --include=\*.php -rwl . -e . | wc -l) &&
percent=$(bc <<< "scale=5; 100 * $done / $todo") &&
head=$(git -c core.abbrev=10 rev-parse --short HEAD) &&
LC_ALL=C printf '* %(%d %B %Y)T (%s) = %d/%d = %1.2f%%\n' -1 "$head" "$done" "$todo" "$percent"

Related Objects

Mentioned In
T287518: Investigate enforcing type hints for new code
Mentioned Here
rEWBAb6d8d5d8c389: Merge "REST: Handle bot flag and tags in DELETE siteLink"
rEWBAbba6b14ab930: Merge "Removed the usage of splitSerialization from DispatchingIdParser"
rEWBA2ec4850585ae: Merge "Add strict types to FullEntityParserOutputGenerator"
rEWBAa0d53056b428: Merge "Add strict types to HtmlPageLinkRendererEndHookHandler"
rEWBAa846ad4a1396: Merge "REST: Add single description by language route to OAS"
rEWBAdb5fb3028faa: Merge "Fix `addSite.php` example command in Wikibase docs"
T289040: Migrate DataModel, DataModelServices, DataModelSerialization, WBInternalSerialization to Wikibase.git
rEWBAe699bca6e909: Localisation updates from https://translatewiki.net.
rEWBAee5ebff1924f: Merge "FP: Introduce SourceDispatchingPropertyDataTypeLookup"
rEWBAbce035b61f15: Merge "Add documentation for API param values"
rEWBA973532f14996: Localisation updates from https://translatewiki.net.
rEWBAa350b421f4ce: Merge "Remove StorageEntitySerializer from WikibaseServices"
rEWBAd742344560d7: Merge "Test all unicode in month names (using new data-values/time)"
rEWBA32d9945e9596: Localisation updates from https://translatewiki.net.
rEWBA7eebaa5e5260: Merge "Add RepoRevisionIdentifier+Factory"
rEWBAaca4c86cbe3f: Merge "Add pruneItemsPerSite maintenance script"
rEWBA84da94209aab: bridge: Edit entity with or without asserting of the user
rEWBA518713705434: Merge "Optimize NoBadDependencyUsageTest a bit"
rEWBAa8ab42ecda7a: Merge "Fix limit not applied in case of language fallback"

Event Timeline

Change 592297 had a related patch set uploaded (by Addshore; owner: Addshore):
[mediawiki/extensions/Wikibase@master] Add ADR for rollout of declare( strict_types = 1 );

https://gerrit.wikimedia.org/r/592297

On the campsite for the ADR review period.

hoo renamed this task from Use strict types everywhere in WIkibase to Use strict types everywhere in Wikibase.Apr 30 2020, 11:23 PM

Change 592297 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Add ADR for rollout of declare( strict_types = 1 );

https://gerrit.wikimedia.org/r/592297

Addshore updated the task description. (Show Details)

I updated the shell script in the task description to directly print a new line for the estimation list, but didn’t change the “todo” and “done” commands. But doesn’t this underestimate the real progress if the “done” command excludes several directories, but the “todo” command doesn’t?

Edit: after rm -rf vendor/, I get instead:

  • 15 July 2020 = 151/1744 = 8.00%

Updated the script and the outputs so that “todo” and “done” both consider the same set of files. (I wasn’t able to find a commit where we had two strict_types declarations – we went from one in aca4c86cbe to five in 7eebaa5e52 as far as I can tell – but for the other days, the number of done files matched up.)

Addshore renamed this task from Use strict types everywhere in Wikibase to Use strict types everywhere in Wikibase.git.May 19 2021, 2:36 PM
Addshore updated the task description. (Show Details)
dang removed dang as the assignee of this task.Dec 8 2021, 1:21 PM
dang subscribed.

Change 885000 had a related patch set uploaded (by Michael Große; author: Michael Große):

[mediawiki/extensions/Wikibase@master] Add types to client's BeforePageDisplayHandler

https://gerrit.wikimedia.org/r/885000

Change 885000 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Add types to client's BeforePageDisplayHandler

https://gerrit.wikimedia.org/r/885000

Change 928858 had a related patch set uploaded (by Michael Große; author: Michael Große):

[mediawiki/extensions/Wikibase@master] Add strict types to FullEntityParserOutputGenerator

https://gerrit.wikimedia.org/r/928858

Change 928858 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Add strict types to FullEntityParserOutputGenerator

https://gerrit.wikimedia.org/r/928858