Skip to content

Latest commit

 

History

History
30 lines (22 loc) · 373 Bytes

README.md

File metadata and controls

30 lines (22 loc) · 373 Bytes

Melody - One-file composer scripts

Demo

Create a file named script.php:

<?php
<<<CONFIG
packages:
    - "symfony/finder: ^5"
CONFIG;

$finder = Symfony\Component\Finder\Finder::create()
    ->in(__DIR__)
    ->files()
    ->name('*.php')
;

foreach ($finder as $file) {
    echo $file, "\n";
}

And simply run it:

$ melody run script.php