HomePhorge

Unbreak the creation of Packages Versions

Description

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

Details

Provenance
mainframe98Authored on Feb 15 2025, 1:04 PM
themackabuPushed on Tue, Mar 25, 8:07 PM
Parents
rP6ea09aa82c8d: PHP 8.1: Do not pass null to ctype_digit() in AphrontFormDateControlValue…
Branches
Unknown
Tags
Unknown

Event Timeline