Skip to content

Commit 088b056

Browse files
committed
refactor: update php up to 8.3 version
1 parent 869b071 commit 088b056

26 files changed

+41
-27
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
}
1717
],
1818
"require": {
19-
"php": "^8.2",
19+
"php": "^8.3",
2020
"ext-curl": "*",
2121
"guzzlehttp/guzzle": "^7.0",
2222
"league/html-to-markdown": "^5.1",

rector.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414

1515
// Register rules for PHP 8.4 migration
1616
$rectorConfig->sets([
17-
SetList::PHP_82,
18-
LevelSetList::UP_TO_PHP_82,
17+
SetList::PHP_83,
18+
LevelSetList::UP_TO_PHP_83,
1919
]);
2020

2121
// Skip vendor directories

src/ConfigLoader/Import/WildcardPathFinder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
/**
1717
* File extensions recognized as configuration files
1818
*/
19-
private const CONFIG_EXTENSIONS = ['yaml', 'yml', 'json', 'php'];
19+
private const array CONFIG_EXTENSIONS = ['yaml', 'yml', 'json', 'php'];
2020

2121
public function __construct(
2222
private FilesInterface $files,

src/ConfigLoader/Reader/PhpReader.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
*/
1313
final readonly class PhpReader extends AbstractReader
1414
{
15+
#[\Override]
1516
public function read(string $path): array
1617
{
1718
$this->logger?->debug('Reading PHP config file', [

src/Console/InitCommand.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@
2222
)]
2323
final class InitCommand extends BaseCommand
2424
{
25-
private const DEFAULT_CONFIG_NAME = 'context.yaml';
26-
private const DEFAULT_CONFIG_TYPE = 'yaml';
27-
private const SUPPORTED_TYPES = ['json', 'yaml'];
25+
private const string DEFAULT_CONFIG_NAME = 'context.yaml';
26+
private const string DEFAULT_CONFIG_TYPE = 'yaml';
27+
private const array SUPPORTED_TYPES = ['json', 'yaml'];
2828

2929
public function __construct(
3030
Container $container,

src/Console/Renderer/ModifierRenderer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*/
1212
final class ModifierRenderer
1313
{
14-
private const MODIFIER_TYPES = [
14+
private const array MODIFIER_TYPES = [
1515
'php-signature' => 'PHP Signature Modifier',
1616
'php-content-filter' => 'PHP Content Filter Modifier',
1717
'sanitizer' => 'Content Sanitizer Modifier',

src/Console/SchemaCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ final class SchemaCommand extends BaseCommand
1616
/**
1717
* The URL where the JSON schema is hosted
1818
*/
19-
private const SCHEMA_URL = 'https://raw.githubusercontent.com/context-hub/generator/refs/heads/main/json-schema.json';
19+
private const string SCHEMA_URL = 'https://raw.githubusercontent.com/context-hub/generator/refs/heads/main/json-schema.json';
2020

2121
/**
2222
* Execute the command

src/Console/SelfUpdateCommand.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ final class SelfUpdateCommand extends BaseCommand
2222
/**
2323
* GitHub API URL for latest release
2424
*/
25-
private const GITHUB_API_LATEST_RELEASE = 'https://api.github.com/repos/context-hub/generator/releases/latest';
25+
private const string GITHUB_API_LATEST_RELEASE = 'https://api.github.com/repos/context-hub/generator/releases/latest';
2626

2727
/**
2828
* GitHub download URL format for the PHAR file
2929
*/
30-
private const GITHUB_DOWNLOAD_URL = 'https://github.com/context-hub/generator/releases/download/%s/%s';
30+
private const string GITHUB_DOWNLOAD_URL = 'https://github.com/context-hub/generator/releases/download/%s/%s';
3131

32-
private const PHAR_PATH = '/usr/local/bin/ctx';
32+
private const string PHAR_PATH = '/usr/local/bin/ctx';
3333

3434
public function __construct(
3535
Container $container,

src/Console/VersionCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ final class VersionCommand extends BaseCommand
2020
/**
2121
* GitHub API URL for latest release
2222
*/
23-
private const GITHUB_API_LATEST_RELEASE = 'https://api.github.com/repos/context-hub/generator/releases/latest';
23+
private const string GITHUB_API_LATEST_RELEASE = 'https://api.github.com/repos/context-hub/generator/releases/latest';
2424

2525
public function __construct(
2626
Container $container,

src/Lib/GithubClient/GithubClient.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
final class GithubClient implements GithubClientInterface
1010
{
1111
/** GitHub API base URL */
12-
private const API_BASE_URL = 'https://api.github.com';
12+
private const string API_BASE_URL = 'https://api.github.com';
1313

1414
/**
1515
* @param HttpClientInterface $httpClient HTTP client for API requests

0 commit comments

Comments
 (0)