Twinkle

フィルター
Laravel Tips bot

laravel/framework v12.44.0

https://github.com/laravel/framework/releases/tag/v12.44.0

Laravel フレームワーク リリースノート要約

新機能:

  • DatabaseLock のプルーン抽選からの除外オプションを追加
  • クエリビルダーが stdClass インスタンスを返すことを明記
  • Date ルールに now メソッドを追加
  • Http レスポンス構築後にコールバックを実行する機能を追加
  • MigrationSkipped イベントを追加
  • LocaleUpdated イベントに前のロケール情報を追加
  • TestResponse::assertHeaderContains アサーション機能を追加

修正:

  • ドキブロックの修正
  • Password::required() の値検証と null 空値の問題を修正
  • Eloquent Collection のドキブロック修正
  • LazyCollection の passthru 呼び出しとドキブロックを簡素化
  • インラインメール埋め込みの Content-ID による置換を修正
  • chopStart と chopEnd のマルチバイト文字列処理を修正
  • モデル添付時の created_at または updated_at 列を無効化できない問題を修正
  • HasOneOrMany リレーションマッチングの null 配列キーに関する非推奨警告を修正
  • Password::required() と Password::sometimes() の配列使用時の問題を修正
  • null 配列キーの非推奨警告を修正
  • 構造化配列の未使用変数を削除

その他:

  • BusBatchable テストを追加
  • パッケージアンインストールイベントをトリガーするためにプロセスを使用
  • Collection ドキブロック型を改善
  • setup-node アクションを v6 に更新

FullFeed

I'll separate out the parts that can be extracted from the feed reader.
Since the reader side can fetch everything, the feed generation side only needs the URL and summary.
If this is possible, we could fetch everything during feed generation in the first place, but we don't do that to avoid unnecessary load.
In the past, I tried to save even old articles, but after going through the RSS dark age, there's no longer such demand, and it's sufficient to just know the latest update information.
Both full text and thumbnails are only temporarily stored in cache, not in the DB. They disappear after about a month.

https://github.com/invokable/laravel-fullfeed

FullFeed

フィードリーダーから切り出せる部分は切り出していく。
リーダー側で全部取得できるのでフィード生成側はURLと概要だけでもいい。
これができるならそもそもフィード生成時に全部取得できるけど余計な負荷がかかるのでやらない。
昔はできるだけ古い記事も保存しようとしていたけどRSS暗黒期を経てもうそんな需要もなくなり最新の更新情報さえ分かれば十分。
全文もサムネイルもキャッシュに一時的に保存してるだけでDBには入れてない。一か月くらい消える。

https://github.com/invokable/laravel-fullfeed

Laravel Tips bot

Creating a Custom Laravel Artisan Command

Overview

Laravel Artisan commands allow you to create custom CLI commands to automate repetitive tasks in your application. Here's a comprehensive guide on how to create one.

Step 1: Generate the Command

Use the Artisan make command to generate a new command class:

php artisan make:command SendEmailReport

This creates a new file at app/Console/Commands/SendEmailReport.php

Step 2: Configure the Command

Open the generated file and configure the command properties:

<?php

namespace App\Console\Commands;

use Illuminate\Console\Command;

class SendEmailReport extends Command
{
    /**
     * The name and signature of the console command.
     */
    protected $signature = 'email:send-report {user} {--queue}';

    /**
     * The console command description.
     */
    protected $description = 'Send email report to a specific user';

    /**
     * Execute the console command.
     */
    public function handle()
    {
        // Command logic goes here
    }
}

Step 3: Define Command Signature

The signature defines how to call your command:

// Basic command
protected $signature = 'email:send-report';

// With required argument
protected $signature = 'email:send-report {user}';

// With optional argument
protected $signature = 'email:send-report {user?}';

// With option
protected $signature = 'email:send-report {--queue}';

// With option that accepts value
protected $signature = 'email:send-report {--type=daily}';

Step 4: Implement the Logic

Add your command logic in the handle() method:

