Update fork_policy doesn't work

Issue #51 new
Pieter Eggink created an issue

No description provided.

Comments (1)

  1. Alexandru Guzinschi

    I see that you marked this as BB-API 1.0, but fork_policy is not available in version 1 of the API.

    However, trying to update fork_policy using version 2 of the API also fails with:

    {"type": "error", "error": {"message": "This QueryDict instance is immutable", "id": "418b46e1d95c40c7a3be384a5076401a"}}
    

    which I think is related to BB-13093 .

    Steps to reproduce:

    <?php
    $repo = new Bitbucket\API\Repositories\Repository();
    $repo->getClient()
        ->addListener(
            new \Bitbucket\API\Http\Listener\OAuth2Listener(array(/** oauth credentials */))
        )
        ->setApiVersion('2.0')
    ;
    $response = $repo->update($account, $repository, array(
        'fork_policy' => 'no_forks'
    ));
    var_dump($response); // will get a 500 error complaining about QueryDict instance being immutable
    

    I will leave this open until the upstream issue is fixed.

  2. Log in to comment