Skip to content

Commit

Permalink
Merge pull request #1 from rectorphp/tv-bump-php82
Browse files Browse the repository at this point in the history
Bump to PHP 8.2
  • Loading branch information
TomasVotruba authored Jan 3, 2024
2 parents f7bbf74 + cbadcfb commit d139a24
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 8 deletions.
3 changes: 2 additions & 1 deletion bin/rng.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@

declare(strict_types=1);

use Illuminate\Container\Container;
use Rector\ReleaseNotesGenerator\Command\GenerateCommand;
use Rector\ReleaseNotesGenerator\GithubApiCaller;
use Symfony\Component\Console\Application;

require __DIR__ . '/../vendor/autoload.php';

$container = new \Illuminate\Container\Container();
$container = new Container();
$container->when(GithubApiCaller::class)
->needs('$githubToken')
->give(getenv('GITHUB_TOKEN'));
Expand Down
4 changes: 3 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"symfony/process": "^6.4|^7.0"
},
"require-dev": {
"rector/rector": "dev-main",
"symplify/easy-coding-standard": "^12.0.13",
"phpstan/phpstan": "^1.10.50",
"phpunit/phpunit": "^10.5",
Expand All @@ -35,7 +36,8 @@
},
"config": {
"allow-plugins": {
"phpstan/extension-installer": true
"phpstan/extension-installer": true,
"rector/extension-installer": true
}
},
"scripts": {
Expand Down
3 changes: 2 additions & 1 deletion rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@
return static function (RectorConfig $rectorConfig): void {
$rectorConfig->importNames();

$rectorConfig->paths([__DIR__ . '/config', __DIR__ . '/src', __DIR__ . '/tests']);
$rectorConfig->paths([__DIR__ . '/bin', __DIR__ . '/src', __DIR__ . '/tests']);

$rectorConfig->sets([
\Rector\Set\ValueObject\LevelSetList::UP_TO_PHP_82,
SetList::INSTANCEOF,
SetList::NAMING,
SetList::TYPE_DECLARATION,
Expand Down
4 changes: 2 additions & 2 deletions src/GithubApiCaller.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
use Rector\ReleaseNotesGenerator\ValueObject\Commit;
use stdClass;

final class GithubApiCaller
final readonly class GithubApiCaller
{
public function __construct(
private readonly string|false $githubToken
private string|false $githubToken
) {
if ($githubToken === false) {
throw new InvalidArgumentException(
Expand Down
6 changes: 3 additions & 3 deletions src/ValueObject/Commit.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

namespace Rector\ReleaseNotesGenerator\ValueObject;

final class Commit
final readonly class Commit
{
public function __construct(
private readonly string $hash,
private readonly string $message
private string $hash,
private string $message
) {
}

Expand Down

0 comments on commit d139a24

Please sign in to comment.