Release of v3.2.2-alpha7

Add push options to Joomla Power. Complete the Joomla Power Init and Reset features. Fix Gitea Contents class functions. Last Alpha release (feature block).
This commit is contained in:
2024-07-08 22:53:46 +02:00
parent 1d417c40f1
commit 9e59163661
58 changed files with 1301 additions and 687 deletions

View File

@@ -64,10 +64,10 @@ class Contents extends Api
* @param string|null $ref Optional. The name of the commit/branch/tag.
* Default the repository's default branch (usually master).
*
* @return object|null
* @return null|array|object
* @since 3.2.0
**/
public function metadata(string $owner, string $repo, string $filepath, ?string $ref = null): ?object
public function metadata(string $owner, string $repo, string $filepath, ?string $ref = null): null|array|object
{
// Build the request path.
$path = "/repos/{$owner}/{$repo}/contents/{$filepath}";
@@ -100,7 +100,7 @@ class Contents extends Api
* @param string|null $authorEmail The author's email.
* @param string|null $committerName The committer's name.
* @param string|null $committerEmail The committer's email.
* @param bool|null $newBranch Whether to create a new branch. Defaults to false.
* @param string|null $newBranch Whether to create a new branch. Defaults to null.
* @param string|null $authorDate The author's date.
* @param string|null $committerDate The committer's date.
* @param bool|null $signoff Add a Signed-off-by trailer. Defaults to null.
@@ -119,7 +119,7 @@ class Contents extends Api
?string $authorEmail = null,
?string $committerName = null,
?string $committerEmail = null,
?bool $newBranch = false,
?string $newBranch = null,
?string $authorDate = null,
?string $committerDate = null,
?bool $signoff = null

View File

@@ -29,7 +29,7 @@ final class Http extends JoomlaHttp
* @var string
* @since 3.2.0
*/
protected string $_token_; // to avoid collusions (but allow swapping)
protected string $_token_; // to avoid collisions (but allow swapping)
/**
* Constructor.
@@ -52,7 +52,7 @@ final class Http extends JoomlaHttp
// add the token if given
if (is_string($token))
{
$config['headers']['Authorization'] = $token;
$config['headers']['Authorization'] = 'token ' . $token;
$this->_token_ = $token;
}
@@ -78,7 +78,7 @@ final class Http extends JoomlaHttp
);
// add the token
$headers['Authorization'] = $token;
$headers['Authorization'] = 'token ' . $token;
$this->_token_ = $token;
$this->setOption('headers', $headers);