diff --git a/_ide_helper.php b/_ide_helper.php index f12317437..b259bfeb2 100644 --- a/_ide_helper.php +++ b/_ide_helper.php @@ -4342,7 +4342,7 @@ public static function macroCall($method, $parameters) */ public static function lock($name, $seconds = 0, $owner = null) { - /** @var \Illuminate\Cache\FileStore $instance */ + /** @var \Illuminate\Cache\DatabaseStore $instance */ return $instance->lock($name, $seconds, $owner); } /** @@ -4355,65 +4355,54 @@ public static function lock($name, $seconds = 0, $owner = null) */ public static function restoreLock($name, $owner) { - /** @var \Illuminate\Cache\FileStore $instance */ + /** @var \Illuminate\Cache\DatabaseStore $instance */ return $instance->restoreLock($name, $owner); } /** - * Remove all items from the cache. - * - * @return bool - * @static - */ - public static function flush() - { - /** @var \Illuminate\Cache\FileStore $instance */ - return $instance->flush(); - } - /** - * Get the full path for the given cache key. + * Remove an item from the cache if it is expired. * * @param string $key - * @return string + * @return bool * @static */ - public static function path($key) + public static function forgetIfExpired($key) { - /** @var \Illuminate\Cache\FileStore $instance */ - return $instance->path($key); + /** @var \Illuminate\Cache\DatabaseStore $instance */ + return $instance->forgetIfExpired($key); } /** - * Get the Filesystem instance. + * Remove all items from the cache. * - * @return \Illuminate\Filesystem\Filesystem + * @return bool * @static */ - public static function getFilesystem() + public static function flush() { - /** @var \Illuminate\Cache\FileStore $instance */ - return $instance->getFilesystem(); + /** @var \Illuminate\Cache\DatabaseStore $instance */ + return $instance->flush(); } /** - * Get the working directory of the cache. + * Get the underlying database connection. * - * @return string + * @return \Illuminate\Database\MySqlConnection * @static */ - public static function getDirectory() + public static function getConnection() { - /** @var \Illuminate\Cache\FileStore $instance */ - return $instance->getDirectory(); + /** @var \Illuminate\Cache\DatabaseStore $instance */ + return $instance->getConnection(); } /** - * Set the cache directory where locks should be stored. + * Specify the name of the connection that should be used to manage locks. * - * @param string|null $lockDirectory - * @return \Illuminate\Cache\FileStore + * @param \Illuminate\Database\ConnectionInterface $connection + * @return \Illuminate\Cache\DatabaseStore * @static */ - public static function setLockDirectory($lockDirectory) + public static function setLockConnection($connection) { - /** @var \Illuminate\Cache\FileStore $instance */ - return $instance->setLockDirectory($lockDirectory); + /** @var \Illuminate\Cache\DatabaseStore $instance */ + return $instance->setLockConnection($connection); } /** * Get the cache key prefix. @@ -4423,7 +4412,7 @@ public static function setLockDirectory($lockDirectory) */ public static function getPrefix() { - /** @var \Illuminate\Cache\FileStore $instance */ + /** @var \Illuminate\Cache\DatabaseStore $instance */ return $instance->getPrefix(); } diff --git a/composer.json b/composer.json index 327f6d5ba..e522d3346 100644 --- a/composer.json +++ b/composer.json @@ -25,7 +25,8 @@ "livewire/livewire": "^3.4.4", "maatwebsite/excel": "^3.1.52", "maennchen/zipstream-php": "^2.4", - "spatie/laravel-settings": "^2.8.3" + "spatie/laravel-settings": "^2.8.3", + "timokoerber/laravel-one-time-operations": "^1.4" }, "require-dev": { "barryvdh/laravel-ide-helper": "^2.13", diff --git a/composer.lock b/composer.lock index 25a024710..f2a43ebb1 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "c1fc419fdb039a495ad46edcf52b3d33", + "content-hash": "e5dc633cda66c62e07eb9257c754ad91", "packages": [ { "name": "anourvalar/eloquent-serialize", @@ -9144,6 +9144,70 @@ }, "time": "2023-12-08T13:03:43+00:00" }, + { + "name": "timokoerber/laravel-one-time-operations", + "version": "1.4.0", + "source": { + "type": "git", + "url": "https://github.com/TimoKoerber/laravel-one-time-operations.git", + "reference": "148fd0a05ddd4fbc2c8b65846cfb4a4cc788e37c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/TimoKoerber/laravel-one-time-operations/zipball/148fd0a05ddd4fbc2c8b65846cfb4a4cc788e37c", + "reference": "148fd0a05ddd4fbc2c8b65846cfb4a4cc788e37c", + "shasum": "" + }, + "require": { + "illuminate/contracts": "^9.0|^10.0", + "illuminate/support": "^9.0|^10.0", + "php": "^8.0" + }, + "require-dev": { + "orchestra/testbench": "7", + "phpunit/phpunit": "^9.4" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "TimoKoerber\\LaravelOneTimeOperations\\Providers\\OneTimeOperationsServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "TimoKoerber\\LaravelOneTimeOperations\\": "src/", + "TimoKoerber\\LaravelOneTimeOperations\\Database\\Factories\\": "database/factories/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "timo.koerber", + "email": "koerber.timo@gmail.com", + "homepage": "https://www.timokoerber.com", + "role": "Developer" + } + ], + "description": "Run operations once after deployment - just like you do it with migrations!", + "homepage": "https://github.com/timokoerber/laravel-one-time-operations", + "keywords": [ + "deployment", + "jobs", + "laravel", + "migrations", + "operations" + ], + "support": { + "issues": "https://github.com/TimoKoerber/laravel-one-time-operations/issues", + "source": "https://github.com/TimoKoerber/laravel-one-time-operations/tree/1.4.0" + }, + "time": "2023-12-16T18:30:50+00:00" + }, { "name": "vlucas/phpdotenv", "version": "v5.6.0", @@ -12232,5 +12296,8 @@ "php": "^8.1" }, "platform-dev": [], + "platform-overrides": { + "php": "8.2" + }, "plugin-api-version": "2.6.0" }