Page MenuHomePhabricator

Enforce dependency rules with PHPat
Closed, ResolvedPublic

Description

We chose to try out PHPat for enforcing the dependency rules within the Wikibase REST API namespaces.

This was partially done in this patch: https://gerrit.wikimedia.org/r/865577

Checks for the following namespaces/layers:

  • Domain
  • Domain Services
  • Serialization
  • Validation
  • Use Cases
  • Presentation

Event Timeline

Jakob_WMDE renamed this task from Enforce dependency rules with phparch to Enforce dependency rules with PHPat.Dec 8 2022, 3:19 PM
Jakob_WMDE updated the task description. (Show Details)

Change 865577 had a related patch set uploaded (by Jakob; author: Jakob):

[mediawiki/extensions/Wikibase@master] REST: Enforce dependency rules with phpat

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

Change 865577 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] REST: Enforce dependency rules with phpat

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

Change 902012 had a related patch set uploaded (by Jakob; author: Jakob):

[mediawiki/extensions/Wikibase@master] REST: Nest dependencies in PHPat test

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

Change 902099 had a related patch set uploaded (by Jakob; author: Jakob):

[mediawiki/extensions/Wikibase@master] REST: Enforce serialization namespace dependencies

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

Change 902106 had a related patch set uploaded (by Jakob; author: Jakob):

[mediawiki/extensions/Wikibase@master] REST: Enforce validation namespace dependencies

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

Change 902108 had a related patch set uploaded (by Jakob; author: Jakob):

[mediawiki/extensions/Wikibase@master] REST: Enforce presentation namespace dependencies

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

Change 902012 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] REST: Nest dependencies in PHPat test

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

Change 902099 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] REST: Enforce serialization namespace dependencies

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

Change 902687 had a related patch set uploaded (by Jakob; author: Jakob):

[mediawiki/extensions/Wikibase@master] REST: Allow DataValues as a domain model dependency

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

Change 902106 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] REST: Enforce validation namespace dependencies

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

Change 902108 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] REST: Enforce presentation namespace dependencies

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

Change 902687 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] REST: Allow DataValues as a domain model dependency

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

Since the task description mentions that this is to “try out” something (and the task is still open), I’ll mention that we had to remove the PHPStan check on the REL1_40 branch (see T333454), and unless a better solution is found, it’ll have to be removed on REL1_41, REL1_42 etc. as well.

Since the task description mentions that this is to “try out” something (and the task is still open), I’ll mention that we had to remove the PHPStan check on the REL1_40 branch (see T333454), and unless a better solution is found, it’ll have to be removed on REL1_41, REL1_42 etc. as well.

Thanks for the shout. We like PHPat and are past the "try out" phase now and the task is in the done column, we just didn't close it yet.

I mentioned in our daily that T333454 is causing trouble and we'll very likely pick it up in the next sprint (in two weeks).