From 3160ce989d0d2be49b44e3b73ec2fa673b1c4cb3 Mon Sep 17 00:00:00 2001 From: Len Woodward Date: Thu, 6 Apr 2023 13:51:56 -0700 Subject: [PATCH] [Task] Move namespace from FFMpegTween to FFMpegTools (#10) * move namespace from FFMpegTween to FFMpegTools * update install command in readme * update namespace in composer.json --- README.md | 18 +++++++++--------- composer.json | 14 +++++++------- scripts/generateEasings | 2 +- scripts/generateTimeline | 8 ++++---- src/Ease.php | 2 +- src/EaseFunctions.php | 4 ++-- ...ider.php => FFMpegToolsServiceProvider.php} | 4 ++-- src/Facades/FFMpegTools.php | 16 ++++++++++++++++ src/Facades/FFMpegTween.php | 16 ---------------- src/Keyframe.php | 2 +- src/Timeline.php | 2 +- src/Timing.php | 2 +- src/Tween.php | 4 ++-- src/Utils/Expr.php | 2 +- tests/Pest.php | 2 +- tests/TestCase.php | 8 ++++---- 16 files changed, 53 insertions(+), 53 deletions(-) rename src/{FFMpegTweenServiceProvider.php => FFMpegToolsServiceProvider.php} (79%) create mode 100644 src/Facades/FFMpegTools.php delete mode 100644 src/Facades/FFMpegTween.php diff --git a/README.md b/README.md index 0dcab22..4736790 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ The stringification of these math strings is ported from [This Gitlab repo](http ## Installation You can install the package via composer: ```bash -composer require projektgopher/laravel-ffmpeg-tween +composer require projektgopher/laravel-ffmpeg-tools ``` ## Usage @@ -37,9 +37,9 @@ For now this package can only be used within a Laravel app, but there are plans ### Simple tween with delay and duration ```php -use ProjektGopher\FFMpegTween\Tween; -use ProjektGopher\FFMpegTween\Timing; -use ProjektGopher\FFMpegTween\Ease; +use ProjektGopher\FFMpegTools\Tween; +use ProjektGopher\FFMpegTools\Timing; +use ProjektGopher\FFMpegTools\Ease; $x = (new Tween()) ->from("50") @@ -51,10 +51,10 @@ $x = (new Tween()) ### Animation sequences using keyframes ```php -use ProjektGopher\FFMpegTween\Keyframe; -use ProjektGopher\FFMpegTween\Timeline; -use ProjektGopher\FFMpegTween\Timing; -use ProjektGopher\FFMpegTween\Ease; +use ProjektGopher\FFMpegTools\Keyframe; +use ProjektGopher\FFMpegTools\Timeline; +use ProjektGopher\FFMpegTools\Timing; +use ProjektGopher\FFMpegTools\Ease; $x = new Timeline() $x->keyframe((new Keyframe) @@ -82,7 +82,7 @@ When writing _long_ and **complicated** evaluated expressions, it can be easy to The `Expr` class can help with this. If your expression is short enough this might be overkill, but for longer expressions this can really help with these issues. ```diff -+ use ProjektGopher\FFMpegTween\Utils\Expr; ++ use ProjektGopher\FFMpegTools\Utils\Expr; .... diff --git a/composer.json b/composer.json index c074f66..1db276d 100644 --- a/composer.json +++ b/composer.json @@ -1,12 +1,12 @@ { - "name": "projektgopher/laravel-ffmpeg-tween", + "name": "projektgopher/laravel-ffmpeg-tools", "description": "Generates strings for use in ffmpeg commands to tween between values with easings.", "keywords": [ "ProjektGopher", "laravel", - "laravel-ffmpeg-tween" + "laravel-ffmpeg-tools" ], - "homepage": "https://github.com/projektgopher/laravel-ffmpeg-tween", + "homepage": "https://github.com/projektgopher/laravel-ffmpeg-tools", "license": "MIT", "authors": [ { @@ -34,12 +34,12 @@ }, "autoload": { "psr-4": { - "ProjektGopher\\FFMpegTween\\": "src/" + "ProjektGopher\\FFMpegTools\\": "src/" } }, "autoload-dev": { "psr-4": { - "ProjektGopher\\FFMpegTween\\Tests\\": "tests/" + "ProjektGopher\\FFMpegTools\\Tests\\": "tests/" } }, "scripts": { @@ -59,10 +59,10 @@ "extra": { "laravel": { "providers": [ - "ProjektGopher\\FFMpegTween\\FFMpegTweenServiceProvider" + "ProjektGopher\\FFMpegTools\\FFMpegToolsServiceProvider" ], "aliases": { - "FFMpegTween": "ProjektGopher\\FFMpegTween\\Facades\\FFMpegTween" + "FFMpegTools": "ProjektGopher\\FFMpegTools\\Facades\\FFMpegTools" } } }, diff --git a/scripts/generateEasings b/scripts/generateEasings index 746558a..08de873 100755 --- a/scripts/generateEasings +++ b/scripts/generateEasings @@ -3,7 +3,7 @@ require_once __DIR__.'/../vendor/autoload.php'; -use ProjektGopher\FFMpegTween\Ease; +use ProjektGopher\FFMpegTools\Ease; echo 'starting... (fail fast)'.PHP_EOL; diff --git a/scripts/generateTimeline b/scripts/generateTimeline index 891fb57..7469ddb 100755 --- a/scripts/generateTimeline +++ b/scripts/generateTimeline @@ -3,10 +3,10 @@ require_once __DIR__.'/../vendor/autoload.php'; -use ProjektGopher\FFMpegTween\Timeline; -use ProjektGopher\FFMpegTween\Keyframe; -use ProjektGopher\FFMpegTween\Ease; -use ProjektGopher\FFMpegTween\Timing; +use ProjektGopher\FFMpegTools\Timeline; +use ProjektGopher\FFMpegTools\Keyframe; +use ProjektGopher\FFMpegTools\Ease; +use ProjektGopher\FFMpegTools\Timing; echo 'Generating video sample using Timeline...'.PHP_EOL; diff --git a/src/Ease.php b/src/Ease.php index 25fbda7..4b26e38 100644 --- a/src/Ease.php +++ b/src/Ease.php @@ -1,6 +1,6 @@ in(__DIR__); diff --git a/tests/TestCase.php b/tests/TestCase.php index 44128b1..dee95fc 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -1,10 +1,10 @@ 'ProjektGopher\\FFMpegTween\\Database\\Factories\\'.class_basename($modelName).'Factory' + fn (string $modelName) => 'ProjektGopher\\FFMpegTools\\Database\\Factories\\'.class_basename($modelName).'Factory' ); } protected function getPackageProviders($app) { return [ - FFMpegTweenServiceProvider::class, + FFMpegToolsServiceProvider::class, ]; }