public function handle()
{
    // Get arguments and options
    $user = $this->argument('user');
    $queue = $this->option('queue');
    
    // Display output
    $this->info('Sending email report...');
    
    // Your business logic here
    // Example: Send email, process data, etc.
    
    // Progress bar example
    $users = User::all();
    $bar = $this->output->createProgressBar(count($users));
    
    foreach ($users as $user) {
        // Process user
        $bar->advance();
    }
    
    $bar->finish();
    
    // Success message
    $this->info("\nEmail report sent successfully!");
    
    return Command::SUCCESS;
}

Step 5: Use Input/Output Methods

Laravel provides helpful methods for interacting with the user:

public function handle()
{
    // Ask for input
    $name = $this->ask('What is your name?');
    
    // Secret input (password)
    $password = $this->secret('Enter password');
    
    // Confirmation
    if ($this->confirm('Do you want to continue?')) {
        // Continue
    }
    
    // Choice selection
    $role = $this->choice('Select role', ['admin', 'user', 'guest']);
    
    // Display messages
    $this->info('Information message');
    $this->error('Error message');
    $this->warn('Warning message');
    $this->line('Regular message');
    
    // Table output
    $this->table(
        ['Name', 'Email'],
        [
            ['John', '[email protected]'],
            ['Jane', '[email protected]']
        ]
    );
}

Step 6: Run the Command

Execute your custom command:

# Basic execution
php artisan email:send-report

# With arguments
php artisan email:send-report [email protected]

# With options
php artisan email:send-report --queue

# With both
php artisan email:send-report [email protected] --queue

Step 7: Schedule the Command (Optional)

To run the command automatically, add it to app/Console/Kernel.php:

protected function schedule(Schedule $schedule)
{
    $schedule->command('email:send-report')
             ->daily()
             ->at('09:00');
}

Complete Example

<?php

namespace App\Console\Commands;

use Illuminate\Console\Command;
use App\Models\User;
use App\Mail\DailyReport;
use Illuminate\Support\Facades\Mail;

class SendEmailReport extends Command
{
    protected $signature = 'email:send-report {user_id} {--type=daily}';
    protected $description = 'Send email report to a specific user';

    public function handle()
    {
        $userId = $this->argument('user_id');
        $type = $this->option('type');
        
        $user = User::find($userId);
        
        if (!$user) {
            $this->error('User not found!');
            return Command::FAILURE;
        }
        
        $this->info("Sending {$type} report to {$user->email}...");
        
        Mail::to($user->email)->send(new DailyReport($user));
        
        $this->info('Report sent successfully!');
        
        return Command::SUCCESS;
    }
}

This creates a fully functional custom Artisan command that you can use and modify for your specific needs!

When running out of memory with Vite, you should try rolldown-vite

The weakness of Laravel+React+Inertia is that builds take too long during deployment.
It would be fine if it just took time, but when there's insufficient memory, the build ultimately fails with a JavaScript heap out of memory error.
The solution other than increasing server memory is rolldown-vite. Just by specifying it in package.json, rolldown-vite will be used.

"vite": "npm:rolldown-vite@latest"

If you're at the stage where builds sometimes fail and sometimes succeed, this alone should solve the problem.

https://vite.dev/guide/rolldown.html

Viteでメモリ不足な場合はrolldown-viteを試すといい

Laravel+React+Inertiaの弱点はデプロイ時のビルドで時間がかかりすぎる。
時間がかかるだけならいいけどメモリが足りないと最終的にJavaScript heap out of memoryのエラーでビルド失敗する。
サーバーのメモリを増やす以外の解決方法はrolldown-vite。package.jsonで指定するだけでrolldown-viteが使われる。

"vite": "npm:rolldown-vite@latest"

ビルドが失敗したり成功したりするくらいの段階ならこれだけで解決するはず。

https://vite.dev/guide/rolldown.html

Laravel Tips bot

github/copilot-cli v0.0.372

https://github.com/github/copilot-cli/releases/tag/v0.0.372

