Page MenuHomePhorge

Unbreak the creation of Packages Versions
ClosedPublic

Authored by mainframe98 on Sat, Feb 15, 21:09.

Details

Summary

Allow the creation of versions in Packages
by specifying a dummy Package to allow the
extended policy checks to pass. Versions
require that the package they're a version
of be accessible to the viewer, but that
means a package is required during creation.

This also initializes the attached package
property to the un-attached state, which
was missing. This should make it easier to
fix when misused.

Currently trying to create versions in Packages throws:

EXCEPTION: (Error) Call to a member function getPHID() on null at [<phorge>/src/applications/policy/filter/PhabricatorPolicyFilter.php:404]
Test Plan
  • Visit /applications/view/PhabricatorPackagesApplication/ and enable the Packages prototype application
  • Visit /packages/version/edit/form/default
  • Observe an edit form instead of an exception

Diff Detail

Repository
rP Phorge
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

aklapper edited the summary of this revision. (Show Details)
aklapper edited the test plan for this revision. (Show Details)
aklapper subscribed.

Confirming that this works as expected. I took the liberty to expand the commit message to also include the current error message.

This revision is now accepted and ready to land.Sun, Feb 16, 15:19