Skip to content

Commit 70aee52

Browse files
committed
wip
1 parent eac7335 commit 70aee52

File tree

8 files changed

+35
-7
lines changed

8 files changed

+35
-7
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ todo.md
1414
/storage/new-parsed
1515
storage/tree.txt
1616
/storage/logs
17+
/bin/logs

app/Commands/CompileBinaryCommand.php

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,34 +41,36 @@ public function handle(): void
4141
'dba',
4242
'dom',
4343
'exif',
44-
'filter',
4544
'fileinfo',
45+
'filter',
4646
'iconv',
47-
'mbstring',
4847
'mbregex',
48+
'mbstring',
4949
'openssl',
5050
'pcntl',
51-
'pdo',
5251
'pdo_mysql',
5352
'pdo_sqlite',
53+
'pdo',
5454
'phar',
5555
'posix',
5656
'readline',
57+
'session',
5758
'simplexml',
5859
'sockets',
60+
'sodium',
5961
'sqlite3',
6062
'tokenizer',
6163
'xml',
6264
'xmlreader',
6365
'xmlwriter',
6466
'zip',
6567
'zlib',
66-
'sodium',
6768
])->implode(',');
6869

6970
$spc = base_path('spc');
7071

7172
collect([
73+
base_path('php-parser') . " app:build --build-version={$version}",
7274
sprintf('%s download --with-php=8.2 --for-extensions="%s"', $spc, $extensions),
7375
sprintf('%s build --build-micro --build-cli "%s"', $spc, $extensions),
7476
sprintf('%s micro:combine %s -O %s', $spc, base_path('builds/php-parser'), $destination),
@@ -79,5 +81,17 @@ public function handle(): void
7981
});
8082

8183
exec('mv ' . base_path('.env.bak') . ' ' . base_path('.env'));
84+
85+
// if [[ $(git status --porcelain) ]]; then
86+
// git add builds/php-parser
87+
// git commit -m "Release $version"
88+
// git push
89+
// fi
90+
91+
// git push
92+
// git tag -a $version -m "$version"
93+
// git push --tags
94+
// echo "\n"
95+
// $this->line("https://github.com/laravel/vs-code-php-parser/releases");
8296
}
8397
}

app/Providers/AppServiceProvider.php

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

33
namespace App\Providers;
44

5+
use Illuminate\Support\Facades\File;
56
use Illuminate\Support\ServiceProvider;
67

78
class AppServiceProvider extends ServiceProvider
@@ -11,7 +12,17 @@ class AppServiceProvider extends ServiceProvider
1112
*/
1213
public function boot(): void
1314
{
14-
//
15+
if (\Phar::running()) {
16+
$dir = dirname(\Phar::running(false)) . '/logs';
17+
File::ensureDirectoryExists($dir);
18+
$path = $dir . '/parser.log';
19+
} else {
20+
$path = storage_path('logs/parser.log');
21+
}
22+
23+
config([
24+
'logging.channels.single.path' => $path,
25+
]);
1526
}
1627

1728
/**

bin/php-parser-0.1.1

2.08 MB
Binary file not shown.

builds/php-parser

2.02 MB
Binary file not shown.

config/app.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
|
1414
*/
1515

16-
'name' => 'Php-parser',
16+
'name' => 'VS Code PHP Parser',
1717

1818
/*
1919
|--------------------------------------------------------------------------

config/commands.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?php
22

33
use App\Commands\CompileBinaryCommand;
4+
use App\Commands\ContextTypeScriptGeneratorCommand;
45

56
return [
67

@@ -66,6 +67,7 @@
6667
Illuminate\Foundation\Console\VendorPublishCommand::class,
6768
LaravelZero\Framework\Commands\StubPublishCommand::class,
6869
CompileBinaryCommand::class,
70+
ContextTypeScriptGeneratorCommand::class,
6971
],
7072

7173
/*

config/logging.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
|
1919
*/
2020

21-
'default' => env('LOG_CHANNEL', 'stack'),
21+
'default' => env('LOG_CHANNEL', 'null'),
2222

2323
/*
2424
|--------------------------------------------------------------------------

0 commit comments

Comments
 (0)