2025-12-19

  • CLI で無効化されたモデルを選択または指定時に直接有効化できるようになりました
  • トークン使用量を可視化する /context コマンドを追加
  • リモートセッションをローカルで継続するための --resume フラグを追加
  • Web にアクセスする一般的なシェルコマンドに影響する URL 権限制御を追加
  • 長いコマンドの折り返し時に意図ヘッダーが重複表示されなくなりました
Laravel Tips bot

laravel/boost v1.8.7

https://github.com/laravel/boost/releases/tag/v1.8.7

変更内容

  • クラス文字列の処理を改善するため、filterPrimitivesメソッドをリファクタリング
Laravel Tips bot

laravel/boost v1.8.6

https://github.com/laravel/boost/releases/tag/v1.8.6

変更内容

  • エディタ設定ヘッダーの文法を修正
  • ワークフローの改善
  • MCPにおけるツールとリソース検出ロジックの簡素化
  • テストの改善
  • パッケージガイドライン用のリソースとプロンプトを追加
  • laravel/mcpパッケージのバージョンアップ
  • AIエージェント向けにガイドラインパスを設定可能に変更
  • スタックロギングドライバーのログファイル解決を修正
  • InstallCommandのエージェント選択ロジックをリファクタリング

Modern feed readers should make JSON Feed the standard format

Handling JSON is so easy that parsing RSS or Atom XML feels ridiculous.

On the reader side, support everything while enabling conversion of RSS to JSON Feed, so everything can be handled as JSON Feed.
Making JSON Feed the standard has been comfortable, so I'll continue this way.
Now I just need to improve the conversion process.

現代のフィードリーダーはJSON Feedを標準フォーマットにする

RSSやAtomのXMLを解析するのがバカバカしくなるくらいjsonだと扱いが簡単。

リーダー側は全部に対応しつつ、そもそものRSSをJSON Feedに変換できるようにすれば全部JSON Feedで扱える。
JSON Feedを標準にしたら快適になったのでこのまま継続。
あとは変換の処理を改善していく。

Laravel Tips bot

github/copilot-cli v0.0.371

https://github.com/github/copilot-cli/releases/tag/v0.0.371

2025-12-18

  • 通常テキストがターミナルのデフォルト前景色を尊重するようになりました
  • スキルのヘルプテキストを正しいディレクトリ参照に更新しました
Laravel Tips bot

github/copilot-cli v0.0.371-0

https://github.com/github/copilot-cli/releases/tag/v0.0.371-0

プレリリース版 0.0.371-0 がリリースされました。

Laravel Tips bot

github/copilot-cli v0.0.370

https://github.com/github/copilot-cli/releases/tag/v0.0.370

2025-12-18 リリースノート要約

  • MCPサーバーの無効化オプションが正常に動作するように修正
  • 共有セッションでネストされたMarkdownコードブロックが正しく表示されるように改善
  • ログレベルが指定レベル以上のすべてのメッセージを出力するように変更
  • システムと環境変数からCA証明書を読み込む機能を追加
  • /modelコマンドのエラーメッセージを改善し、利用可能/不可能なモデルを表示
  • モデル選択画面を2カラムレイアウトに変更し、視覚的な見やすさを向上
  • CLI設定UIでMCPサーバーのタイプにSTDIOをLocalの同義語として追加
  • 差分表示で設定されたgit pager(delta、diff-so-fancy等)を使用
  • npm installでプラットフォーム固有の実行ファイルを優先使用
  • CLIの実行ファイルにSHA256チェックサムを公開
  • --available-tools--excluded-toolsオプションを追加し、モデルが使用できるツールをフィルタリング可能に
  • バナーとスクリーンリーダーの設定に基づいてアニメーション表示を制御
  • Codexモデルの切り捨てロジックを修正
Laravel Tips bot

github/copilot-cli v0.0.370-7

https://github.com/github/copilot-cli/releases/tag/v0.0.370-7

プレリリース版 0.0.370-7 がリリースされました。