Skip to content

Commit 063e8b8

Browse files
authored
upgrade to tempest:3.0 (#105)
1 parent aab739f commit 063e8b8

29 files changed

Lines changed: 262 additions & 126 deletions

composer.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@
22
"name": "tempest/docs",
33
"type": "project",
44
"description": "Documentation website for the Tempest framework",
5+
"repositories": [
6+
{"type": "path", "url": "../tempest-framework", "symlink": true}
7+
],
58
"require": {
6-
"tempest/framework": "^2.14.0",
9+
"tempest/framework": "^3.x-dev",
710
"league/commonmark": "^2.8.0",
811
"symfony/yaml": "^7.4.1",
912
"spatie/yaml-front-matter": "^2.1.1",

composer.lock

Lines changed: 147 additions & 65 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

deploy.sh

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,23 @@
44
. ~/.nvm/nvm.sh
55

66
# Dependencies
7-
php8.4 /usr/local/bin/composer install --no-dev
7+
php8.5 /usr/local/bin/composer install --no-dev
88
/home/forge/.bun/bin/bun --version
99
/home/forge/.bun/bin/bun install
1010

1111
# Tempest
12-
php8.4 tempest cache:clear --force --internal --all
13-
php8.4 tempest discovery:generate
14-
php8.4 tempest migrate:up --force
15-
php8.4 tempest static:clean --force
12+
php8.5 tempest cache:clear --force --internal --all
13+
php8.5 tempest discovery:generate
14+
php8.5 tempest migrate:up --force
15+
php8.5 tempest static:clean --force
1616

1717
# Build front-end
18-
php8.4 tempest docs:pull --no-interaction
19-
php8.4 tempest command-palette:index
18+
php8.5 tempest docs:pull --no-interaction
19+
php8.5 tempest command-palette:index
2020
/home/forge/.bun/bin/bun run build
21-
php8.4 tempest cache:clear --force
22-
php8.4 tempest view:clear --force
23-
php8.4 tempest static:generate --verbose=true
21+
php8.5 tempest cache:clear --force
22+
php8.5 tempest view:clear --force
23+
php8.5 tempest static:generate --verbose=true
2424

2525
# Supervisor
2626
sudo supervisorctl restart all

rector.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@
33
declare(strict_types=1);
44

55
use Rector\Config\RectorConfig;
6+
use Tempest\Upgrade\Set\TempestSetList;
67

78
return RectorConfig::configure()
89
->withPaths([
910
__DIR__ . '/src',
1011
__DIR__ . '/tests',
1112
])
12-
->withSets([__DIR__ . '/vendor/tempest/framework/packages/upgrade/src/tempest2.php'])
13+
->withSets([TempestSetList::TEMPEST_30])
1314
// ->withPhpSets()
1415
->withTypeCoverageLevel(0)
1516
->withDeadCodeLevel(0)

src/Markdown/Alerts/AlertBlockRenderer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
use Override;
1414
use Tempest\View\ViewRenderer;
1515

16-
use function Tempest\get;
17-
use function Tempest\view;
16+
use function Tempest\Container\get;
17+
use function Tempest\View\view;
1818

1919
final class AlertBlockRenderer implements NodeRendererInterface
2020
{

src/Markdown/SubChapterExtractor.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
namespace App\Markdown;
66

7+
use function Tempest\Support\Arr\sort_by_callback;
78
use Tempest\Support\Arr;
89

910
use function Tempest\Support\Str\strip_tags;
@@ -40,7 +41,7 @@ public static function extract(string $content): array
4041
}
4142

4243
return self::buildHierarchy(
43-
headings: Arr\sort_by_callback($headings, static fn (array $a, array $b) => $a['position'] <=> $b['position']),
44+
headings: sort_by_callback($headings, static fn (array $a, array $b) => $a['position'] <=> $b['position']),
4445
);
4546
}
4647

src/StoredEvents/CreateStoredEventTable.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@
44

55
namespace App\StoredEvents;
66

7+
use Tempest\Database\MigratesUp;
78
use Override;
89
use Tempest\Database\QueryStatement;
910
use Tempest\Database\QueryStatements\CreateTableStatement;
1011

11-
final class CreateStoredEventTable implements \Tempest\Database\MigratesUp
12+
final class CreateStoredEventTable implements MigratesUp
1213
{
1314
public string $name {
1415
get => '00-00-0000-create_stored_events_table';

0 commit comments

Comments
 (0)