Skip to content

Commit

Permalink
Add staabm/phpstan-todo-by
Browse files Browse the repository at this point in the history
  • Loading branch information
Seldaek committed Jul 6, 2024
1 parent ece63a3 commit 9b50d56
Show file tree
Hide file tree
Showing 5 changed files with 200 additions and 1 deletion.
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@
"phpunit/phpunit": "^11.0",
"rector/rector": "^0.15.0",
"staabm/phpstan-dba": "^0.2",
"staabm/phpstan-todo-by": "^0.1.27",
"symfony/browser-kit": "^7",
"symfony/css-selector": "^7",
"symfony/debug-bundle": "^7",
Expand Down
196 changes: 195 additions & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ includes:
- vendor/phpstan/phpstan-symfony/rules.neon
- vendor/phpstan/phpstan-webmozart-assert/extension.neon
- vendor/staabm/phpstan-dba/config/dba.neon
- vendor/staabm/phpstan-todo-by/extension.neon
- vendor/phpstan/phpstan-deprecation-rules/rules.neon

parameters:
Expand Down
2 changes: 2 additions & 0 deletions src/Entity/Package.php
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,8 @@ public function setRepository(string $repoUrl): void
$repoUrl = Preg::replace('{^git://github.com/}i', 'https://github.com/', $repoUrl);
$repoUrl = Preg::replace('{^(https://github.com/.*?)\.git$}i', '$1', $repoUrl);
$repoUrl = Preg::replace('{^(https://github.com/.*?)/$}i', '$1', $repoUrl);
// support urls like https://github.com/foo/bar/tree/main/baz or other sub-URLs in a repo
$repoUrl = Preg::replace('{^(https://github.com/[^/]+/[^/]+).+$}i', '$1', $repoUrl);

$repoUrl = Preg::replace('{^[email protected]:}i', 'https://gitlab.com/', $repoUrl);
$repoUrl = Preg::replace('{^https?://(?:www\.)?gitlab\.com/(.*?)\.git$}i', 'https://gitlab.com/$1', $repoUrl);
Expand Down
1 change: 1 addition & 0 deletions src/Package/Updater.php
Original file line number Diff line number Diff line change
Expand Up @@ -748,6 +748,7 @@ private function prepareReadme(string $readme, ?string $host = null, ?string $ow
}

$config = $config
// TODO symfony/html-sanitizer:7.2 ->defaultAction(HtmlSanitizerAction::Block)
->blockElement('div')
->blockElement('article')
->blockElement('g-emoji')
Expand Down

0 comments on commit 9b50d56

Please sign in to comment.