Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TASK] Update all the things #160

Merged
merged 1 commit into from
Mar 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions build/phpstan-baseline.neon
Original file line number Diff line number Diff line change
@@ -1,6 +1,2 @@
parameters:
ignoreErrors:
-
message: "#^Result of && is always false\\.$#"
count: 1
path: ../src/Extractor/DeploymentInformation.php
2,277 changes: 1,142 additions & 1,135 deletions composer.lock

Large diffs are not rendered by default.

981 changes: 697 additions & 284 deletions legacy_hook/composer.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/Controller/DocsRenderingController.php
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ public function index(
);
$this->entityManager->flush();

return new Response(null, RESPONSE::HTTP_NO_CONTENT);
return new Response(null, Response::HTTP_NO_CONTENT);
}
}
}
2 changes: 1 addition & 1 deletion src/Controller/GithubRstIssueController.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function index(Request $request, GithubService $githubService, string $gi
} catch (DoNotCareException) {
// Hook payload could not be identified as hook that should trigger git split
} catch (\JsonException) {
return new Response('Invalid JSON', \Symfony\Component\HttpFoundation\Response::HTTP_BAD_REQUEST);
return new Response('Invalid JSON', Response::HTTP_BAD_REQUEST);
}

return new Response();
Expand Down
2 changes: 1 addition & 1 deletion src/Exception/GithubHookPingException.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class GithubHookPingException extends \Exception
{
private readonly string $repositoryUrl;

public function __construct(string $message = '', int $code = 0, \Throwable $previous = null, string $repositoryUrl = '')
public function __construct(string $message = '', int $code = 0, ?\Throwable $previous = null, string $repositoryUrl = '')
{
parent::__construct($message, $code, $previous);
$this->repositoryUrl = $repositoryUrl;
Expand Down
1 change: 1 addition & 0 deletions src/Extractor/DeploymentInformation.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ private function getTargetBranchDirectory(string $branch, string $type): string
if (!preg_match('/^(\d+.\d+.\d+)$/', $result)) {
throw new DocsPackageDoNotCareBranch('Branch / tag named \'' . $branch . '\' is ignored, only tags named \'major.minor.patch\' (e.g. \'5.7.2\') are considered.', 1557498335);
}

// Remove patch level, '8.7.2' becomes '8.7'
return implode('.', array_slice(explode('.', $result), 0, 2));
}
Expand Down
2 changes: 1 addition & 1 deletion src/Utility/RepositoryUrlUtility.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

class RepositoryUrlUtility
{
public static function resolveComposerJsonUrl(string $repositoryUrl, string $branch, string $repositoryType = null): string
public static function resolveComposerJsonUrl(string $repositoryUrl, string $branch, ?string $repositoryType = null): string
{
$url = self::extractComposerJsonUrlFromRepositoryUrl($repositoryUrl, $branch);
if ('' === $url || GitRepositoryService::SERVICE_BITBUCKET_SERVER === $repositoryType) {
Expand Down
1 change: 0 additions & 1 deletion src/Validator/Constraints/InvalidCharacter.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

/**
* @Annotation
*
* @Target({"PROPERTY", "METHOD", "ANNOTATION"})
*/
#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)]
Expand Down
2 changes: 1 addition & 1 deletion tests/Functional/Fixtures/DocsToBambooBadRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

return Request::create(
'/docs',
\Symfony\Component\HttpFoundation\Request::METHOD_POST,
Request::METHOD_POST,
[],
[],
[],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

return Request::create(
'/docs',
\Symfony\Component\HttpFoundation\Request::METHOD_POST,
Request::METHOD_POST,
[],
[],
[],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

return Request::create(
'/docs',
\Symfony\Component\HttpFoundation\Request::METHOD_POST,
Request::METHOD_POST,
[],
[],
[],
Expand Down
2 changes: 1 addition & 1 deletion tests/Functional/Fixtures/DocsToBambooGoodRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

return Request::create(
'/docs',
\Symfony\Component\HttpFoundation\Request::METHOD_POST,
Request::METHOD_POST,
[],
[],
[],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

return Request::create(
'/docs',
\Symfony\Component\HttpFoundation\Request::METHOD_POST,
Request::METHOD_POST,
[],
[],
[],
Expand Down
2 changes: 1 addition & 1 deletion tests/Functional/Fixtures/GithubPullRequestBadRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

return Request::create(
'/githubpr',
\Symfony\Component\HttpFoundation\Request::METHOD_POST,
Request::METHOD_POST,
[],
[],
[],
Expand Down
2 changes: 1 addition & 1 deletion tests/Functional/Fixtures/GithubPullRequestGoodRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

return Request::create(
'/githubpr',
\Symfony\Component\HttpFoundation\Request::METHOD_POST,
Request::METHOD_POST,
[],
[],
[],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

return Request::create(
'/create-rst-issue',
\Symfony\Component\HttpFoundation\Request::METHOD_POST,
Request::METHOD_POST,
[],
[],
[],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

return Request::create(
'/create-rst-issue',
\Symfony\Component\HttpFoundation\Request::METHOD_POST,
Request::METHOD_POST,
[],
[],
[],
Expand Down
2 changes: 1 addition & 1 deletion tests/Functional/Fixtures/GithubRstIssuePatchRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

return Request::create(
'/create-rst-issue',
\Symfony\Component\HttpFoundation\Request::METHOD_POST,
Request::METHOD_POST,
[],
[],
[],
Expand Down