<?php

$dir = new RecursiveDirectoryIterator(__DIR__ . '/../vendor/filament');
$iterator = new RecursiveIteratorIterator($dir);
$regex = new RegexIterator($iterator, '/^.+\.php$/i', RecursiveRegexIterator::GET_MATCH);

foreach ($regex as $info) {
    $file = $info[0];
    if (str_contains($file, 'vendor/filament/filament/src') || str_contains($file, 'vendor/filament/actions/src') || str_contains($file, 'vendor/filament/forms/src')) {
        $content = file_get_contents($file);
        if (str_contains($content, 'form.actions') || str_contains($content, 'form::actions')) {
            $relative = str_replace(realpath(__DIR__ . '/..'), '', realpath($file));
            echo "Found in $relative:\n";
        }
    }
}
