-
-
Notifications
You must be signed in to change notification settings - Fork 134
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add an example how to deal with route attributes
- Loading branch information
Showing
6 changed files
with
102 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
require_once __DIR__ . '/vendor/autoload.php'; | ||
|
||
$io = new \Composer\IO\NullIO(); | ||
$composer = \Composer\Factory::create($io); | ||
|
||
echo 'dumping...' . PHP_EOL; | ||
|
||
\olvlvl\ComposerAttributeCollector\Plugin::dump( | ||
$composer, | ||
$io, | ||
__DIR__ . '/vendor/attributes.php', | ||
); | ||
|
||
echo 'done...' . PHP_EOL; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
use Spatie\Watcher\Watch; | ||
|
||
require_once __DIR__ . '/vendor/autoload.php'; | ||
|
||
echo 'Run watcher-build...' . PHP_EOL; | ||
|
||
`php watcher-build.php`; | ||
|
||
echo 'Ready for listening changes...' . PHP_EOL; | ||
|
||
Watch::paths(__DIR__ . '/src') | ||
->onAnyChange(function (string $type, string $path) { | ||
echo sprintf('File changed: "%s".', $path) . PHP_EOL; | ||
echo 'Run watcher-build...' . PHP_EOL; | ||
`php watcher-build.php`; | ||
echo 'Dumped...' . PHP_EOL; | ||
}) | ||
->start(); |