Unbreak the creation of Packages Versions
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
Reviewers: O1 Blessed Committers, aklapper
Reviewed By: O1 Blessed Committers, aklapper
Subscribers: aklapper, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Differential Revision: https://we.phorge.it/D25882