diff --git a/.gitignore b/.gitignore index 2df6bef..823dcc0 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,5 @@ /node_modules /.idea **/.DS_Store +/.phpunit.result.cache +/build \ No newline at end of file diff --git a/.phpunit-watcher.yml b/.phpunit-watcher.yml new file mode 100644 index 0000000..ccaf5a5 --- /dev/null +++ b/.phpunit-watcher.yml @@ -0,0 +1,3 @@ +notifications: + passingTests: false + failingTests: false \ No newline at end of file diff --git a/README.md b/README.md index ae64761..1581d5f 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,30 @@ You can install the package with composer: composer require guava/laravel-populator ``` + +You can optionally publish the database migrations if you plan to enable [tracking](#tracking-inserted-models) + +```bash +php artisan vendor:publish --provider 'Guava\LaravelPopulator\PopulatorServiceProvider' --tag 'migrations' +php artisan migrate +``` + +or publish the config + +```bash +php artisan vendor:publish --provider 'Guava\LaravelPopulator\PopulatorServiceProvider' --tag 'config' +``` + +which currently provides the following options + +**config/populator.php** +```php +return [ + 'tracking' => false, + 'population_model' => '\Guava\LaravelPopulator\Models\Population', +]; +``` + ## How it works There are three major terms that Laravel Populator introduces: @@ -137,6 +161,42 @@ Populator::make('v1') This will call your populator and all it's defined bundles (more information in the Bundles section) +### Reversing a populator +The records inserted by a populator can be removed if [tracking](#enabling-tracking) is enabled when the populator was run. + +```php +Populator::make('v1') + ->bundles([//your bundles to reverse or leave blank for all bundles in the populator]) + ->rollback() +``` + +Rollbacks will filter using the following condition + +1. Population populator name +2. Bundle model classes +3. Bundle name + +This allows you to control what bundles are rolled back from a populator. + +For example you can rollback a subset of the bundles from the populator + +```php + +Populator::make('initial') + ->bundles([ + Bundle::make(User::class), + Bundle::make(Post::class), + ]) + ->call(); +//User and Post entries now exist + +Populator::make('initial') + ->bundles([Bundle::make(Post::class)]) + ->rollback(); +//Post entries were removed +``` + + ### Environment Populators can be set to be executed only on specific environments. You might most likely want to seed different data for your local environment and your production environment. @@ -211,6 +271,22 @@ Bundle::make(User::class) ... ``` +## Override insert behavior + +If you need to customize the insertion behavior for records you can call `performInsertUsing()` on a bundle. + +For example, to perform an updateOrCreate instead of an insert + +```php + Bundle::make(User::class) + ->performInsertUsing(function (array $data, Bundle $bundle) { + return $bundle->model::updateOrCreate( + Arr::only($data, ['email']), + Arr::except($data, ['email']) + )->getKey(); + }); +``` + ## Relations Records can of course have relations with other records. Currently supported relations are: @@ -342,6 +418,85 @@ return [ ``` This will automatically create two Like's with the defined attributes and a relationship to the post they have been created in. +## Tracking inserted models + +Inserted models by a populator can be tracked in the database by enabling the tracking feature in Laravel populator. + +```php +\Guava\LaravelPopulator\Models\Population::first() +->populatable; //provides access to the model that was inserted by Laravel populator. +``` + +Laravel populator provides a trait `[HasPopulation.php](src%2FConcerns%2FHasPopulation.php)` to access +the Population from models + +```php +class User extends Model implements TracksPopulatedEntries +{ + use HasPopulation; +} +``` + +The model then has access to the Population relationship by `$model->population` + +### Enabling tracking +Tracking can be enabled either by enabling the feature inside the published configuration file or by enabling it +in the boot method of a service provider. + +*Enabling by config*: + +**config/populator.php** +```php +return [ + 'tracking' => true, + //...other options +]; +``` + +*Enabling by provider*: + +**AppServiceProvider.php** +```php +public function boot() { + \Guava\LaravelPopulator\Facades\Feature::enableTrackingFeature(); +} +``` + +### Marking models for tracking + +Models must implement [TracksPopulatedEntries.php](src%2FContracts%2FTracksPopulatedEntries.php) to opt in for saving populations. + +```php +class User extends Model implements TracksPopulatedEntries +{ +} +``` + +### Swapping the Population model + +The population model can be changed by setting the model class inside the published configuration file or by enabling it +in the boot method of a service provider + +*Enabling by config*: + +**config/populator.php** +```php +return [ + 'population_model' => SomeModel::class, + //...other options +]; +``` + +*Enabling by provider*: + +**AppServiceProvider.php** +```php +public function boot() { + \Guava\LaravelPopulator\Facades\Feature::customPopulationModel(SomeModel::class); +} +``` + + ## Other packages - [Filament Icon Picker](https://github.com/LukasFreyCZ/filament-icon-picker) - [Filament Drafts](https://github.com/GuavaCZ/filament-drafts) diff --git a/composer.json b/composer.json index a57426e..0dd34a4 100644 --- a/composer.json +++ b/composer.json @@ -13,15 +13,33 @@ "email": "stepan.mocjak@guava.cz" } ], - "require": {}, + "scripts": { + "analyze": "vendor/bin/phpstan analyze", + "format": "vendor/bin/pint", + "test": "vendor/bin/phpunit", + "coverage": "vendor/bin/phpunit -d xdebug.mode=coverage", + "dev-test": "vendor/bin/phpunit-watcher watch" + }, "require-dev": { - "orchestra/testbench": "^8.0" + "orchestra/testbench": "^8.0", + "phpstan/phpstan": "^1.11", + "larastan/larastan": "^2.9", + "spatie/phpunit-watcher": "^1.24", + "laravel/pint": "^1.16" }, "autoload": { "psr-4": { "Guava\\LaravelPopulator\\": "src/" } }, + "autoload-dev": { + "psr-4": { + "Tests\\": "tests/", + "Guava\\LaravelPopulator\\": "src/", + "Guava\\LaravelPopulator\\Database\\Factories\\": "database/factories", + "Tests\\Database\\Factories\\": "tests/Fixtures/database/factories" + } + }, "extra": { "laravel": { "providers": [ diff --git a/composer.lock b/composer.lock index 2b43afc..b8ca2bb 100644 --- a/composer.lock +++ b/composer.lock @@ -4,31 +4,30 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "42f543cdc813cad0c65e50f93faf7866", + "content-hash": "b0b9d4f7e3483ea7bb1e49cf576bba80", "packages": [], "packages-dev": [ { "name": "brick/math", - "version": "0.10.2", + "version": "0.12.1", "source": { "type": "git", "url": "https://github.com/brick/math.git", - "reference": "459f2781e1a08d52ee56b0b1444086e038561e3f" + "reference": "f510c0a40911935b77b86859eb5223d58d660df1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/brick/math/zipball/459f2781e1a08d52ee56b0b1444086e038561e3f", - "reference": "459f2781e1a08d52ee56b0b1444086e038561e3f", + "url": "https://api.github.com/repos/brick/math/zipball/f510c0a40911935b77b86859eb5223d58d660df1", + "reference": "f510c0a40911935b77b86859eb5223d58d660df1", "shasum": "" }, "require": { - "ext-json": "*", - "php": "^7.4 || ^8.0" + "php": "^8.1" }, "require-dev": { "php-coveralls/php-coveralls": "^2.2", - "phpunit/phpunit": "^9.0", - "vimeo/psalm": "4.25.0" + "phpunit/phpunit": "^10.1", + "vimeo/psalm": "5.16.0" }, "type": "library", "autoload": { @@ -48,12 +47,17 @@ "arithmetic", "bigdecimal", "bignum", + "bignumber", "brick", - "math" + "decimal", + "integer", + "math", + "mathematics", + "rational" ], "support": { "issues": "https://github.com/brick/math/issues", - "source": "https://github.com/brick/math/tree/0.10.2" + "source": "https://github.com/brick/math/tree/0.12.1" }, "funding": [ { @@ -61,7 +65,369 @@ "type": "github" } ], - "time": "2022-08-10T22:54:19+00:00" + "time": "2023-11-29T23:19:16+00:00" + }, + { + "name": "carbonphp/carbon-doctrine-types", + "version": "2.1.0", + "source": { + "type": "git", + "url": "https://github.com/CarbonPHP/carbon-doctrine-types.git", + "reference": "99f76ffa36cce3b70a4a6abce41dba15ca2e84cb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/CarbonPHP/carbon-doctrine-types/zipball/99f76ffa36cce3b70a4a6abce41dba15ca2e84cb", + "reference": "99f76ffa36cce3b70a4a6abce41dba15ca2e84cb", + "shasum": "" + }, + "require": { + "php": "^7.4 || ^8.0" + }, + "conflict": { + "doctrine/dbal": "<3.7.0 || >=4.0.0" + }, + "require-dev": { + "doctrine/dbal": "^3.7.0", + "nesbot/carbon": "^2.71.0 || ^3.0.0", + "phpunit/phpunit": "^10.3" + }, + "type": "library", + "autoload": { + "psr-4": { + "Carbon\\Doctrine\\": "src/Carbon/Doctrine/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "KyleKatarn", + "email": "kylekatarnls@gmail.com" + } + ], + "description": "Types to use Carbon in Doctrine", + "keywords": [ + "carbon", + "date", + "datetime", + "doctrine", + "time" + ], + "support": { + "issues": "https://github.com/CarbonPHP/carbon-doctrine-types/issues", + "source": "https://github.com/CarbonPHP/carbon-doctrine-types/tree/2.1.0" + }, + "funding": [ + { + "url": "https://github.com/kylekatarnls", + "type": "github" + }, + { + "url": "https://opencollective.com/Carbon", + "type": "open_collective" + }, + { + "url": "https://tidelift.com/funding/github/packagist/nesbot/carbon", + "type": "tidelift" + } + ], + "time": "2023-12-11T17:09:12+00:00" + }, + { + "name": "clue/stdio-react", + "version": "v2.6.0", + "source": { + "type": "git", + "url": "https://github.com/clue/reactphp-stdio.git", + "reference": "dfa6c378aabdff718202d4e2453f752c38ea3399" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/clue/reactphp-stdio/zipball/dfa6c378aabdff718202d4e2453f752c38ea3399", + "reference": "dfa6c378aabdff718202d4e2453f752c38ea3399", + "shasum": "" + }, + "require": { + "clue/term-react": "^1.0 || ^0.1.1", + "clue/utf8-react": "^1.0 || ^0.1", + "php": ">=5.3", + "react/event-loop": "^1.2", + "react/stream": "^1.2" + }, + "require-dev": { + "clue/arguments": "^2.0", + "clue/commander": "^1.2", + "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.35" + }, + "suggest": { + "ext-mbstring": "Using ext-mbstring should provide slightly better performance for handling I/O" + }, + "type": "library", + "autoload": { + "psr-4": { + "Clue\\React\\Stdio\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Christian Lück", + "email": "christian@clue.engineering" + } + ], + "description": "Async, event-driven console input & output (STDIN, STDOUT) for truly interactive CLI applications, built on top of ReactPHP", + "homepage": "https://github.com/clue/reactphp-stdio", + "keywords": [ + "async", + "autocomplete", + "autocompletion", + "cli", + "history", + "interactive", + "reactphp", + "readline", + "stdin", + "stdio", + "stdout" + ], + "support": { + "issues": "https://github.com/clue/reactphp-stdio/issues", + "source": "https://github.com/clue/reactphp-stdio/tree/v2.6.0" + }, + "funding": [ + { + "url": "https://clue.engineering/support", + "type": "custom" + }, + { + "url": "https://github.com/clue", + "type": "github" + } + ], + "time": "2022-03-18T15:09:30+00:00" + }, + { + "name": "clue/term-react", + "version": "v1.4.0", + "source": { + "type": "git", + "url": "https://github.com/clue/reactphp-term.git", + "reference": "00f297dc597eaee2ebf98af8f27cca5d21d60fa3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/clue/reactphp-term/zipball/00f297dc597eaee2ebf98af8f27cca5d21d60fa3", + "reference": "00f297dc597eaee2ebf98af8f27cca5d21d60fa3", + "shasum": "" + }, + "require": { + "php": ">=5.3", + "react/stream": "^1.2" + }, + "require-dev": { + "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36", + "react/event-loop": "^1.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "Clue\\React\\Term\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Christian Lück", + "email": "christian@clue.engineering" + } + ], + "description": "Streaming terminal emulator, built on top of ReactPHP.", + "homepage": "https://github.com/clue/reactphp-term", + "keywords": [ + "C0", + "CSI", + "ansi", + "apc", + "ascii", + "c1", + "control codes", + "dps", + "osc", + "pm", + "reactphp", + "streaming", + "terminal", + "vt100", + "xterm" + ], + "support": { + "issues": "https://github.com/clue/reactphp-term/issues", + "source": "https://github.com/clue/reactphp-term/tree/v1.4.0" + }, + "funding": [ + { + "url": "https://clue.engineering/support", + "type": "custom" + }, + { + "url": "https://github.com/clue", + "type": "github" + } + ], + "time": "2024-01-30T10:22:09+00:00" + }, + { + "name": "clue/utf8-react", + "version": "v1.3.0", + "source": { + "type": "git", + "url": "https://github.com/clue/reactphp-utf8.git", + "reference": "d5cd04d39cb5457aa5df830b7c4b301d2694217e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/clue/reactphp-utf8/zipball/d5cd04d39cb5457aa5df830b7c4b301d2694217e", + "reference": "d5cd04d39cb5457aa5df830b7c4b301d2694217e", + "shasum": "" + }, + "require": { + "php": ">=5.3", + "react/stream": "^1.0 || ^0.7 || ^0.6 || ^0.5 || ^0.4 || ^0.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36", + "react/stream": "^1.0 || ^0.7" + }, + "type": "library", + "autoload": { + "psr-4": { + "Clue\\React\\Utf8\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Christian Lück", + "email": "christian@clue.engineering" + } + ], + "description": "Streaming UTF-8 parser, built on top of ReactPHP.", + "homepage": "https://github.com/clue/reactphp-utf8", + "keywords": [ + "reactphp", + "streaming", + "unicode", + "utf-8", + "utf8" + ], + "support": { + "issues": "https://github.com/clue/reactphp-utf8/issues", + "source": "https://github.com/clue/reactphp-utf8/tree/v1.3.0" + }, + "funding": [ + { + "url": "https://clue.engineering/support", + "type": "custom" + }, + { + "url": "https://github.com/clue", + "type": "github" + } + ], + "time": "2023-12-06T14:52:17+00:00" + }, + { + "name": "composer/semver", + "version": "3.4.0", + "source": { + "type": "git", + "url": "https://github.com/composer/semver.git", + "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/semver/zipball/35e8d0af4486141bc745f23a29cc2091eb624a32", + "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^1.4", + "symfony/phpunit-bridge": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Semver\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nils Adermann", + "email": "naderman@naderman.de", + "homepage": "http://www.naderman.de" + }, + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + }, + { + "name": "Rob Bast", + "email": "rob.bast@gmail.com", + "homepage": "http://robbast.nl" + } + ], + "description": "Semver library that offers utilities, version constraint parsing and validation.", + "keywords": [ + "semantic", + "semver", + "validation", + "versioning" + ], + "support": { + "irc": "ircs://irc.libera.chat:6697/composer", + "issues": "https://github.com/composer/semver/issues", + "source": "https://github.com/composer/semver/tree/3.4.0" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2023-08-31T09:50:34+00:00" }, { "name": "dflydev/dot-access-data", @@ -140,28 +506,28 @@ }, { "name": "doctrine/inflector", - "version": "2.0.6", + "version": "2.0.10", "source": { "type": "git", "url": "https://github.com/doctrine/inflector.git", - "reference": "d9d313a36c872fd6ee06d9a6cbcf713eaa40f024" + "reference": "5817d0659c5b50c9b950feb9af7b9668e2c436bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/inflector/zipball/d9d313a36c872fd6ee06d9a6cbcf713eaa40f024", - "reference": "d9d313a36c872fd6ee06d9a6cbcf713eaa40f024", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/5817d0659c5b50c9b950feb9af7b9668e2c436bc", + "reference": "5817d0659c5b50c9b950feb9af7b9668e2c436bc", "shasum": "" }, "require": { "php": "^7.2 || ^8.0" }, "require-dev": { - "doctrine/coding-standard": "^10", + "doctrine/coding-standard": "^11.0", "phpstan/phpstan": "^1.8", "phpstan/phpstan-phpunit": "^1.1", "phpstan/phpstan-strict-rules": "^1.3", "phpunit/phpunit": "^8.5 || ^9.5", - "vimeo/psalm": "^4.25" + "vimeo/psalm": "^4.25 || ^5.4" }, "type": "library", "autoload": { @@ -211,7 +577,7 @@ ], "support": { "issues": "https://github.com/doctrine/inflector/issues", - "source": "https://github.com/doctrine/inflector/tree/2.0.6" + "source": "https://github.com/doctrine/inflector/tree/2.0.10" }, "funding": [ { @@ -227,31 +593,31 @@ "type": "tidelift" } ], - "time": "2022-10-20T09:10:12+00:00" + "time": "2024-02-18T20:23:39+00:00" }, { "name": "doctrine/lexer", - "version": "3.0.0", + "version": "3.0.1", "source": { "type": "git", "url": "https://github.com/doctrine/lexer.git", - "reference": "84a527db05647743d50373e0ec53a152f2cde568" + "reference": "31ad66abc0fc9e1a1f2d9bc6a42668d2fbbcd6dd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/84a527db05647743d50373e0ec53a152f2cde568", - "reference": "84a527db05647743d50373e0ec53a152f2cde568", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/31ad66abc0fc9e1a1f2d9bc6a42668d2fbbcd6dd", + "reference": "31ad66abc0fc9e1a1f2d9bc6a42668d2fbbcd6dd", "shasum": "" }, "require": { "php": "^8.1" }, "require-dev": { - "doctrine/coding-standard": "^10", - "phpstan/phpstan": "^1.9", - "phpunit/phpunit": "^9.5", + "doctrine/coding-standard": "^12", + "phpstan/phpstan": "^1.10", + "phpunit/phpunit": "^10.5", "psalm/plugin-phpunit": "^0.18.3", - "vimeo/psalm": "^5.0" + "vimeo/psalm": "^5.21" }, "type": "library", "autoload": { @@ -288,7 +654,7 @@ ], "support": { "issues": "https://github.com/doctrine/lexer/issues", - "source": "https://github.com/doctrine/lexer/tree/3.0.0" + "source": "https://github.com/doctrine/lexer/tree/3.0.1" }, "funding": [ { @@ -304,20 +670,20 @@ "type": "tidelift" } ], - "time": "2022-12-15T16:57:16+00:00" + "time": "2024-02-05T11:56:58+00:00" }, { "name": "dragonmantank/cron-expression", - "version": "v3.3.2", + "version": "v3.3.3", "source": { "type": "git", "url": "https://github.com/dragonmantank/cron-expression.git", - "reference": "782ca5968ab8b954773518e9e49a6f892a34b2a8" + "reference": "adfb1f505deb6384dc8b39804c5065dd3c8c8c0a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/dragonmantank/cron-expression/zipball/782ca5968ab8b954773518e9e49a6f892a34b2a8", - "reference": "782ca5968ab8b954773518e9e49a6f892a34b2a8", + "url": "https://api.github.com/repos/dragonmantank/cron-expression/zipball/adfb1f505deb6384dc8b39804c5065dd3c8c8c0a", + "reference": "adfb1f505deb6384dc8b39804c5065dd3c8c8c0a", "shasum": "" }, "require": { @@ -357,7 +723,7 @@ ], "support": { "issues": "https://github.com/dragonmantank/cron-expression/issues", - "source": "https://github.com/dragonmantank/cron-expression/tree/v3.3.2" + "source": "https://github.com/dragonmantank/cron-expression/tree/v3.3.3" }, "funding": [ { @@ -365,20 +731,20 @@ "type": "github" } ], - "time": "2022-09-10T18:51:20+00:00" + "time": "2023-08-10T19:36:49+00:00" }, { "name": "egulias/email-validator", - "version": "4.0.1", + "version": "4.0.2", "source": { "type": "git", "url": "https://github.com/egulias/EmailValidator.git", - "reference": "3a85486b709bc384dae8eb78fb2eec649bdb64ff" + "reference": "ebaaf5be6c0286928352e054f2d5125608e5405e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/3a85486b709bc384dae8eb78fb2eec649bdb64ff", - "reference": "3a85486b709bc384dae8eb78fb2eec649bdb64ff", + "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/ebaaf5be6c0286928352e054f2d5125608e5405e", + "reference": "ebaaf5be6c0286928352e054f2d5125608e5405e", "shasum": "" }, "require": { @@ -387,8 +753,8 @@ "symfony/polyfill-intl-idn": "^1.26" }, "require-dev": { - "phpunit/phpunit": "^9.5.27", - "vimeo/psalm": "^4.30" + "phpunit/phpunit": "^10.2", + "vimeo/psalm": "^5.12" }, "suggest": { "ext-intl": "PHP Internationalization Libraries are required to use the SpoofChecking validation" @@ -424,7 +790,7 @@ ], "support": { "issues": "https://github.com/egulias/EmailValidator/issues", - "source": "https://github.com/egulias/EmailValidator/tree/4.0.1" + "source": "https://github.com/egulias/EmailValidator/tree/4.0.2" }, "funding": [ { @@ -432,50 +798,92 @@ "type": "github" } ], - "time": "2023-01-14T14:17:03+00:00" + "time": "2023-10-06T06:47:41+00:00" }, { - "name": "fakerphp/faker", - "version": "v1.21.0", + "name": "evenement/evenement", + "version": "v3.0.2", "source": { "type": "git", - "url": "https://github.com/FakerPHP/Faker.git", - "reference": "92efad6a967f0b79c499705c69b662f738cc9e4d" + "url": "https://github.com/igorw/evenement.git", + "reference": "0a16b0d71ab13284339abb99d9d2bd813640efbc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FakerPHP/Faker/zipball/92efad6a967f0b79c499705c69b662f738cc9e4d", - "reference": "92efad6a967f0b79c499705c69b662f738cc9e4d", + "url": "https://api.github.com/repos/igorw/evenement/zipball/0a16b0d71ab13284339abb99d9d2bd813640efbc", + "reference": "0a16b0d71ab13284339abb99d9d2bd813640efbc", "shasum": "" }, "require": { - "php": "^7.4 || ^8.0", - "psr/container": "^1.0 || ^2.0", - "symfony/deprecation-contracts": "^2.2 || ^3.0" - }, - "conflict": { - "fzaninotto/faker": "*" + "php": ">=7.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.4.1", - "doctrine/persistence": "^1.3 || ^2.0", - "ext-intl": "*", - "phpunit/phpunit": "^9.5.26", - "symfony/phpunit-bridge": "^5.4.16" - }, - "suggest": { - "doctrine/orm": "Required to use Faker\\ORM\\Doctrine", - "ext-curl": "Required by Faker\\Provider\\Image to download images.", - "ext-dom": "Required by Faker\\Provider\\HtmlLorem for generating random HTML.", - "ext-iconv": "Required by Faker\\Provider\\ru_RU\\Text::realText() for generating real Russian text.", - "ext-mbstring": "Required for multibyte Unicode string functionality." + "phpunit/phpunit": "^9 || ^6" + }, + "type": "library", + "autoload": { + "psr-4": { + "Evenement\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Igor Wiedler", + "email": "igor@wiedler.ch" + } + ], + "description": "Événement is a very simple event dispatching library for PHP", + "keywords": [ + "event-dispatcher", + "event-emitter" + ], + "support": { + "issues": "https://github.com/igorw/evenement/issues", + "source": "https://github.com/igorw/evenement/tree/v3.0.2" + }, + "time": "2023-08-08T05:53:35+00:00" + }, + { + "name": "fakerphp/faker", + "version": "v1.23.1", + "source": { + "type": "git", + "url": "https://github.com/FakerPHP/Faker.git", + "reference": "bfb4fe148adbf78eff521199619b93a52ae3554b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/FakerPHP/Faker/zipball/bfb4fe148adbf78eff521199619b93a52ae3554b", + "reference": "bfb4fe148adbf78eff521199619b93a52ae3554b", + "shasum": "" + }, + "require": { + "php": "^7.4 || ^8.0", + "psr/container": "^1.0 || ^2.0", + "symfony/deprecation-contracts": "^2.2 || ^3.0" + }, + "conflict": { + "fzaninotto/faker": "*" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.4.1", + "doctrine/persistence": "^1.3 || ^2.0", + "ext-intl": "*", + "phpunit/phpunit": "^9.5.26", + "symfony/phpunit-bridge": "^5.4.16" + }, + "suggest": { + "doctrine/orm": "Required to use Faker\\ORM\\Doctrine", + "ext-curl": "Required by Faker\\Provider\\Image to download images.", + "ext-dom": "Required by Faker\\Provider\\HtmlLorem for generating random HTML.", + "ext-iconv": "Required by Faker\\Provider\\ru_RU\\Text::realText() for generating real Russian text.", + "ext-mbstring": "Required for multibyte Unicode string functionality." }, "type": "library", - "extra": { - "branch-alias": { - "dev-main": "v1.21-dev" - } - }, "autoload": { "psr-4": { "Faker\\": "src/Faker/" @@ -498,27 +906,98 @@ ], "support": { "issues": "https://github.com/FakerPHP/Faker/issues", - "source": "https://github.com/FakerPHP/Faker/tree/v1.21.0" + "source": "https://github.com/FakerPHP/Faker/tree/v1.23.1" }, - "time": "2022-12-13T13:54:32+00:00" + "time": "2024-01-02T13:46:09+00:00" + }, + { + "name": "filp/whoops", + "version": "2.15.4", + "source": { + "type": "git", + "url": "https://github.com/filp/whoops.git", + "reference": "a139776fa3f5985a50b509f2a02ff0f709d2a546" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/filp/whoops/zipball/a139776fa3f5985a50b509f2a02ff0f709d2a546", + "reference": "a139776fa3f5985a50b509f2a02ff0f709d2a546", + "shasum": "" + }, + "require": { + "php": "^5.5.9 || ^7.0 || ^8.0", + "psr/log": "^1.0.1 || ^2.0 || ^3.0" + }, + "require-dev": { + "mockery/mockery": "^0.9 || ^1.0", + "phpunit/phpunit": "^4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.3", + "symfony/var-dumper": "^2.6 || ^3.0 || ^4.0 || ^5.0" + }, + "suggest": { + "symfony/var-dumper": "Pretty print complex values better with var-dumper available", + "whoops/soap": "Formats errors as SOAP responses" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.7-dev" + } + }, + "autoload": { + "psr-4": { + "Whoops\\": "src/Whoops/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Filipe Dobreira", + "homepage": "https://github.com/filp", + "role": "Developer" + } + ], + "description": "php error handling for cool kids", + "homepage": "https://filp.github.io/whoops/", + "keywords": [ + "error", + "exception", + "handling", + "library", + "throwable", + "whoops" + ], + "support": { + "issues": "https://github.com/filp/whoops/issues", + "source": "https://github.com/filp/whoops/tree/2.15.4" + }, + "funding": [ + { + "url": "https://github.com/denis-sokolov", + "type": "github" + } + ], + "time": "2023-11-03T12:00:00+00:00" }, { "name": "fruitcake/php-cors", - "version": "v1.2.0", + "version": "v1.3.0", "source": { "type": "git", "url": "https://github.com/fruitcake/php-cors.git", - "reference": "58571acbaa5f9f462c9c77e911700ac66f446d4e" + "reference": "3d158f36e7875e2f040f37bc0573956240a5a38b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/fruitcake/php-cors/zipball/58571acbaa5f9f462c9c77e911700ac66f446d4e", - "reference": "58571acbaa5f9f462c9c77e911700ac66f446d4e", + "url": "https://api.github.com/repos/fruitcake/php-cors/zipball/3d158f36e7875e2f040f37bc0573956240a5a38b", + "reference": "3d158f36e7875e2f040f37bc0573956240a5a38b", "shasum": "" }, "require": { "php": "^7.4|^8.0", - "symfony/http-foundation": "^4.4|^5.4|^6" + "symfony/http-foundation": "^4.4|^5.4|^6|^7" }, "require-dev": { "phpstan/phpstan": "^1.4", @@ -528,7 +1007,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.1-dev" + "dev-master": "1.2-dev" } }, "autoload": { @@ -559,7 +1038,7 @@ ], "support": { "issues": "https://github.com/fruitcake/php-cors/issues", - "source": "https://github.com/fruitcake/php-cors/tree/v1.2.0" + "source": "https://github.com/fruitcake/php-cors/tree/v1.3.0" }, "funding": [ { @@ -571,28 +1050,28 @@ "type": "github" } ], - "time": "2022-02-20T15:07:15+00:00" + "time": "2023-10-12T05:21:21+00:00" }, { "name": "graham-campbell/result-type", - "version": "v1.1.0", + "version": "v1.1.2", "source": { "type": "git", "url": "https://github.com/GrahamCampbell/Result-Type.git", - "reference": "a878d45c1914464426dc94da61c9e1d36ae262a8" + "reference": "fbd48bce38f73f8a4ec8583362e732e4095e5862" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/a878d45c1914464426dc94da61c9e1d36ae262a8", - "reference": "a878d45c1914464426dc94da61c9e1d36ae262a8", + "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/fbd48bce38f73f8a4ec8583362e732e4095e5862", + "reference": "fbd48bce38f73f8a4ec8583362e732e4095e5862", "shasum": "" }, "require": { "php": "^7.2.5 || ^8.0", - "phpoption/phpoption": "^1.9" + "phpoption/phpoption": "^1.9.2" }, "require-dev": { - "phpunit/phpunit": "^8.5.28 || ^9.5.21" + "phpunit/phpunit": "^8.5.34 || ^9.6.13 || ^10.4.2" }, "type": "library", "autoload": { @@ -621,7 +1100,7 @@ ], "support": { "issues": "https://github.com/GrahamCampbell/Result-Type/issues", - "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.1.0" + "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.1.2" }, "funding": [ { @@ -633,26 +1112,26 @@ "type": "tidelift" } ], - "time": "2022-07-30T15:56:11+00:00" + "time": "2023-11-12T22:16:48+00:00" }, { "name": "guzzlehttp/psr7", - "version": "2.4.3", + "version": "2.6.2", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "67c26b443f348a51926030c83481b85718457d3d" + "reference": "45b30f99ac27b5ca93cb4831afe16285f57b8221" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/67c26b443f348a51926030c83481b85718457d3d", - "reference": "67c26b443f348a51926030c83481b85718457d3d", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/45b30f99ac27b5ca93cb4831afe16285f57b8221", + "reference": "45b30f99ac27b5ca93cb4831afe16285f57b8221", "shasum": "" }, "require": { "php": "^7.2.5 || ^8.0", "psr/http-factory": "^1.0", - "psr/http-message": "^1.0", + "psr/http-message": "^1.1 || ^2.0", "ralouphie/getallheaders": "^3.0" }, "provide": { @@ -660,9 +1139,9 @@ "psr/http-message-implementation": "1.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.1", + "bamarni/composer-bin-plugin": "^1.8.2", "http-interop/http-factory-tests": "^0.9", - "phpunit/phpunit": "^8.5.29 || ^9.5.23" + "phpunit/phpunit": "^8.5.36 || ^9.6.15" }, "suggest": { "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" @@ -672,9 +1151,6 @@ "bamarni-bin": { "bin-links": true, "forward-command": false - }, - "branch-alias": { - "dev-master": "2.4-dev" } }, "autoload": { @@ -736,7 +1212,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.4.3" + "source": "https://github.com/guzzle/psr7/tree/2.6.2" }, "funding": [ { @@ -752,34 +1228,36 @@ "type": "tidelift" } ], - "time": "2022-10-26T14:07:24+00:00" + "time": "2023-12-03T20:05:35+00:00" }, { "name": "guzzlehttp/uri-template", - "version": "v1.0.1", + "version": "v1.0.3", "source": { "type": "git", "url": "https://github.com/guzzle/uri-template.git", - "reference": "b945d74a55a25a949158444f09ec0d3c120d69e2" + "reference": "ecea8feef63bd4fef1f037ecb288386999ecc11c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/uri-template/zipball/b945d74a55a25a949158444f09ec0d3c120d69e2", - "reference": "b945d74a55a25a949158444f09ec0d3c120d69e2", + "url": "https://api.github.com/repos/guzzle/uri-template/zipball/ecea8feef63bd4fef1f037ecb288386999ecc11c", + "reference": "ecea8feef63bd4fef1f037ecb288386999ecc11c", "shasum": "" }, "require": { "php": "^7.2.5 || ^8.0", - "symfony/polyfill-php80": "^1.17" + "symfony/polyfill-php80": "^1.24" }, "require-dev": { - "phpunit/phpunit": "^8.5.19 || ^9.5.8", + "bamarni/composer-bin-plugin": "^1.8.2", + "phpunit/phpunit": "^8.5.36 || ^9.6.15", "uri-template/tests": "1.0.0" }, "type": "library", "extra": { - "branch-alias": { - "dev-master": "1.0-dev" + "bamarni-bin": { + "bin-links": true, + "forward-command": false } }, "autoload": { @@ -820,7 +1298,7 @@ ], "support": { "issues": "https://github.com/guzzle/uri-template/issues", - "source": "https://github.com/guzzle/uri-template/tree/v1.0.1" + "source": "https://github.com/guzzle/uri-template/tree/v1.0.3" }, "funding": [ { @@ -836,7 +1314,7 @@ "type": "tidelift" } ], - "time": "2021-10-07T12:57:01+00:00" + "time": "2023-12-03T19:50:20+00:00" }, { "name": "hamcrest/hamcrest-php", @@ -889,22 +1367,241 @@ }, "time": "2020-07-09T08:09:16+00:00" }, + { + "name": "jolicode/jolinotif", + "version": "v2.7.2", + "source": { + "type": "git", + "url": "https://github.com/jolicode/JoliNotif.git", + "reference": "b34dac1826c8d33e9fd5c300546261e94f1ebdb8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/jolicode/JoliNotif/zipball/b34dac1826c8d33e9fd5c300546261e94f1ebdb8", + "reference": "b34dac1826c8d33e9fd5c300546261e94f1ebdb8", + "shasum": "" + }, + "require": { + "jolicode/php-os-helper": "^0.1.0", + "php": ">=8.1", + "psr/log": "^1.0 || ^2.0 || ^3.0", + "symfony/deprecation-contracts": "^3", + "symfony/process": "^5.4 || ^6.0 || ^7.0" + }, + "require-dev": { + "symfony/finder": "^5.4 || ^6.0 || ^7.0", + "symfony/phpunit-bridge": "^5.4 || ^6.0 || ^7.0" + }, + "suggest": { + "ext-ffi": "Needed to send notifications via libnotify on Linux" + }, + "bin": [ + "jolinotif" + ], + "type": "library", + "autoload": { + "psr-4": { + "Joli\\JoliNotif\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Loïck Piera", + "email": "pyrech@gmail.com" + } + ], + "description": "Send desktop notifications on Windows, Linux, MacOS.", + "keywords": [ + "MAC", + "growl", + "linux", + "notification", + "windows" + ], + "support": { + "issues": "https://github.com/jolicode/JoliNotif/issues", + "source": "https://github.com/jolicode/JoliNotif/tree/v2.7.2" + }, + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/jolicode/jolinotif", + "type": "tidelift" + } + ], + "time": "2024-06-01T06:05:49+00:00" + }, + { + "name": "jolicode/php-os-helper", + "version": "v0.1.0", + "source": { + "type": "git", + "url": "https://github.com/jolicode/php-os-helper.git", + "reference": "1622ad8bbcab98e62b5c041397e8519f10d90e29" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/jolicode/php-os-helper/zipball/1622ad8bbcab98e62b5c041397e8519f10d90e29", + "reference": "1622ad8bbcab98e62b5c041397e8519f10d90e29", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "require-dev": { + "symfony/phpunit-bridge": "^6.3.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "JoliCode\\PhpOsHelper\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Loïck Piera", + "email": "pyrech@gmail.com" + } + ], + "description": "Helpers to detect the OS of the machine where PHP is running.", + "keywords": [ + "linux", + "os", + "osx", + "php", + "windows" + ], + "support": { + "issues": "https://github.com/jolicode/php-os-helper/issues", + "source": "https://github.com/jolicode/php-os-helper/tree/v0.1.0" + }, + "time": "2023-12-03T12:46:03+00:00" + }, + { + "name": "larastan/larastan", + "version": "v2.9.7", + "source": { + "type": "git", + "url": "https://github.com/larastan/larastan.git", + "reference": "5c805f636095cc2e0b659e3954775cf8f1dad1bb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/larastan/larastan/zipball/5c805f636095cc2e0b659e3954775cf8f1dad1bb", + "reference": "5c805f636095cc2e0b659e3954775cf8f1dad1bb", + "shasum": "" + }, + "require": { + "ext-json": "*", + "illuminate/console": "^9.52.16 || ^10.28.0 || ^11.0", + "illuminate/container": "^9.52.16 || ^10.28.0 || ^11.0", + "illuminate/contracts": "^9.52.16 || ^10.28.0 || ^11.0", + "illuminate/database": "^9.52.16 || ^10.28.0 || ^11.0", + "illuminate/http": "^9.52.16 || ^10.28.0 || ^11.0", + "illuminate/pipeline": "^9.52.16 || ^10.28.0 || ^11.0", + "illuminate/support": "^9.52.16 || ^10.28.0 || ^11.0", + "php": "^8.0.2", + "phpmyadmin/sql-parser": "^5.9.0", + "phpstan/phpstan": "^1.11.1" + }, + "require-dev": { + "doctrine/coding-standard": "^12.0", + "nikic/php-parser": "^4.19.1", + "orchestra/canvas": "^7.11.1 || ^8.11.0 || ^9.0.2", + "orchestra/testbench": "^7.33.0 || ^8.13.0 || ^9.0.3", + "phpunit/phpunit": "^9.6.13 || ^10.5.16" + }, + "suggest": { + "orchestra/testbench": "Using Larastan for analysing a package needs Testbench" + }, + "type": "phpstan-extension", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + }, + "phpstan": { + "includes": [ + "extension.neon" + ] + } + }, + "autoload": { + "psr-4": { + "Larastan\\Larastan\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Can Vural", + "email": "can9119@gmail.com" + }, + { + "name": "Nuno Maduro", + "email": "enunomaduro@gmail.com" + } + ], + "description": "Larastan - Discover bugs in your code without running it. A phpstan/phpstan wrapper for Laravel", + "keywords": [ + "PHPStan", + "code analyse", + "code analysis", + "larastan", + "laravel", + "package", + "php", + "static analysis" + ], + "support": { + "issues": "https://github.com/larastan/larastan/issues", + "source": "https://github.com/larastan/larastan/tree/v2.9.7" + }, + "funding": [ + { + "url": "https://www.paypal.com/paypalme/enunomaduro", + "type": "custom" + }, + { + "url": "https://github.com/canvural", + "type": "github" + }, + { + "url": "https://github.com/nunomaduro", + "type": "github" + }, + { + "url": "https://www.patreon.com/nunomaduro", + "type": "patreon" + } + ], + "time": "2024-05-27T18:33:26+00:00" + }, { "name": "laravel/framework", - "version": "v10.0.0", + "version": "v10.48.13", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "be2ddb5c31b0b9ebc2738d9f37a9d4c960aa3199" + "reference": "2c6816d697a4362c09c066118addda251b70b98a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/be2ddb5c31b0b9ebc2738d9f37a9d4c960aa3199", - "reference": "be2ddb5c31b0b9ebc2738d9f37a9d4c960aa3199", + "url": "https://api.github.com/repos/laravel/framework/zipball/2c6816d697a4362c09c066118addda251b70b98a", + "reference": "2c6816d697a4362c09c066118addda251b70b98a", "shasum": "" }, "require": { - "brick/math": "^0.9.3|^0.10.2|^0.11", + "brick/math": "^0.9.3|^0.10.2|^0.11|^0.12", "composer-runtime-api": "^2.2", "doctrine/inflector": "^2.0.5", "dragonmantank/cron-expression": "^3.3.2", @@ -918,11 +1615,12 @@ "ext-tokenizer": "*", "fruitcake/php-cors": "^1.2", "guzzlehttp/uri-template": "^1.0", + "laravel/prompts": "^0.1.9", "laravel/serializable-closure": "^1.3", "league/commonmark": "^2.2.1", "league/flysystem": "^3.8.0", "monolog/monolog": "^3.0", - "nesbot/carbon": "^2.62.1", + "nesbot/carbon": "^2.67", "nunomaduro/termwind": "^1.13", "php": "^8.1", "psr/container": "^1.1.1|^2.0.1", @@ -932,7 +1630,7 @@ "symfony/console": "^6.2", "symfony/error-handler": "^6.2", "symfony/finder": "^6.2", - "symfony/http-foundation": "^6.2", + "symfony/http-foundation": "^6.4", "symfony/http-kernel": "^6.2", "symfony/mailer": "^6.2", "symfony/mime": "^6.2", @@ -945,6 +1643,10 @@ "voku/portable-ascii": "^2.0" }, "conflict": { + "carbonphp/carbon-doctrine-types": ">=3.0", + "doctrine/dbal": ">=4.0", + "mockery/mockery": "1.6.8", + "phpunit/phpunit": ">=11.0.0", "tightenco/collect": "<5.5.33" }, "provide": { @@ -999,14 +1701,15 @@ "league/flysystem-read-only": "^3.3", "league/flysystem-sftp-v3": "^3.0", "mockery/mockery": "^1.5.1", - "orchestra/testbench-core": "^8.0", + "nyholm/psr7": "^1.2", + "orchestra/testbench-core": "^8.23.4", "pda/pheanstalk": "^4.0", - "phpstan/phpdoc-parser": "^1.15", "phpstan/phpstan": "^1.4.7", - "phpunit/phpunit": "^9.6.0 || ^10.0.7", + "phpunit/phpunit": "^10.0.7", "predis/predis": "^2.0.2", "symfony/cache": "^6.2", - "symfony/http-client": "^6.2.4" + "symfony/http-client": "^6.2.4", + "symfony/psr-http-message-bridge": "^2.0" }, "suggest": { "ably/ably-php": "Required to use the Ably broadcast driver (^1.0).", @@ -1034,7 +1737,7 @@ "mockery/mockery": "Required to use mocking (^1.5.1).", "nyholm/psr7": "Required to use PSR-7 bridging features (^1.2).", "pda/pheanstalk": "Required to use the beanstalk queue driver (^4.0).", - "phpunit/phpunit": "Required to use assertions and run tests (^9.5.8).", + "phpunit/phpunit": "Required to use assertions and run tests (^9.5.8|^10.0.7).", "predis/predis": "Required to use the predis connector (^2.0.2).", "psr/http-message": "Required to allow Storage::put to accept a StreamInterface (^1.0).", "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (^6.0|^7.0).", @@ -1055,6 +1758,7 @@ "files": [ "src/Illuminate/Collections/helpers.php", "src/Illuminate/Events/functions.php", + "src/Illuminate/Filesystem/functions.php", "src/Illuminate/Foundation/helpers.php", "src/Illuminate/Support/helpers.php" ], @@ -1087,20 +1791,144 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2023-02-14T15:12:47+00:00" + "time": "2024-06-18T16:46:35+00:00" + }, + { + "name": "laravel/pint", + "version": "v1.16.1", + "source": { + "type": "git", + "url": "https://github.com/laravel/pint.git", + "reference": "9266a47f1b9231b83e0cfd849009547329d871b1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/pint/zipball/9266a47f1b9231b83e0cfd849009547329d871b1", + "reference": "9266a47f1b9231b83e0cfd849009547329d871b1", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-mbstring": "*", + "ext-tokenizer": "*", + "ext-xml": "*", + "php": "^8.1.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^3.59.3", + "illuminate/view": "^10.48.12", + "larastan/larastan": "^2.9.7", + "laravel-zero/framework": "^10.4.0", + "mockery/mockery": "^1.6.12", + "nunomaduro/termwind": "^1.15.1", + "pestphp/pest": "^2.34.8" + }, + "bin": [ + "builds/pint" + ], + "type": "project", + "autoload": { + "psr-4": { + "App\\": "app/", + "Database\\Seeders\\": "database/seeders/", + "Database\\Factories\\": "database/factories/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nuno Maduro", + "email": "enunomaduro@gmail.com" + } + ], + "description": "An opinionated code formatter for PHP.", + "homepage": "https://laravel.com", + "keywords": [ + "format", + "formatter", + "lint", + "linter", + "php" + ], + "support": { + "issues": "https://github.com/laravel/pint/issues", + "source": "https://github.com/laravel/pint" + }, + "time": "2024-06-18T16:50:05+00:00" + }, + { + "name": "laravel/prompts", + "version": "v0.1.24", + "source": { + "type": "git", + "url": "https://github.com/laravel/prompts.git", + "reference": "409b0b4305273472f3754826e68f4edbd0150149" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/prompts/zipball/409b0b4305273472f3754826e68f4edbd0150149", + "reference": "409b0b4305273472f3754826e68f4edbd0150149", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "illuminate/collections": "^10.0|^11.0", + "php": "^8.1", + "symfony/console": "^6.2|^7.0" + }, + "conflict": { + "illuminate/console": ">=10.17.0 <10.25.0", + "laravel/framework": ">=10.17.0 <10.25.0" + }, + "require-dev": { + "mockery/mockery": "^1.5", + "pestphp/pest": "^2.3", + "phpstan/phpstan": "^1.11", + "phpstan/phpstan-mockery": "^1.1" + }, + "suggest": { + "ext-pcntl": "Required for the spinner to be animated." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "0.1.x-dev" + } + }, + "autoload": { + "files": [ + "src/helpers.php" + ], + "psr-4": { + "Laravel\\Prompts\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Add beautiful and user-friendly forms to your command-line applications.", + "support": { + "issues": "https://github.com/laravel/prompts/issues", + "source": "https://github.com/laravel/prompts/tree/v0.1.24" + }, + "time": "2024-06-17T13:58:22+00:00" }, { "name": "laravel/serializable-closure", - "version": "v1.3.0", + "version": "v1.3.3", "source": { "type": "git", "url": "https://github.com/laravel/serializable-closure.git", - "reference": "f23fe9d4e95255dacee1bf3525e0810d1a1b0f37" + "reference": "3dbf8a8e914634c48d389c1234552666b3d43754" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/f23fe9d4e95255dacee1bf3525e0810d1a1b0f37", - "reference": "f23fe9d4e95255dacee1bf3525e0810d1a1b0f37", + "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/3dbf8a8e914634c48d389c1234552666b3d43754", + "reference": "3dbf8a8e914634c48d389c1234552666b3d43754", "shasum": "" }, "require": { @@ -1147,20 +1975,86 @@ "issues": "https://github.com/laravel/serializable-closure/issues", "source": "https://github.com/laravel/serializable-closure" }, - "time": "2023-01-30T18:31:20+00:00" + "time": "2023-11-08T14:08:06+00:00" + }, + { + "name": "laravel/tinker", + "version": "v2.9.0", + "source": { + "type": "git", + "url": "https://github.com/laravel/tinker.git", + "reference": "502e0fe3f0415d06d5db1f83a472f0f3b754bafe" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/tinker/zipball/502e0fe3f0415d06d5db1f83a472f0f3b754bafe", + "reference": "502e0fe3f0415d06d5db1f83a472f0f3b754bafe", + "shasum": "" + }, + "require": { + "illuminate/console": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0", + "illuminate/contracts": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0", + "illuminate/support": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0", + "php": "^7.2.5|^8.0", + "psy/psysh": "^0.11.1|^0.12.0", + "symfony/var-dumper": "^4.3.4|^5.0|^6.0|^7.0" + }, + "require-dev": { + "mockery/mockery": "~1.3.3|^1.4.2", + "phpstan/phpstan": "^1.10", + "phpunit/phpunit": "^8.5.8|^9.3.3" + }, + "suggest": { + "illuminate/database": "The Illuminate Database package (^6.0|^7.0|^8.0|^9.0|^10.0|^11.0)." + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Laravel\\Tinker\\TinkerServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Laravel\\Tinker\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "Powerful REPL for the Laravel framework.", + "keywords": [ + "REPL", + "Tinker", + "laravel", + "psysh" + ], + "support": { + "issues": "https://github.com/laravel/tinker/issues", + "source": "https://github.com/laravel/tinker/tree/v2.9.0" + }, + "time": "2024-01-04T16:10:04+00:00" }, { "name": "league/commonmark", - "version": "2.3.9", + "version": "2.4.2", "source": { "type": "git", "url": "https://github.com/thephpleague/commonmark.git", - "reference": "c1e114f74e518daca2729ea8c4bf1167038fa4b5" + "reference": "91c24291965bd6d7c46c46a12ba7492f83b1cadf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/c1e114f74e518daca2729ea8c4bf1167038fa4b5", - "reference": "c1e114f74e518daca2729ea8c4bf1167038fa4b5", + "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/91c24291965bd6d7c46c46a12ba7492f83b1cadf", + "reference": "91c24291965bd6d7c46c46a12ba7492f83b1cadf", "shasum": "" }, "require": { @@ -1173,7 +2067,7 @@ }, "require-dev": { "cebe/markdown": "^1.0", - "commonmark/cmark": "0.30.0", + "commonmark/cmark": "0.30.3", "commonmark/commonmark.js": "0.30.0", "composer/package-versions-deprecated": "^1.8", "embed/embed": "^4.4", @@ -1183,10 +2077,10 @@ "michelf/php-markdown": "^1.4 || ^2.0", "nyholm/psr7": "^1.5", "phpstan/phpstan": "^1.8.2", - "phpunit/phpunit": "^9.5.21", + "phpunit/phpunit": "^9.5.21 || ^10.5.9 || ^11.0.0", "scrutinizer/ocular": "^1.8.1", - "symfony/finder": "^5.3 | ^6.0", - "symfony/yaml": "^2.3 | ^3.0 | ^4.0 | ^5.0 | ^6.0", + "symfony/finder": "^5.3 | ^6.0 || ^7.0", + "symfony/yaml": "^2.3 | ^3.0 | ^4.0 | ^5.0 | ^6.0 || ^7.0", "unleashedtech/php-coding-standard": "^3.1.1", "vimeo/psalm": "^4.24.0 || ^5.0.0" }, @@ -1196,7 +2090,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "2.4-dev" + "dev-main": "2.5-dev" } }, "autoload": { @@ -1253,7 +2147,7 @@ "type": "tidelift" } ], - "time": "2023-02-15T14:07:24+00:00" + "time": "2024-02-02T11:59:32+00:00" }, { "name": "league/config", @@ -1339,23 +2233,26 @@ }, { "name": "league/flysystem", - "version": "3.12.2", + "version": "3.28.0", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem.git", - "reference": "f6377c709d2275ed6feaf63e44be7a7162b0e77f" + "reference": "e611adab2b1ae2e3072fa72d62c62f52c2bf1f0c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/f6377c709d2275ed6feaf63e44be7a7162b0e77f", - "reference": "f6377c709d2275ed6feaf63e44be7a7162b0e77f", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/e611adab2b1ae2e3072fa72d62c62f52c2bf1f0c", + "reference": "e611adab2b1ae2e3072fa72d62c62f52c2bf1f0c", "shasum": "" }, "require": { + "league/flysystem-local": "^3.0.0", "league/mime-type-detection": "^1.0.0", "php": "^8.0.2" }, "conflict": { + "async-aws/core": "<1.19.0", + "async-aws/s3": "<1.14.0", "aws/aws-sdk-php": "3.209.31 || 3.210.0", "guzzlehttp/guzzle": "<7.0", "guzzlehttp/ringphp": "<1.1.1", @@ -1363,20 +2260,23 @@ "symfony/http-client": "<5.2" }, "require-dev": { - "async-aws/s3": "^1.5", - "async-aws/simple-s3": "^1.1", - "aws/aws-sdk-php": "^3.220.0", + "async-aws/s3": "^1.5 || ^2.0", + "async-aws/simple-s3": "^1.1 || ^2.0", + "aws/aws-sdk-php": "^3.295.10", "composer/semver": "^3.0", "ext-fileinfo": "*", "ext-ftp": "*", + "ext-mongodb": "^1.3", "ext-zip": "*", "friendsofphp/php-cs-fixer": "^3.5", "google/cloud-storage": "^1.23", + "guzzlehttp/psr7": "^2.6", "microsoft/azure-storage-blob": "^1.1", - "phpseclib/phpseclib": "^3.0.14", - "phpstan/phpstan": "^0.12.26", - "phpunit/phpunit": "^9.5.11", - "sabre/dav": "^4.3.1" + "mongodb/mongodb": "^1.2", + "phpseclib/phpseclib": "^3.0.36", + "phpstan/phpstan": "^1.10", + "phpunit/phpunit": "^9.5.11|^10.0", + "sabre/dav": "^4.6.0" }, "type": "library", "autoload": { @@ -1410,46 +2310,81 @@ ], "support": { "issues": "https://github.com/thephpleague/flysystem/issues", - "source": "https://github.com/thephpleague/flysystem/tree/3.12.2" + "source": "https://github.com/thephpleague/flysystem/tree/3.28.0" }, - "funding": [ - { - "url": "https://ecologi.com/frankdejonge", - "type": "custom" - }, - { - "url": "https://github.com/frankdejonge", - "type": "github" - }, + "time": "2024-05-22T10:09:12+00:00" + }, + { + "name": "league/flysystem-local", + "version": "3.28.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/flysystem-local.git", + "reference": "13f22ea8be526ea58c2ddff9e158ef7c296e4f40" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/flysystem-local/zipball/13f22ea8be526ea58c2ddff9e158ef7c296e4f40", + "reference": "13f22ea8be526ea58c2ddff9e158ef7c296e4f40", + "shasum": "" + }, + "require": { + "ext-fileinfo": "*", + "league/flysystem": "^3.0.0", + "league/mime-type-detection": "^1.0.0", + "php": "^8.0.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "League\\Flysystem\\Local\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ { - "url": "https://tidelift.com/funding/github/packagist/league/flysystem", - "type": "tidelift" + "name": "Frank de Jonge", + "email": "info@frankdejonge.nl" } ], - "time": "2023-01-19T12:02:19+00:00" + "description": "Local filesystem adapter for Flysystem.", + "keywords": [ + "Flysystem", + "file", + "files", + "filesystem", + "local" + ], + "support": { + "source": "https://github.com/thephpleague/flysystem-local/tree/3.28.0" + }, + "time": "2024-05-06T20:05:52+00:00" }, { "name": "league/mime-type-detection", - "version": "1.11.0", + "version": "1.15.0", "source": { "type": "git", "url": "https://github.com/thephpleague/mime-type-detection.git", - "reference": "ff6248ea87a9f116e78edd6002e39e5128a0d4dd" + "reference": "ce0f4d1e8a6f4eb0ddff33f57c69c50fd09f4301" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/ff6248ea87a9f116e78edd6002e39e5128a0d4dd", - "reference": "ff6248ea87a9f116e78edd6002e39e5128a0d4dd", + "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/ce0f4d1e8a6f4eb0ddff33f57c69c50fd09f4301", + "reference": "ce0f4d1e8a6f4eb0ddff33f57c69c50fd09f4301", "shasum": "" }, "require": { "ext-fileinfo": "*", - "php": "^7.2 || ^8.0" + "php": "^7.4 || ^8.0" }, "require-dev": { "friendsofphp/php-cs-fixer": "^3.2", "phpstan/phpstan": "^0.12.68", - "phpunit/phpunit": "^8.5.8 || ^9.3" + "phpunit/phpunit": "^8.5.8 || ^9.3 || ^10.0" }, "type": "library", "autoload": { @@ -1470,7 +2405,7 @@ "description": "Mime-type detection for Flysystem", "support": { "issues": "https://github.com/thephpleague/mime-type-detection/issues", - "source": "https://github.com/thephpleague/mime-type-detection/tree/1.11.0" + "source": "https://github.com/thephpleague/mime-type-detection/tree/1.15.0" }, "funding": [ { @@ -1482,42 +2417,42 @@ "type": "tidelift" } ], - "time": "2022-04-17T13:12:02+00:00" + "time": "2024-01-28T23:22:08+00:00" }, { "name": "mockery/mockery", - "version": "1.5.1", + "version": "1.6.12", "source": { "type": "git", "url": "https://github.com/mockery/mockery.git", - "reference": "e92dcc83d5a51851baf5f5591d32cb2b16e3684e" + "reference": "1f4efdd7d3beafe9807b08156dfcb176d18f1699" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mockery/mockery/zipball/e92dcc83d5a51851baf5f5591d32cb2b16e3684e", - "reference": "e92dcc83d5a51851baf5f5591d32cb2b16e3684e", + "url": "https://api.github.com/repos/mockery/mockery/zipball/1f4efdd7d3beafe9807b08156dfcb176d18f1699", + "reference": "1f4efdd7d3beafe9807b08156dfcb176d18f1699", "shasum": "" }, "require": { "hamcrest/hamcrest-php": "^2.0.1", "lib-pcre": ">=7.0", - "php": "^7.3 || ^8.0" + "php": ">=7.3" }, "conflict": { "phpunit/phpunit": "<8.0" }, "require-dev": { - "phpunit/phpunit": "^8.5 || ^9.3" + "phpunit/phpunit": "^8.5 || ^9.6.17", + "symplify/easy-coding-standard": "^12.1.14" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4.x-dev" - } - }, "autoload": { - "psr-0": { - "Mockery": "library/" + "files": [ + "library/helpers.php", + "library/Mockery.php" + ], + "psr-4": { + "Mockery\\": "library/Mockery" } }, "notification-url": "https://packagist.org/downloads/", @@ -1528,12 +2463,20 @@ { "name": "Pádraic Brady", "email": "padraic.brady@gmail.com", - "homepage": "http://blog.astrumfutura.com" + "homepage": "https://github.com/padraic", + "role": "Author" }, { "name": "Dave Marshall", "email": "dave.marshall@atstsolutions.co.uk", - "homepage": "http://davedevelopment.co.uk" + "homepage": "https://davedevelopment.co.uk", + "role": "Developer" + }, + { + "name": "Nathanael Esayeas", + "email": "nathanael.esayeas@protonmail.com", + "homepage": "https://github.com/ghostwriter", + "role": "Lead Developer" } ], "description": "Mockery is a simple yet flexible PHP mock object framework", @@ -1551,23 +2494,26 @@ "testing" ], "support": { + "docs": "https://docs.mockery.io/", "issues": "https://github.com/mockery/mockery/issues", - "source": "https://github.com/mockery/mockery/tree/1.5.1" + "rss": "https://github.com/mockery/mockery/releases.atom", + "security": "https://github.com/mockery/mockery/security/advisories", + "source": "https://github.com/mockery/mockery" }, - "time": "2022-09-07T15:32:08+00:00" + "time": "2024-05-16T03:13:13+00:00" }, { "name": "monolog/monolog", - "version": "3.3.1", + "version": "3.6.0", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "9b5daeaffce5b926cac47923798bba91059e60e2" + "reference": "4b18b21a5527a3d5ffdac2fd35d3ab25a9597654" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/9b5daeaffce5b926cac47923798bba91059e60e2", - "reference": "9b5daeaffce5b926cac47923798bba91059e60e2", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/4b18b21a5527a3d5ffdac2fd35d3ab25a9597654", + "reference": "4b18b21a5527a3d5ffdac2fd35d3ab25a9597654", "shasum": "" }, "require": { @@ -1582,7 +2528,7 @@ "doctrine/couchdb": "~1.0@dev", "elasticsearch/elasticsearch": "^7 || ^8", "ext-json": "*", - "graylog2/gelf-php": "^1.4.2 || ^2@dev", + "graylog2/gelf-php": "^1.4.2 || ^2.0", "guzzlehttp/guzzle": "^7.4.5", "guzzlehttp/psr7": "^2.2", "mongodb/mongodb": "^1.8", @@ -1590,7 +2536,7 @@ "phpstan/phpstan": "^1.9", "phpstan/phpstan-deprecation-rules": "^1.0", "phpstan/phpstan-strict-rules": "^1.4", - "phpunit/phpunit": "^9.5.26", + "phpunit/phpunit": "^10.5.17", "predis/predis": "^1.1 || ^2", "ruflin/elastica": "^7", "symfony/mailer": "^5.4 || ^6", @@ -1643,7 +2589,7 @@ ], "support": { "issues": "https://github.com/Seldaek/monolog/issues", - "source": "https://github.com/Seldaek/monolog/tree/3.3.1" + "source": "https://github.com/Seldaek/monolog/tree/3.6.0" }, "funding": [ { @@ -1655,20 +2601,20 @@ "type": "tidelift" } ], - "time": "2023-02-06T13:46:10+00:00" + "time": "2024-04-12T21:02:21+00:00" }, { "name": "myclabs/deep-copy", - "version": "1.11.0", + "version": "1.12.0", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614" + "reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/14daed4296fae74d9e3201d2c4925d1acb7aa614", - "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c", + "reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c", "shasum": "" }, "require": { @@ -1676,11 +2622,12 @@ }, "conflict": { "doctrine/collections": "<1.6.8", - "doctrine/common": "<2.13.3 || >=3,<3.2.2" + "doctrine/common": "<2.13.3 || >=3 <3.2.2" }, "require-dev": { "doctrine/collections": "^1.6.8", "doctrine/common": "^2.13.3 || ^3.2.2", + "phpspec/prophecy": "^1.10", "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" }, "type": "library", @@ -1706,7 +2653,7 @@ ], "support": { "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.11.0" + "source": "https://github.com/myclabs/DeepCopy/tree/1.12.0" }, "funding": [ { @@ -1714,32 +2661,37 @@ "type": "tidelift" } ], - "time": "2022-03-03T13:19:32+00:00" + "time": "2024-06-12T14:39:25+00:00" }, { "name": "nesbot/carbon", - "version": "2.66.0", + "version": "2.72.5", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "496712849902241f04902033b0441b269effe001" + "reference": "afd46589c216118ecd48ff2b95d77596af1e57ed" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/496712849902241f04902033b0441b269effe001", - "reference": "496712849902241f04902033b0441b269effe001", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/afd46589c216118ecd48ff2b95d77596af1e57ed", + "reference": "afd46589c216118ecd48ff2b95d77596af1e57ed", "shasum": "" }, "require": { + "carbonphp/carbon-doctrine-types": "*", "ext-json": "*", "php": "^7.1.8 || ^8.0", + "psr/clock": "^1.0", "symfony/polyfill-mbstring": "^1.0", "symfony/polyfill-php80": "^1.16", "symfony/translation": "^3.4 || ^4.0 || ^5.0 || ^6.0" }, + "provide": { + "psr/clock-implementation": "1.0" + }, "require-dev": { - "doctrine/dbal": "^2.0 || ^3.1.4", - "doctrine/orm": "^2.7", + "doctrine/dbal": "^2.0 || ^3.1.4 || ^4.0", + "doctrine/orm": "^2.7 || ^3.0", "friendsofphp/php-cs-fixer": "^3.0", "kylekatarnls/multi-tester": "^2.0", "ondrejmirtes/better-reflection": "*", @@ -1756,8 +2708,8 @@ "type": "library", "extra": { "branch-alias": { - "dev-3.x": "3.x-dev", - "dev-master": "2.x-dev" + "dev-master": "3.x-dev", + "dev-2.x": "2.x-dev" }, "laravel": { "providers": [ @@ -1816,35 +2768,35 @@ "type": "tidelift" } ], - "time": "2023-01-29T18:53:47+00:00" + "time": "2024-06-03T19:18:41+00:00" }, { "name": "nette/schema", - "version": "v1.2.3", + "version": "v1.3.0", "source": { "type": "git", "url": "https://github.com/nette/schema.git", - "reference": "abbdbb70e0245d5f3bf77874cea1dfb0c930d06f" + "reference": "a6d3a6d1f545f01ef38e60f375d1cf1f4de98188" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/schema/zipball/abbdbb70e0245d5f3bf77874cea1dfb0c930d06f", - "reference": "abbdbb70e0245d5f3bf77874cea1dfb0c930d06f", + "url": "https://api.github.com/repos/nette/schema/zipball/a6d3a6d1f545f01ef38e60f375d1cf1f4de98188", + "reference": "a6d3a6d1f545f01ef38e60f375d1cf1f4de98188", "shasum": "" }, "require": { - "nette/utils": "^2.5.7 || ^3.1.5 || ^4.0", - "php": ">=7.1 <8.3" + "nette/utils": "^4.0", + "php": "8.1 - 8.3" }, "require-dev": { - "nette/tester": "^2.3 || ^2.4", + "nette/tester": "^2.4", "phpstan/phpstan-nette": "^1.0", - "tracy/tracy": "^2.7" + "tracy/tracy": "^2.8" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2-dev" + "dev-master": "1.3-dev" } }, "autoload": { @@ -1876,26 +2828,26 @@ ], "support": { "issues": "https://github.com/nette/schema/issues", - "source": "https://github.com/nette/schema/tree/v1.2.3" + "source": "https://github.com/nette/schema/tree/v1.3.0" }, - "time": "2022-10-13T01:24:26+00:00" + "time": "2023-12-11T11:54:22+00:00" }, { "name": "nette/utils", - "version": "v4.0.0", + "version": "v4.0.4", "source": { "type": "git", "url": "https://github.com/nette/utils.git", - "reference": "cacdbf5a91a657ede665c541eda28941d4b09c1e" + "reference": "d3ad0aa3b9f934602cb3e3902ebccf10be34d218" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/utils/zipball/cacdbf5a91a657ede665c541eda28941d4b09c1e", - "reference": "cacdbf5a91a657ede665c541eda28941d4b09c1e", + "url": "https://api.github.com/repos/nette/utils/zipball/d3ad0aa3b9f934602cb3e3902ebccf10be34d218", + "reference": "d3ad0aa3b9f934602cb3e3902ebccf10be34d218", "shasum": "" }, "require": { - "php": ">=8.0 <8.3" + "php": ">=8.0 <8.4" }, "conflict": { "nette/finder": "<3", @@ -1903,7 +2855,7 @@ }, "require-dev": { "jetbrains/phpstorm-attributes": "dev-master", - "nette/tester": "^2.4", + "nette/tester": "^2.5", "phpstan/phpstan": "^1.0", "tracy/tracy": "^2.9" }, @@ -1913,8 +2865,7 @@ "ext-intl": "to use Strings::webalize(), toAscii(), normalize() and compare()", "ext-json": "to use Nette\\Utils\\Json", "ext-mbstring": "to use Strings::lower() etc...", - "ext-tokenizer": "to use Nette\\Utils\\Reflection::getUseStatements()", - "ext-xml": "to use Strings::length() etc. when mbstring is not available" + "ext-tokenizer": "to use Nette\\Utils\\Reflection::getUseStatements()" }, "type": "library", "extra": { @@ -1963,31 +2914,33 @@ ], "support": { "issues": "https://github.com/nette/utils/issues", - "source": "https://github.com/nette/utils/tree/v4.0.0" + "source": "https://github.com/nette/utils/tree/v4.0.4" }, - "time": "2023-02-02T10:41:53+00:00" + "time": "2024-01-17T16:50:36+00:00" }, { "name": "nikic/php-parser", - "version": "v4.15.3", + "version": "v5.0.2", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "570e980a201d8ed0236b0a62ddf2c9cbb2034039" + "reference": "139676794dc1e9231bf7bcd123cfc0c99182cb13" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/570e980a201d8ed0236b0a62ddf2c9cbb2034039", - "reference": "570e980a201d8ed0236b0a62ddf2c9cbb2034039", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/139676794dc1e9231bf7bcd123cfc0c99182cb13", + "reference": "139676794dc1e9231bf7bcd123cfc0c99182cb13", "shasum": "" }, "require": { + "ext-ctype": "*", + "ext-json": "*", "ext-tokenizer": "*", - "php": ">=7.0" + "php": ">=7.4" }, "require-dev": { "ircmaxell/php-yacc": "^0.0.7", - "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" }, "bin": [ "bin/php-parse" @@ -1995,7 +2948,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.9-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -2019,9 +2972,105 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.3" + "source": "https://github.com/nikic/PHP-Parser/tree/v5.0.2" + }, + "time": "2024-03-05T20:51:40+00:00" + }, + { + "name": "nunomaduro/collision", + "version": "v7.10.0", + "source": { + "type": "git", + "url": "https://github.com/nunomaduro/collision.git", + "reference": "49ec67fa7b002712da8526678abd651c09f375b2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nunomaduro/collision/zipball/49ec67fa7b002712da8526678abd651c09f375b2", + "reference": "49ec67fa7b002712da8526678abd651c09f375b2", + "shasum": "" + }, + "require": { + "filp/whoops": "^2.15.3", + "nunomaduro/termwind": "^1.15.1", + "php": "^8.1.0", + "symfony/console": "^6.3.4" + }, + "conflict": { + "laravel/framework": ">=11.0.0" + }, + "require-dev": { + "brianium/paratest": "^7.3.0", + "laravel/framework": "^10.28.0", + "laravel/pint": "^1.13.3", + "laravel/sail": "^1.25.0", + "laravel/sanctum": "^3.3.1", + "laravel/tinker": "^2.8.2", + "nunomaduro/larastan": "^2.6.4", + "orchestra/testbench-core": "^8.13.0", + "pestphp/pest": "^2.23.2", + "phpunit/phpunit": "^10.4.1", + "sebastian/environment": "^6.0.1", + "spatie/laravel-ignition": "^2.3.1" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider" + ] + } + }, + "autoload": { + "files": [ + "./src/Adapters/Phpunit/Autoload.php" + ], + "psr-4": { + "NunoMaduro\\Collision\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nuno Maduro", + "email": "enunomaduro@gmail.com" + } + ], + "description": "Cli error handling for console/command-line PHP applications.", + "keywords": [ + "artisan", + "cli", + "command-line", + "console", + "error", + "handling", + "laravel", + "laravel-zero", + "php", + "symfony" + ], + "support": { + "issues": "https://github.com/nunomaduro/collision/issues", + "source": "https://github.com/nunomaduro/collision" }, - "time": "2023-01-16T22:05:37+00:00" + "funding": [ + { + "url": "https://www.paypal.com/paypalme/enunomaduro", + "type": "custom" + }, + { + "url": "https://github.com/nunomaduro", + "type": "github" + }, + { + "url": "https://www.patreon.com/nunomaduro", + "type": "patreon" + } + ], + "time": "2023-10-11T15:45:01+00:00" }, { "name": "nunomaduro/termwind", @@ -2038,36 +3087,201 @@ "shasum": "" }, "require": { - "ext-mbstring": "*", - "php": "^8.0", - "symfony/console": "^5.3.0|^6.0.0" + "ext-mbstring": "*", + "php": "^8.0", + "symfony/console": "^5.3.0|^6.0.0" + }, + "require-dev": { + "ergebnis/phpstan-rules": "^1.0.", + "illuminate/console": "^8.0|^9.0", + "illuminate/support": "^8.0|^9.0", + "laravel/pint": "^1.0.0", + "pestphp/pest": "^1.21.0", + "pestphp/pest-plugin-mock": "^1.0", + "phpstan/phpstan": "^1.4.6", + "phpstan/phpstan-strict-rules": "^1.1.0", + "symfony/var-dumper": "^5.2.7|^6.0.0", + "thecodingmachine/phpstan-strict-rules": "^1.0.0" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Termwind\\Laravel\\TermwindServiceProvider" + ] + } + }, + "autoload": { + "files": [ + "src/Functions.php" + ], + "psr-4": { + "Termwind\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nuno Maduro", + "email": "enunomaduro@gmail.com" + } + ], + "description": "Its like Tailwind CSS, but for the console.", + "keywords": [ + "cli", + "console", + "css", + "package", + "php", + "style" + ], + "support": { + "issues": "https://github.com/nunomaduro/termwind/issues", + "source": "https://github.com/nunomaduro/termwind/tree/v1.15.1" + }, + "funding": [ + { + "url": "https://www.paypal.com/paypalme/enunomaduro", + "type": "custom" + }, + { + "url": "https://github.com/nunomaduro", + "type": "github" + }, + { + "url": "https://github.com/xiCO2k", + "type": "github" + } + ], + "time": "2023-02-08T01:06:31+00:00" + }, + { + "name": "orchestra/canvas", + "version": "v8.11.9", + "source": { + "type": "git", + "url": "https://github.com/orchestral/canvas.git", + "reference": "9bed1ce6084af2ce166e9ea1cb160ff22dc94a6d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/orchestral/canvas/zipball/9bed1ce6084af2ce166e9ea1cb160ff22dc94a6d", + "reference": "9bed1ce6084af2ce166e9ea1cb160ff22dc94a6d", + "shasum": "" + }, + "require": { + "composer-runtime-api": "^2.2", + "composer/semver": "^3.0", + "illuminate/console": "^10.48.4", + "illuminate/database": "^10.48.4", + "illuminate/filesystem": "^10.48.4", + "illuminate/support": "^10.48.4", + "orchestra/canvas-core": "^8.10.2", + "orchestra/testbench-core": "^8.19", + "php": "^8.1", + "symfony/polyfill-php83": "^1.28", + "symfony/yaml": "^6.2" + }, + "require-dev": { + "laravel/framework": "^10.48.4", + "laravel/pint": "^1.6", + "mockery/mockery": "^1.5.1", + "phpstan/phpstan": "^1.11", + "phpunit/phpunit": "^10.5", + "spatie/laravel-ray": "^1.33" + }, + "bin": [ + "canvas" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "9.0-dev" + }, + "laravel": { + "providers": [ + "Orchestra\\Canvas\\LaravelServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Orchestra\\Canvas\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + }, + { + "name": "Mior Muhammad Zaki", + "email": "crynobone@gmail.com" + } + ], + "description": "Code Generators for Laravel Applications and Packages", + "support": { + "issues": "https://github.com/orchestral/canvas/issues", + "source": "https://github.com/orchestral/canvas/tree/v8.11.9" + }, + "time": "2024-06-18T08:26:09+00:00" + }, + { + "name": "orchestra/canvas-core", + "version": "v8.10.2", + "source": { + "type": "git", + "url": "https://github.com/orchestral/canvas-core.git", + "reference": "3af8fb6b1ebd85903ba5d0e6df1c81aedacfedfc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/orchestral/canvas-core/zipball/3af8fb6b1ebd85903ba5d0e6df1c81aedacfedfc", + "reference": "3af8fb6b1ebd85903ba5d0e6df1c81aedacfedfc", + "shasum": "" + }, + "require": { + "composer-runtime-api": "^2.2", + "composer/semver": "^3.0", + "illuminate/console": "^10.38.1", + "illuminate/filesystem": "^10.38.1", + "php": "^8.1", + "symfony/polyfill-php83": "^1.28" + }, + "conflict": { + "orchestra/canvas": "<8.11.0", + "orchestra/testbench-core": "<8.2.0" }, "require-dev": { - "ergebnis/phpstan-rules": "^1.0.", - "illuminate/console": "^8.0|^9.0", - "illuminate/support": "^8.0|^9.0", - "laravel/pint": "^1.0.0", - "pestphp/pest": "^1.21.0", - "pestphp/pest-plugin-mock": "^1.0", - "phpstan/phpstan": "^1.4.6", - "phpstan/phpstan-strict-rules": "^1.1.0", - "symfony/var-dumper": "^5.2.7|^6.0.0", - "thecodingmachine/phpstan-strict-rules": "^1.0.0" + "laravel/framework": "^10.38.1", + "laravel/pint": "^1.6", + "mockery/mockery": "^1.5.1", + "orchestra/testbench-core": "^8.19", + "phpstan/phpstan": "^1.10.6", + "phpunit/phpunit": "^10.1", + "symfony/yaml": "^6.2" }, "type": "library", "extra": { + "branch-alias": { + "dev-master": "9.0-dev" + }, "laravel": { "providers": [ - "Termwind\\Laravel\\TermwindServiceProvider" + "Orchestra\\Canvas\\Core\\LaravelServiceProvider" ] } }, "autoload": { - "files": [ - "src/Functions.php" - ], "psr-4": { - "Termwind\\": "src/" + "Orchestra\\Canvas\\Core\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -2076,62 +3290,44 @@ ], "authors": [ { - "name": "Nuno Maduro", - "email": "enunomaduro@gmail.com" - } - ], - "description": "Its like Tailwind CSS, but for the console.", - "keywords": [ - "cli", - "console", - "css", - "package", - "php", - "style" - ], - "support": { - "issues": "https://github.com/nunomaduro/termwind/issues", - "source": "https://github.com/nunomaduro/termwind/tree/v1.15.1" - }, - "funding": [ - { - "url": "https://www.paypal.com/paypalme/enunomaduro", - "type": "custom" - }, - { - "url": "https://github.com/nunomaduro", - "type": "github" + "name": "Taylor Otwell", + "email": "taylor@laravel.com" }, { - "url": "https://github.com/xiCO2k", - "type": "github" + "name": "Mior Muhammad Zaki", + "email": "crynobone@gmail.com" } ], - "time": "2023-02-08T01:06:31+00:00" + "description": "Code Generators Builder for Laravel Applications and Packages", + "support": { + "issues": "https://github.com/orchestral/canvas/issues", + "source": "https://github.com/orchestral/canvas-core/tree/v8.10.2" + }, + "time": "2023-12-28T01:27:59+00:00" }, { "name": "orchestra/testbench", - "version": "v8.0.0", + "version": "v8.23.2", "source": { "type": "git", "url": "https://github.com/orchestral/testbench.git", - "reference": "800f9b91d6ce9d6fd0c5775463e0aa7d536b52d2" + "reference": "c9f89b66aaa245a2e36f046aa431587ba46a3f2e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/orchestral/testbench/zipball/800f9b91d6ce9d6fd0c5775463e0aa7d536b52d2", - "reference": "800f9b91d6ce9d6fd0c5775463e0aa7d536b52d2", + "url": "https://api.github.com/repos/orchestral/testbench/zipball/c9f89b66aaa245a2e36f046aa431587ba46a3f2e", + "reference": "c9f89b66aaa245a2e36f046aa431587ba46a3f2e", "shasum": "" }, "require": { "composer-runtime-api": "^2.2", "fakerphp/faker": "^1.21", - "laravel/framework": ">=10.0.0 <10.1.0", + "laravel/framework": "^10.48.10", "mockery/mockery": "^1.5.1", - "orchestra/testbench-core": ">=8.0.0 <8.1.0", + "orchestra/testbench-core": "^8.24.3", + "orchestra/workbench": "^1.4.1 || ^8.5", "php": "^8.1", - "phpunit/phpunit": "^9.6 || ^10.0.7", - "spatie/laravel-ray": "^1.32", + "phpunit/phpunit": "^9.6 || ^10.1", "symfony/process": "^6.2", "symfony/yaml": "^6.2", "vlucas/phpdotenv": "^5.4.1" @@ -2153,72 +3349,77 @@ "keywords": [ "BDD", "TDD", + "dev", "laravel", - "orchestra-platform", - "orchestral", + "laravel-packages", "testing" ], "support": { "issues": "https://github.com/orchestral/testbench/issues", - "source": "https://github.com/orchestral/testbench/tree/v8.0.0" + "source": "https://github.com/orchestral/testbench/tree/v8.23.2" }, - "time": "2023-02-14T15:35:53+00:00" + "time": "2024-06-04T12:24:55+00:00" }, { "name": "orchestra/testbench-core", - "version": "v8.0.0", + "version": "v8.24.3", "source": { "type": "git", "url": "https://github.com/orchestral/testbench-core.git", - "reference": "4b9e7932665c52889a6727e4a6235affea8bb925" + "reference": "c4daf2f1929242f4e4cb33b5ebdaaf631df30a46" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/orchestral/testbench-core/zipball/4b9e7932665c52889a6727e4a6235affea8bb925", - "reference": "4b9e7932665c52889a6727e4a6235affea8bb925", + "url": "https://api.github.com/repos/orchestral/testbench-core/zipball/c4daf2f1929242f4e4cb33b5ebdaaf631df30a46", + "reference": "c4daf2f1929242f4e4cb33b5ebdaaf631df30a46", "shasum": "" }, "require": { "composer-runtime-api": "^2.2", - "php": "^8.1" + "php": "^8.1", + "symfony/polyfill-php83": "^1.28" + }, + "conflict": { + "brianium/paratest": "<6.4.0 || >=7.0.0 <7.1.4 || >=8.0.0", + "laravel/framework": "<10.48.2 || >=11.0.0", + "nunomaduro/collision": "<6.4.0 || >=7.0.0 <7.4.0 || >=8.0.0", + "orchestra/testbench-dusk": "<8.21.0 || >=9.0.0", + "orchestra/workbench": "<1.0.0", + "phpunit/phpunit": "<9.6.0 || >=10.6.0" }, "require-dev": { "fakerphp/faker": "^1.21", - "laravel/framework": "^10.0", - "laravel/pint": "^1.4", + "laravel/framework": "^10.48.2", + "laravel/pint": "^1.6", "mockery/mockery": "^1.5.1", - "orchestra/canvas": "^8.0", - "phpstan/phpstan": "^1.9.14", - "phpunit/phpunit": "^9.6 || ^10.0.7", - "spatie/laravel-ray": "^1.32", + "phpstan/phpstan": "^1.11", + "phpunit/phpunit": "^10.1", + "spatie/laravel-ray": "^1.32.4", "symfony/process": "^6.2", "symfony/yaml": "^6.2", "vlucas/phpdotenv": "^5.4.1" }, "suggest": { - "brianium/paratest": "Allow using parallel tresting (^6.4 || ^7.0).", + "brianium/paratest": "Allow using parallel testing (^6.4 || ^7.1.4).", + "ext-pcntl": "Required to use all features of the console signal trapping.", "fakerphp/faker": "Allow using Faker for testing (^1.21).", - "laravel/framework": "Required for testing (^10.0).", + "laravel/framework": "Required for testing (^10.48.2).", "mockery/mockery": "Allow using Mockery for testing (^1.5.1).", - "nunomaduro/collision": "Allow using Laravel style tests output and parallel testing (^6.4 || ^7.0).", + "nunomaduro/collision": "Allow using Laravel style tests output and parallel testing (^6.4 || ^7.4).", "orchestra/testbench-browser-kit": "Allow using legacy Laravel BrowserKit for testing (^8.0).", "orchestra/testbench-dusk": "Allow using Laravel Dusk for testing (^8.0).", - "phpunit/phpunit": "Allow using PHPUnit for testing (^9.6 || ^10.0.7).", - "symfony/yaml": "Required for CLI Commander (^6.2).", - "vlucas/phpdotenv": "Required for CLI Commander (^5.4.1)." + "phpunit/phpunit": "Allow using PHPUnit for testing (^9.6 || ^10.1).", + "symfony/process": "Required to use Orchestra\\Testbench\\remote function (^6.2).", + "symfony/yaml": "Required for Testbench CLI (^6.2).", + "vlucas/phpdotenv": "Required for Testbench CLI (^5.4.1)." }, "bin": [ "testbench" ], "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.0-dev" - } - }, "autoload": { "files": [ - "src/helpers.php" + "src/functions.php" ], "psr-4": { "Orchestra\\Testbench\\": "src/" @@ -2240,33 +3441,105 @@ "keywords": [ "BDD", "TDD", + "dev", "laravel", - "orchestra-platform", - "orchestral", + "laravel-packages", "testing" ], "support": { "issues": "https://github.com/orchestral/testbench/issues", "source": "https://github.com/orchestral/testbench-core" }, - "time": "2023-02-14T04:54:05+00:00" + "time": "2024-06-04T05:00:04+00:00" + }, + { + "name": "orchestra/workbench", + "version": "v8.5.0", + "source": { + "type": "git", + "url": "https://github.com/orchestral/workbench.git", + "reference": "dce002c20de63b6bde74e0cae2ca558d031a8a17" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/orchestral/workbench/zipball/dce002c20de63b6bde74e0cae2ca558d031a8a17", + "reference": "dce002c20de63b6bde74e0cae2ca558d031a8a17", + "shasum": "" + }, + "require": { + "composer-runtime-api": "^2.2", + "fakerphp/faker": "^1.21", + "laravel/framework": "^10.38.1", + "laravel/tinker": "^2.8.2", + "nunomaduro/collision": "^6.4 || ^7.10", + "orchestra/canvas": "^8.11.4", + "orchestra/testbench-core": "^8.24", + "php": "^8.1", + "spatie/laravel-ray": "^1.32.4", + "symfony/polyfill-php83": "^1.28", + "symfony/yaml": "^6.2" + }, + "require-dev": { + "laravel/pint": "^1.4", + "mockery/mockery": "^1.5.1", + "phpstan/phpstan": "^1.11", + "phpunit/phpunit": "^10.1", + "symfony/process": "^6.2" + }, + "suggest": { + "ext-pcntl": "Required to use all features of the console signal trapping." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.5.x-dev" + } + }, + "autoload": { + "psr-4": { + "Orchestra\\Workbench\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mior Muhammad Zaki", + "email": "crynobone@gmail.com" + } + ], + "description": "Workbench Companion for Laravel Packages Development", + "keywords": [ + "dev", + "laravel", + "laravel-packages", + "testing" + ], + "support": { + "issues": "https://github.com/orchestral/workbench/issues", + "source": "https://github.com/orchestral/workbench/tree/v8.5.0" + }, + "time": "2024-05-20T23:51:13+00:00" }, { "name": "phar-io/manifest", - "version": "2.0.3", + "version": "2.0.4", "source": { "type": "git", "url": "https://github.com/phar-io/manifest.git", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53" + "reference": "54750ef60c58e43759730615a392c31c80e23176" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/54750ef60c58e43759730615a392c31c80e23176", + "reference": "54750ef60c58e43759730615a392c31c80e23176", "shasum": "" }, "require": { "ext-dom": "*", + "ext-libxml": "*", "ext-phar": "*", "ext-xmlwriter": "*", "phar-io/version": "^3.0.1", @@ -2307,9 +3580,15 @@ "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", "support": { "issues": "https://github.com/phar-io/manifest/issues", - "source": "https://github.com/phar-io/manifest/tree/2.0.3" + "source": "https://github.com/phar-io/manifest/tree/2.0.4" }, - "time": "2021-07-20T11:28:43+00:00" + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2024-03-03T12:33:53+00:00" }, { "name": "phar-io/version", @@ -2362,26 +3641,114 @@ }, "time": "2022-02-21T01:04:05+00:00" }, + { + "name": "phpmyadmin/sql-parser", + "version": "5.9.0", + "source": { + "type": "git", + "url": "https://github.com/phpmyadmin/sql-parser.git", + "reference": "011fa18a4e55591fac6545a821921dd1d61c6984" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpmyadmin/sql-parser/zipball/011fa18a4e55591fac6545a821921dd1d61c6984", + "reference": "011fa18a4e55591fac6545a821921dd1d61c6984", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0", + "symfony/polyfill-mbstring": "^1.3", + "symfony/polyfill-php80": "^1.16" + }, + "conflict": { + "phpmyadmin/motranslator": "<3.0" + }, + "require-dev": { + "phpbench/phpbench": "^1.1", + "phpmyadmin/coding-standard": "^3.0", + "phpmyadmin/motranslator": "^4.0 || ^5.0", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan": "^1.9.12", + "phpstan/phpstan-phpunit": "^1.3.3", + "phpunit/php-code-coverage": "*", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "psalm/plugin-phpunit": "^0.16.1", + "vimeo/psalm": "^4.11", + "zumba/json-serializer": "~3.0.2" + }, + "suggest": { + "ext-mbstring": "For best performance", + "phpmyadmin/motranslator": "Translate messages to your favorite locale" + }, + "bin": [ + "bin/highlight-query", + "bin/lint-query", + "bin/sql-parser", + "bin/tokenize-query" + ], + "type": "library", + "autoload": { + "psr-4": { + "PhpMyAdmin\\SqlParser\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-2.0-or-later" + ], + "authors": [ + { + "name": "The phpMyAdmin Team", + "email": "developers@phpmyadmin.net", + "homepage": "https://www.phpmyadmin.net/team/" + } + ], + "description": "A validating SQL lexer and parser with a focus on MySQL dialect.", + "homepage": "https://github.com/phpmyadmin/sql-parser", + "keywords": [ + "analysis", + "lexer", + "parser", + "query linter", + "sql", + "sql lexer", + "sql linter", + "sql parser", + "sql syntax highlighter", + "sql tokenizer" + ], + "support": { + "issues": "https://github.com/phpmyadmin/sql-parser/issues", + "source": "https://github.com/phpmyadmin/sql-parser" + }, + "funding": [ + { + "url": "https://www.phpmyadmin.net/donate/", + "type": "other" + } + ], + "time": "2024-01-20T20:34:02+00:00" + }, { "name": "phpoption/phpoption", - "version": "1.9.0", + "version": "1.9.2", "source": { "type": "git", "url": "https://github.com/schmittjoh/php-option.git", - "reference": "dc5ff11e274a90cc1c743f66c9ad700ce50db9ab" + "reference": "80735db690fe4fc5c76dfa7f9b770634285fa820" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/dc5ff11e274a90cc1c743f66c9ad700ce50db9ab", - "reference": "dc5ff11e274a90cc1c743f66c9ad700ce50db9ab", + "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/80735db690fe4fc5c76dfa7f9b770634285fa820", + "reference": "80735db690fe4fc5c76dfa7f9b770634285fa820", "shasum": "" }, "require": { "php": "^7.2.5 || ^8.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.8", - "phpunit/phpunit": "^8.5.28 || ^9.5.21" + "bamarni/composer-bin-plugin": "^1.8.2", + "phpunit/phpunit": "^8.5.34 || ^9.6.13 || ^10.4.2" }, "type": "library", "extra": { @@ -2423,7 +3790,7 @@ ], "support": { "issues": "https://github.com/schmittjoh/php-option/issues", - "source": "https://github.com/schmittjoh/php-option/tree/1.9.0" + "source": "https://github.com/schmittjoh/php-option/tree/1.9.2" }, "funding": [ { @@ -2435,27 +3802,85 @@ "type": "tidelift" } ], - "time": "2022-07-30T15:51:26+00:00" + "time": "2023-11-12T21:59:55+00:00" + }, + { + "name": "phpstan/phpstan", + "version": "1.11.5", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpstan.git", + "reference": "490f0ae1c92b082f154681d7849aee776a7c1443" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/490f0ae1c92b082f154681d7849aee776a7c1443", + "reference": "490f0ae1c92b082f154681d7849aee776a7c1443", + "shasum": "" + }, + "require": { + "php": "^7.2|^8.0" + }, + "conflict": { + "phpstan/phpstan-shim": "*" + }, + "bin": [ + "phpstan", + "phpstan.phar" + ], + "type": "library", + "autoload": { + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHPStan - PHP Static Analysis Tool", + "keywords": [ + "dev", + "static analysis" + ], + "support": { + "docs": "https://phpstan.org/user-guide/getting-started", + "forum": "https://github.com/phpstan/phpstan/discussions", + "issues": "https://github.com/phpstan/phpstan/issues", + "security": "https://github.com/phpstan/phpstan/security/policy", + "source": "https://github.com/phpstan/phpstan-src" + }, + "funding": [ + { + "url": "https://github.com/ondrejmirtes", + "type": "github" + }, + { + "url": "https://github.com/phpstan", + "type": "github" + } + ], + "time": "2024-06-17T15:10:54+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "10.0.0", + "version": "10.1.14", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "bf4fbc9c13af7da12b3ea807574fb460f255daba" + "reference": "e3f51450ebffe8e0efdf7346ae966a656f7d5e5b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/bf4fbc9c13af7da12b3ea807574fb460f255daba", - "reference": "bf4fbc9c13af7da12b3ea807574fb460f255daba", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/e3f51450ebffe8e0efdf7346ae966a656f7d5e5b", + "reference": "e3f51450ebffe8e0efdf7346ae966a656f7d5e5b", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", "ext-xmlwriter": "*", - "nikic/php-parser": "^4.14", + "nikic/php-parser": "^4.18 || ^5.0", "php": ">=8.1", "phpunit/php-file-iterator": "^4.0", "phpunit/php-text-template": "^3.0", @@ -2467,16 +3892,16 @@ "theseer/tokenizer": "^1.2.0" }, "require-dev": { - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^10.1" }, "suggest": { - "ext-pcov": "*", - "ext-xdebug": "*" + "ext-pcov": "PHP extension that provides line coverage", + "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "10.0-dev" + "dev-main": "10.1-dev" } }, "autoload": { @@ -2504,7 +3929,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.0.0" + "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.1.14" }, "funding": [ { @@ -2512,20 +3938,20 @@ "type": "github" } ], - "time": "2023-02-03T07:14:34+00:00" + "time": "2024-03-12T15:33:41+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "4.0.1", + "version": "4.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "fd9329ab3368f59fe1fe808a189c51086bd4b6bd" + "reference": "a95037b6d9e608ba092da1b23931e537cadc3c3c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/fd9329ab3368f59fe1fe808a189c51086bd4b6bd", - "reference": "fd9329ab3368f59fe1fe808a189c51086bd4b6bd", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/a95037b6d9e608ba092da1b23931e537cadc3c3c", + "reference": "a95037b6d9e608ba092da1b23931e537cadc3c3c", "shasum": "" }, "require": { @@ -2564,7 +3990,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/4.0.1" + "security": "https://github.com/sebastianbergmann/php-file-iterator/security/policy", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/4.1.0" }, "funding": [ { @@ -2572,7 +3999,7 @@ "type": "github" } ], - "time": "2023-02-10T16:53:14+00:00" + "time": "2023-08-31T06:24:48+00:00" }, { "name": "phpunit/php-invoker", @@ -2639,16 +4066,16 @@ }, { "name": "phpunit/php-text-template", - "version": "3.0.0", + "version": "3.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "9f3d3709577a527025f55bcf0f7ab8052c8bb37d" + "reference": "0c7b06ff49e3d5072f057eb1fa59258bf287a748" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/9f3d3709577a527025f55bcf0f7ab8052c8bb37d", - "reference": "9f3d3709577a527025f55bcf0f7ab8052c8bb37d", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/0c7b06ff49e3d5072f057eb1fa59258bf287a748", + "reference": "0c7b06ff49e3d5072f057eb1fa59258bf287a748", "shasum": "" }, "require": { @@ -2686,7 +4113,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-text-template/issues", - "source": "https://github.com/sebastianbergmann/php-text-template/tree/3.0.0" + "security": "https://github.com/sebastianbergmann/php-text-template/security/policy", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/3.0.1" }, "funding": [ { @@ -2694,7 +4122,7 @@ "type": "github" } ], - "time": "2023-02-03T06:56:46+00:00" + "time": "2023-08-31T14:07:24+00:00" }, { "name": "phpunit/php-timer", @@ -2757,16 +4185,16 @@ }, { "name": "phpunit/phpunit", - "version": "10.0.7", + "version": "10.5.17", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "a6f61c5629dd95db79af72f1e94d56702187479a" + "reference": "c1f736a473d21957ead7e94fcc029f571895abf5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a6f61c5629dd95db79af72f1e94d56702187479a", - "reference": "a6f61c5629dd95db79af72f1e94d56702187479a", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c1f736a473d21957ead7e94fcc029f571895abf5", + "reference": "c1f736a473d21957ead7e94fcc029f571895abf5", "shasum": "" }, "require": { @@ -2780,7 +4208,7 @@ "phar-io/manifest": "^2.0.3", "phar-io/version": "^3.0.2", "php": ">=8.1", - "phpunit/php-code-coverage": "^10.0", + "phpunit/php-code-coverage": "^10.1.5", "phpunit/php-file-iterator": "^4.0", "phpunit/php-invoker": "^4.0", "phpunit/php-text-template": "^3.0", @@ -2790,15 +4218,15 @@ "sebastian/comparator": "^5.0", "sebastian/diff": "^5.0", "sebastian/environment": "^6.0", - "sebastian/exporter": "^5.0", - "sebastian/global-state": "^6.0", + "sebastian/exporter": "^5.1", + "sebastian/global-state": "^6.0.1", "sebastian/object-enumerator": "^5.0", "sebastian/recursion-context": "^5.0", "sebastian/type": "^4.0", "sebastian/version": "^4.0" }, "suggest": { - "ext-soap": "*" + "ext-soap": "To be able to generate mocks based on WSDL files" }, "bin": [ "phpunit" @@ -2806,7 +4234,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "10.0-dev" + "dev-main": "10.5-dev" } }, "autoload": { @@ -2837,7 +4265,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/10.0.7" + "security": "https://github.com/sebastianbergmann/phpunit/security/policy", + "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.17" }, "funding": [ { @@ -2853,7 +4282,7 @@ "type": "tidelift" } ], - "time": "2023-02-08T15:16:31+00:00" + "time": "2024-04-05T04:39:01+00:00" }, { "name": "pimple/pimple", @@ -2870,21 +4299,65 @@ "shasum": "" }, "require": { - "php": ">=7.2.5", - "psr/container": "^1.1 || ^2.0" - }, - "require-dev": { - "symfony/phpunit-bridge": "^5.4@dev" + "php": ">=7.2.5", + "psr/container": "^1.1 || ^2.0" + }, + "require-dev": { + "symfony/phpunit-bridge": "^5.4@dev" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.4.x-dev" + } + }, + "autoload": { + "psr-0": { + "Pimple": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Pimple, a simple Dependency Injection Container", + "homepage": "https://pimple.symfony.com", + "keywords": [ + "container", + "dependency injection" + ], + "support": { + "source": "https://github.com/silexphp/Pimple/tree/v3.5.0" + }, + "time": "2021-10-28T11:13:42+00:00" + }, + { + "name": "psr/clock", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/clock.git", + "reference": "e41a24703d4560fd0acb709162f73b8adfc3aa0d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/clock/zipball/e41a24703d4560fd0acb709162f73b8adfc3aa0d", + "reference": "e41a24703d4560fd0acb709162f73b8adfc3aa0d", + "shasum": "" + }, + "require": { + "php": "^7.0 || ^8.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.4.x-dev" - } - }, "autoload": { - "psr-0": { - "Pimple": "src/" + "psr-4": { + "Psr\\Clock\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -2893,20 +4366,24 @@ ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" } ], - "description": "Pimple, a simple Dependency Injection Container", - "homepage": "https://pimple.symfony.com", + "description": "Common interface for reading the clock.", + "homepage": "https://github.com/php-fig/clock", "keywords": [ - "container", - "dependency injection" + "clock", + "now", + "psr", + "psr-20", + "time" ], "support": { - "source": "https://github.com/silexphp/Pimple/tree/v3.5.0" + "issues": "https://github.com/php-fig/clock/issues", + "source": "https://github.com/php-fig/clock/tree/1.0.0" }, - "time": "2021-10-28T11:13:42+00:00" + "time": "2022-11-25T14:36:26+00:00" }, { "name": "psr/container", @@ -3013,21 +4490,21 @@ }, { "name": "psr/http-factory", - "version": "1.0.1", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/php-fig/http-factory.git", - "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be" + "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-factory/zipball/12ac7fcd07e5b077433f5f2bee95b3a771bf61be", - "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/2b4765fddfe3b508ac62f829e852b1501d3f6e8a", + "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a", "shasum": "" }, "require": { - "php": ">=7.0.0", - "psr/http-message": "^1.0" + "php": ">=7.1", + "psr/http-message": "^1.0 || ^2.0" }, "type": "library", "extra": { @@ -3047,10 +4524,10 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], - "description": "Common interfaces for PSR-7 HTTP message factories", + "description": "PSR-17: Common interfaces for PSR-7 HTTP message factories", "keywords": [ "factory", "http", @@ -3062,31 +4539,31 @@ "response" ], "support": { - "source": "https://github.com/php-fig/http-factory/tree/master" + "source": "https://github.com/php-fig/http-factory" }, - "time": "2019-04-30T12:38:16+00:00" + "time": "2024-04-15T12:06:14+00:00" }, { "name": "psr/http-message", - "version": "1.0.1", + "version": "2.0", "source": { "type": "git", "url": "https://github.com/php-fig/http-message.git", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": "^7.2 || ^8.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { @@ -3101,7 +4578,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common interface for HTTP messages", @@ -3115,9 +4592,9 @@ "response" ], "support": { - "source": "https://github.com/php-fig/http-message/tree/master" + "source": "https://github.com/php-fig/http-message/tree/2.0" }, - "time": "2016-08-06T14:39:51+00:00" + "time": "2023-04-04T09:54:51+00:00" }, { "name": "psr/log", @@ -3220,6 +4697,85 @@ }, "time": "2021-10-29T13:26:27+00:00" }, + { + "name": "psy/psysh", + "version": "v0.12.4", + "source": { + "type": "git", + "url": "https://github.com/bobthecow/psysh.git", + "reference": "2fd717afa05341b4f8152547f142cd2f130f6818" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/bobthecow/psysh/zipball/2fd717afa05341b4f8152547f142cd2f130f6818", + "reference": "2fd717afa05341b4f8152547f142cd2f130f6818", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-tokenizer": "*", + "nikic/php-parser": "^5.0 || ^4.0", + "php": "^8.0 || ^7.4", + "symfony/console": "^7.0 || ^6.0 || ^5.0 || ^4.0 || ^3.4", + "symfony/var-dumper": "^7.0 || ^6.0 || ^5.0 || ^4.0 || ^3.4" + }, + "conflict": { + "symfony/console": "4.4.37 || 5.3.14 || 5.3.15 || 5.4.3 || 5.4.4 || 6.0.3 || 6.0.4" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.2" + }, + "suggest": { + "ext-pcntl": "Enabling the PCNTL extension makes PsySH a lot happier :)", + "ext-pdo-sqlite": "The doc command requires SQLite to work.", + "ext-posix": "If you have PCNTL, you'll want the POSIX extension as well." + }, + "bin": [ + "bin/psysh" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "0.12.x-dev" + }, + "bamarni-bin": { + "bin-links": false, + "forward-command": false + } + }, + "autoload": { + "files": [ + "src/functions.php" + ], + "psr-4": { + "Psy\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Justin Hileman", + "email": "justin@justinhileman.info", + "homepage": "http://justinhileman.com" + } + ], + "description": "An interactive shell for modern PHP.", + "homepage": "http://psysh.org", + "keywords": [ + "REPL", + "console", + "interactive", + "shell" + ], + "support": { + "issues": "https://github.com/bobthecow/psysh/issues", + "source": "https://github.com/bobthecow/psysh/tree/v0.12.4" + }, + "time": "2024-06-10T01:18:23+00:00" + }, { "name": "ralouphie/getallheaders", "version": "3.0.3", @@ -3351,112 +4907,321 @@ "type": "tidelift" } ], - "time": "2022-12-31T21:50:55+00:00" + "time": "2022-12-31T21:50:55+00:00" + }, + { + "name": "ramsey/uuid", + "version": "4.7.6", + "source": { + "type": "git", + "url": "https://github.com/ramsey/uuid.git", + "reference": "91039bc1faa45ba123c4328958e620d382ec7088" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/91039bc1faa45ba123c4328958e620d382ec7088", + "reference": "91039bc1faa45ba123c4328958e620d382ec7088", + "shasum": "" + }, + "require": { + "brick/math": "^0.8.8 || ^0.9 || ^0.10 || ^0.11 || ^0.12", + "ext-json": "*", + "php": "^8.0", + "ramsey/collection": "^1.2 || ^2.0" + }, + "replace": { + "rhumsaa/uuid": "self.version" + }, + "require-dev": { + "captainhook/captainhook": "^5.10", + "captainhook/plugin-composer": "^5.3", + "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", + "doctrine/annotations": "^1.8", + "ergebnis/composer-normalize": "^2.15", + "mockery/mockery": "^1.3", + "paragonie/random-lib": "^2", + "php-mock/php-mock": "^2.2", + "php-mock/php-mock-mockery": "^1.3", + "php-parallel-lint/php-parallel-lint": "^1.1", + "phpbench/phpbench": "^1.0", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan": "^1.8", + "phpstan/phpstan-mockery": "^1.1", + "phpstan/phpstan-phpunit": "^1.1", + "phpunit/phpunit": "^8.5 || ^9", + "ramsey/composer-repl": "^1.4", + "slevomat/coding-standard": "^8.4", + "squizlabs/php_codesniffer": "^3.5", + "vimeo/psalm": "^4.9" + }, + "suggest": { + "ext-bcmath": "Enables faster math with arbitrary-precision integers using BCMath.", + "ext-gmp": "Enables faster math with arbitrary-precision integers using GMP.", + "ext-uuid": "Enables the use of PeclUuidTimeGenerator and PeclUuidRandomGenerator.", + "paragonie/random-lib": "Provides RandomLib for use with the RandomLibAdapter", + "ramsey/uuid-doctrine": "Allows the use of Ramsey\\Uuid\\Uuid as Doctrine field type." + }, + "type": "library", + "extra": { + "captainhook": { + "force-install": true + } + }, + "autoload": { + "files": [ + "src/functions.php" + ], + "psr-4": { + "Ramsey\\Uuid\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A PHP library for generating and working with universally unique identifiers (UUIDs).", + "keywords": [ + "guid", + "identifier", + "uuid" + ], + "support": { + "issues": "https://github.com/ramsey/uuid/issues", + "source": "https://github.com/ramsey/uuid/tree/4.7.6" + }, + "funding": [ + { + "url": "https://github.com/ramsey", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/ramsey/uuid", + "type": "tidelift" + } + ], + "time": "2024-04-27T21:32:50+00:00" + }, + { + "name": "react/event-loop", + "version": "v1.5.0", + "source": { + "type": "git", + "url": "https://github.com/reactphp/event-loop.git", + "reference": "bbe0bd8c51ffc05ee43f1729087ed3bdf7d53354" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/event-loop/zipball/bbe0bd8c51ffc05ee43f1729087ed3bdf7d53354", + "reference": "bbe0bd8c51ffc05ee43f1729087ed3bdf7d53354", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36" + }, + "suggest": { + "ext-pcntl": "For signal handling support when using the StreamSelectLoop" + }, + "type": "library", + "autoload": { + "psr-4": { + "React\\EventLoop\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" + } + ], + "description": "ReactPHP's core reactor event loop that libraries can use for evented I/O.", + "keywords": [ + "asynchronous", + "event-loop" + ], + "support": { + "issues": "https://github.com/reactphp/event-loop/issues", + "source": "https://github.com/reactphp/event-loop/tree/v1.5.0" + }, + "funding": [ + { + "url": "https://opencollective.com/reactphp", + "type": "open_collective" + } + ], + "time": "2023-11-13T13:48:05+00:00" + }, + { + "name": "react/stream", + "version": "v1.4.0", + "source": { + "type": "git", + "url": "https://github.com/reactphp/stream.git", + "reference": "1e5b0acb8fe55143b5b426817155190eb6f5b18d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/stream/zipball/1e5b0acb8fe55143b5b426817155190eb6f5b18d", + "reference": "1e5b0acb8fe55143b5b426817155190eb6f5b18d", + "shasum": "" + }, + "require": { + "evenement/evenement": "^3.0 || ^2.0 || ^1.0", + "php": ">=5.3.8", + "react/event-loop": "^1.2" + }, + "require-dev": { + "clue/stream-filter": "~1.2", + "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36" + }, + "type": "library", + "autoload": { + "psr-4": { + "React\\Stream\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" + } + ], + "description": "Event-driven readable and writable streams for non-blocking I/O in ReactPHP", + "keywords": [ + "event-driven", + "io", + "non-blocking", + "pipe", + "reactphp", + "readable", + "stream", + "writable" + ], + "support": { + "issues": "https://github.com/reactphp/stream/issues", + "source": "https://github.com/reactphp/stream/tree/v1.4.0" + }, + "funding": [ + { + "url": "https://opencollective.com/reactphp", + "type": "open_collective" + } + ], + "time": "2024-06-11T12:45:25+00:00" }, { - "name": "ramsey/uuid", - "version": "4.7.3", + "name": "rector/rector", + "version": "1.1.0", "source": { "type": "git", - "url": "https://github.com/ramsey/uuid.git", - "reference": "433b2014e3979047db08a17a205f410ba3869cf2" + "url": "https://github.com/rectorphp/rector.git", + "reference": "556509e2dcf527369892b7d411379c4a02f31859" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/uuid/zipball/433b2014e3979047db08a17a205f410ba3869cf2", - "reference": "433b2014e3979047db08a17a205f410ba3869cf2", + "url": "https://api.github.com/repos/rectorphp/rector/zipball/556509e2dcf527369892b7d411379c4a02f31859", + "reference": "556509e2dcf527369892b7d411379c4a02f31859", "shasum": "" }, "require": { - "brick/math": "^0.8.8 || ^0.9 || ^0.10", - "ext-json": "*", - "php": "^8.0", - "ramsey/collection": "^1.2 || ^2.0" - }, - "replace": { - "rhumsaa/uuid": "self.version" + "php": "^7.2|^8.0", + "phpstan/phpstan": "^1.11" }, - "require-dev": { - "captainhook/captainhook": "^5.10", - "captainhook/plugin-composer": "^5.3", - "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", - "doctrine/annotations": "^1.8", - "ergebnis/composer-normalize": "^2.15", - "mockery/mockery": "^1.3", - "paragonie/random-lib": "^2", - "php-mock/php-mock": "^2.2", - "php-mock/php-mock-mockery": "^1.3", - "php-parallel-lint/php-parallel-lint": "^1.1", - "phpbench/phpbench": "^1.0", - "phpstan/extension-installer": "^1.1", - "phpstan/phpstan": "^1.8", - "phpstan/phpstan-mockery": "^1.1", - "phpstan/phpstan-phpunit": "^1.1", - "phpunit/phpunit": "^8.5 || ^9", - "ramsey/composer-repl": "^1.4", - "slevomat/coding-standard": "^8.4", - "squizlabs/php_codesniffer": "^3.5", - "vimeo/psalm": "^4.9" + "conflict": { + "rector/rector-doctrine": "*", + "rector/rector-downgrade-php": "*", + "rector/rector-phpunit": "*", + "rector/rector-symfony": "*" }, "suggest": { - "ext-bcmath": "Enables faster math with arbitrary-precision integers using BCMath.", - "ext-gmp": "Enables faster math with arbitrary-precision integers using GMP.", - "ext-uuid": "Enables the use of PeclUuidTimeGenerator and PeclUuidRandomGenerator.", - "paragonie/random-lib": "Provides RandomLib for use with the RandomLibAdapter", - "ramsey/uuid-doctrine": "Allows the use of Ramsey\\Uuid\\Uuid as Doctrine field type." + "ext-dom": "To manipulate phpunit.xml via the custom-rule command" }, + "bin": [ + "bin/rector" + ], "type": "library", - "extra": { - "captainhook": { - "force-install": true - } - }, "autoload": { "files": [ - "src/functions.php" - ], - "psr-4": { - "Ramsey\\Uuid\\": "src/" - } + "bootstrap.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "description": "A PHP library for generating and working with universally unique identifiers (UUIDs).", + "description": "Instant Upgrade and Automated Refactoring of any PHP code", "keywords": [ - "guid", - "identifier", - "uuid" + "automation", + "dev", + "migration", + "refactoring" ], "support": { - "issues": "https://github.com/ramsey/uuid/issues", - "source": "https://github.com/ramsey/uuid/tree/4.7.3" + "issues": "https://github.com/rectorphp/rector/issues", + "source": "https://github.com/rectorphp/rector/tree/1.1.0" }, "funding": [ { - "url": "https://github.com/ramsey", + "url": "https://github.com/tomasvotruba", "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/ramsey/uuid", - "type": "tidelift" } ], - "time": "2023-01-12T18:13:24+00:00" + "time": "2024-05-18T09:40:27+00:00" }, { "name": "sebastian/cli-parser", - "version": "2.0.0", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "efdc130dbbbb8ef0b545a994fd811725c5282cae" + "reference": "c34583b87e7b7a8055bf6c450c2c77ce32a24084" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/efdc130dbbbb8ef0b545a994fd811725c5282cae", - "reference": "efdc130dbbbb8ef0b545a994fd811725c5282cae", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/c34583b87e7b7a8055bf6c450c2c77ce32a24084", + "reference": "c34583b87e7b7a8055bf6c450c2c77ce32a24084", "shasum": "" }, "require": { @@ -3491,7 +5256,8 @@ "homepage": "https://github.com/sebastianbergmann/cli-parser", "support": { "issues": "https://github.com/sebastianbergmann/cli-parser/issues", - "source": "https://github.com/sebastianbergmann/cli-parser/tree/2.0.0" + "security": "https://github.com/sebastianbergmann/cli-parser/security/policy", + "source": "https://github.com/sebastianbergmann/cli-parser/tree/2.0.1" }, "funding": [ { @@ -3499,7 +5265,7 @@ "type": "github" } ], - "time": "2023-02-03T06:58:15+00:00" + "time": "2024-03-02T07:12:49+00:00" }, { "name": "sebastian/code-unit", @@ -3614,16 +5380,16 @@ }, { "name": "sebastian/comparator", - "version": "5.0.0", + "version": "5.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "72f01e6586e0caf6af81297897bd112eb7e9627c" + "reference": "2db5010a484d53ebf536087a70b4a5423c102372" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/72f01e6586e0caf6af81297897bd112eb7e9627c", - "reference": "72f01e6586e0caf6af81297897bd112eb7e9627c", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2db5010a484d53ebf536087a70b4a5423c102372", + "reference": "2db5010a484d53ebf536087a70b4a5423c102372", "shasum": "" }, "require": { @@ -3634,7 +5400,7 @@ "sebastian/exporter": "^5.0" }, "require-dev": { - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^10.3" }, "type": "library", "extra": { @@ -3678,7 +5444,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/5.0.0" + "security": "https://github.com/sebastianbergmann/comparator/security/policy", + "source": "https://github.com/sebastianbergmann/comparator/tree/5.0.1" }, "funding": [ { @@ -3686,24 +5453,24 @@ "type": "github" } ], - "time": "2023-02-03T07:07:16+00:00" + "time": "2023-08-14T13:18:12+00:00" }, { "name": "sebastian/complexity", - "version": "3.0.0", + "version": "3.2.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "e67d240970c9dc7ea7b2123a6d520e334dd61dc6" + "reference": "68ff824baeae169ec9f2137158ee529584553799" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/e67d240970c9dc7ea7b2123a6d520e334dd61dc6", - "reference": "e67d240970c9dc7ea7b2123a6d520e334dd61dc6", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/68ff824baeae169ec9f2137158ee529584553799", + "reference": "68ff824baeae169ec9f2137158ee529584553799", "shasum": "" }, "require": { - "nikic/php-parser": "^4.10", + "nikic/php-parser": "^4.18 || ^5.0", "php": ">=8.1" }, "require-dev": { @@ -3712,7 +5479,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "3.0-dev" + "dev-main": "3.2-dev" } }, "autoload": { @@ -3735,7 +5502,8 @@ "homepage": "https://github.com/sebastianbergmann/complexity", "support": { "issues": "https://github.com/sebastianbergmann/complexity/issues", - "source": "https://github.com/sebastianbergmann/complexity/tree/3.0.0" + "security": "https://github.com/sebastianbergmann/complexity/security/policy", + "source": "https://github.com/sebastianbergmann/complexity/tree/3.2.0" }, "funding": [ { @@ -3743,20 +5511,20 @@ "type": "github" } ], - "time": "2023-02-03T06:59:47+00:00" + "time": "2023-12-21T08:37:17+00:00" }, { "name": "sebastian/diff", - "version": "5.0.0", + "version": "5.1.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "70dd1b20bc198da394ad542e988381b44e64e39f" + "reference": "c41e007b4b62af48218231d6c2275e4c9b975b2e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/70dd1b20bc198da394ad542e988381b44e64e39f", - "reference": "70dd1b20bc198da394ad542e988381b44e64e39f", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/c41e007b4b62af48218231d6c2275e4c9b975b2e", + "reference": "c41e007b4b62af48218231d6c2275e4c9b975b2e", "shasum": "" }, "require": { @@ -3764,12 +5532,12 @@ }, "require-dev": { "phpunit/phpunit": "^10.0", - "symfony/process": "^4.2 || ^5" + "symfony/process": "^6.4" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "5.0-dev" + "dev-main": "5.1-dev" } }, "autoload": { @@ -3801,7 +5569,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/5.0.0" + "security": "https://github.com/sebastianbergmann/diff/security/policy", + "source": "https://github.com/sebastianbergmann/diff/tree/5.1.1" }, "funding": [ { @@ -3809,20 +5578,20 @@ "type": "github" } ], - "time": "2023-02-03T07:00:31+00:00" + "time": "2024-03-02T07:15:17+00:00" }, { "name": "sebastian/environment", - "version": "6.0.0", + "version": "6.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "b6f3694c6386c7959915a0037652e0c40f6f69cc" + "reference": "8074dbcd93529b357029f5cc5058fd3e43666984" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/b6f3694c6386c7959915a0037652e0c40f6f69cc", - "reference": "b6f3694c6386c7959915a0037652e0c40f6f69cc", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/8074dbcd93529b357029f5cc5058fd3e43666984", + "reference": "8074dbcd93529b357029f5cc5058fd3e43666984", "shasum": "" }, "require": { @@ -3837,7 +5606,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "6.0-dev" + "dev-main": "6.1-dev" } }, "autoload": { @@ -3864,7 +5633,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/6.0.0" + "security": "https://github.com/sebastianbergmann/environment/security/policy", + "source": "https://github.com/sebastianbergmann/environment/tree/6.1.0" }, "funding": [ { @@ -3872,20 +5642,20 @@ "type": "github" } ], - "time": "2023-02-03T07:03:04+00:00" + "time": "2024-03-23T08:47:14+00:00" }, { "name": "sebastian/exporter", - "version": "5.0.0", + "version": "5.1.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "f3ec4bf931c0b31e5b413f5b4fc970a7d03338c0" + "reference": "955288482d97c19a372d3f31006ab3f37da47adf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/f3ec4bf931c0b31e5b413f5b4fc970a7d03338c0", - "reference": "f3ec4bf931c0b31e5b413f5b4fc970a7d03338c0", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/955288482d97c19a372d3f31006ab3f37da47adf", + "reference": "955288482d97c19a372d3f31006ab3f37da47adf", "shasum": "" }, "require": { @@ -3899,7 +5669,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "5.0-dev" + "dev-main": "5.1-dev" } }, "autoload": { @@ -3941,7 +5711,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/5.0.0" + "security": "https://github.com/sebastianbergmann/exporter/security/policy", + "source": "https://github.com/sebastianbergmann/exporter/tree/5.1.2" }, "funding": [ { @@ -3949,20 +5720,20 @@ "type": "github" } ], - "time": "2023-02-03T07:06:49+00:00" + "time": "2024-03-02T07:17:12+00:00" }, { "name": "sebastian/global-state", - "version": "6.0.0", + "version": "6.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "aab257c712de87b90194febd52e4d184551c2d44" + "reference": "987bafff24ecc4c9ac418cab1145b96dd6e9cbd9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/aab257c712de87b90194febd52e4d184551c2d44", - "reference": "aab257c712de87b90194febd52e4d184551c2d44", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/987bafff24ecc4c9ac418cab1145b96dd6e9cbd9", + "reference": "987bafff24ecc4c9ac418cab1145b96dd6e9cbd9", "shasum": "" }, "require": { @@ -3996,13 +5767,14 @@ } ], "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", + "homepage": "https://www.github.com/sebastianbergmann/global-state", "keywords": [ "global state" ], "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/6.0.0" + "security": "https://github.com/sebastianbergmann/global-state/security/policy", + "source": "https://github.com/sebastianbergmann/global-state/tree/6.0.2" }, "funding": [ { @@ -4010,24 +5782,24 @@ "type": "github" } ], - "time": "2023-02-03T07:07:38+00:00" + "time": "2024-03-02T07:19:19+00:00" }, { "name": "sebastian/lines-of-code", - "version": "2.0.0", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "17c4d940ecafb3d15d2cf916f4108f664e28b130" + "reference": "856e7f6a75a84e339195d48c556f23be2ebf75d0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/17c4d940ecafb3d15d2cf916f4108f664e28b130", - "reference": "17c4d940ecafb3d15d2cf916f4108f664e28b130", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/856e7f6a75a84e339195d48c556f23be2ebf75d0", + "reference": "856e7f6a75a84e339195d48c556f23be2ebf75d0", "shasum": "" }, "require": { - "nikic/php-parser": "^4.10", + "nikic/php-parser": "^4.18 || ^5.0", "php": ">=8.1" }, "require-dev": { @@ -4059,7 +5831,8 @@ "homepage": "https://github.com/sebastianbergmann/lines-of-code", "support": { "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", - "source": "https://github.com/sebastianbergmann/lines-of-code/tree/2.0.0" + "security": "https://github.com/sebastianbergmann/lines-of-code/security/policy", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/2.0.2" }, "funding": [ { @@ -4067,7 +5840,7 @@ "type": "github" } ], - "time": "2023-02-03T07:08:02+00:00" + "time": "2023-12-21T08:38:20+00:00" }, { "name": "sebastian/object-enumerator", @@ -4355,16 +6128,16 @@ }, { "name": "spatie/backtrace", - "version": "1.2.1", + "version": "1.6.1", "source": { "type": "git", "url": "https://github.com/spatie/backtrace.git", - "reference": "4ee7d41aa5268107906ea8a4d9ceccde136dbd5b" + "reference": "8373b9d51638292e3bfd736a9c19a654111b4a23" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/backtrace/zipball/4ee7d41aa5268107906ea8a4d9ceccde136dbd5b", - "reference": "4ee7d41aa5268107906ea8a4d9ceccde136dbd5b", + "url": "https://api.github.com/repos/spatie/backtrace/zipball/8373b9d51638292e3bfd736a9c19a654111b4a23", + "reference": "8373b9d51638292e3bfd736a9c19a654111b4a23", "shasum": "" }, "require": { @@ -4372,7 +6145,9 @@ }, "require-dev": { "ext-json": "*", + "laravel/serializable-closure": "^1.3", "phpunit/phpunit": "^9.3", + "spatie/phpunit-snapshot-assertions": "^4.2", "symfony/var-dumper": "^5.1" }, "type": "library", @@ -4400,8 +6175,7 @@ "spatie" ], "support": { - "issues": "https://github.com/spatie/backtrace/issues", - "source": "https://github.com/spatie/backtrace/tree/1.2.1" + "source": "https://github.com/spatie/backtrace/tree/1.6.1" }, "funding": [ { @@ -4413,47 +6187,49 @@ "type": "other" } ], - "time": "2021-11-09T10:57:15+00:00" + "time": "2024-04-24T13:22:11+00:00" }, { "name": "spatie/laravel-ray", - "version": "1.32.2", + "version": "1.36.2", "source": { "type": "git", "url": "https://github.com/spatie/laravel-ray.git", - "reference": "0c28a8274ec261a2857b4318b6f934af98024395" + "reference": "1852faa96e5aa6778ea3401ec3176eee77268718" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/laravel-ray/zipball/0c28a8274ec261a2857b4318b6f934af98024395", - "reference": "0c28a8274ec261a2857b4318b6f934af98024395", + "url": "https://api.github.com/repos/spatie/laravel-ray/zipball/1852faa96e5aa6778ea3401ec3176eee77268718", + "reference": "1852faa96e5aa6778ea3401ec3176eee77268718", "shasum": "" }, "require": { "ext-json": "*", - "illuminate/contracts": "^7.20|^8.19|^9.0|^10.0", - "illuminate/database": "^7.20|^8.19|^9.0|^10.0", - "illuminate/queue": "^7.20|^8.19|^9.0|^10.0", - "illuminate/support": "^7.20|^8.19|^9.0|^10.0", + "illuminate/contracts": "^7.20|^8.19|^9.0|^10.0|^11.0", + "illuminate/database": "^7.20|^8.19|^9.0|^10.0|^11.0", + "illuminate/queue": "^7.20|^8.19|^9.0|^10.0|^11.0", + "illuminate/support": "^7.20|^8.19|^9.0|^10.0|^11.0", "php": "^7.4|^8.0", + "rector/rector": "^0.19.2|^1.0", "spatie/backtrace": "^1.0", - "spatie/ray": "^1.33", - "symfony/stopwatch": "4.2|^5.1|^6.0", + "spatie/ray": "^1.41.1", + "symfony/stopwatch": "4.2|^5.1|^6.0|^7.0", "zbateson/mail-mime-parser": "^1.3.1|^2.0" }, "require-dev": { "guzzlehttp/guzzle": "^7.3", - "laravel/framework": "^7.20|^8.19|^9.0|^10.0", - "orchestra/testbench-core": "^5.0|^6.0|^7.0|^8.0", - "pestphp/pest": "^1.22", - "phpstan/phpstan": "^0.12.93", - "phpunit/phpunit": "^9.3", - "spatie/pest-plugin-snapshots": "^1.1" + "laravel/framework": "^7.20|^8.19|^9.0|^10.0|^11.0", + "orchestra/testbench-core": "^5.0|^6.0|^7.0|^8.0|^9.0", + "pestphp/pest": "^1.22|^2.0", + "phpstan/phpstan": "^1.10.57", + "phpunit/phpunit": "^9.3|^10.1", + "spatie/pest-plugin-snapshots": "^1.1|^2.0", + "symfony/var-dumper": "^4.2|^5.1|^6.0|^7.0.3" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.29.x-dev" + "dev-main": "1.x-dev" }, "laravel": { "providers": [ @@ -4486,7 +6262,7 @@ ], "support": { "issues": "https://github.com/spatie/laravel-ray/issues", - "source": "https://github.com/spatie/laravel-ray/tree/1.32.2" + "source": "https://github.com/spatie/laravel-ray/tree/1.36.2" }, "funding": [ { @@ -4498,7 +6274,7 @@ "type": "other" } ], - "time": "2023-02-06T09:46:50+00:00" + "time": "2024-05-02T08:26:02+00:00" }, { "name": "spatie/macroable", @@ -4550,18 +6326,81 @@ }, "time": "2021-03-26T22:39:02+00:00" }, + { + "name": "spatie/phpunit-watcher", + "version": "1.24.0", + "source": { + "type": "git", + "url": "https://github.com/spatie/phpunit-watcher.git", + "reference": "9353e6a6e49254cf266d860ab7fec2b5d37dab00" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spatie/phpunit-watcher/zipball/9353e6a6e49254cf266d860ab7fec2b5d37dab00", + "reference": "9353e6a6e49254cf266d860ab7fec2b5d37dab00", + "shasum": "" + }, + "require": { + "clue/stdio-react": "^2.6", + "jolicode/jolinotif": "^2.7.1", + "php": "^8.1", + "symfony/console": "^6 | ^7.0.7", + "symfony/finder": "^6 | ^7.0.7", + "symfony/process": "^6 | ^7.0.7", + "symfony/yaml": "^6 | ^7.0.7" + }, + "conflict": { + "symfony/console": "<5.2" + }, + "require-dev": { + "phpunit/phpunit": "^10.5.20 | ^11.1.3", + "symfony/filesystem": "^6 | ^7.0.7" + }, + "bin": [ + "phpunit-watcher" + ], + "type": "library", + "autoload": { + "psr-4": { + "Spatie\\PhpUnitWatcher\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Freek Van der Herten", + "email": "freek@spatie.be", + "homepage": "https://spatie.be", + "role": "Developer" + } + ], + "description": "Automatically rerun PHPUnit tests when source code changes", + "homepage": "https://github.com/spatie/phpunit-watcher", + "keywords": [ + "phpunit-watcher", + "spatie" + ], + "support": { + "issues": "https://github.com/spatie/phpunit-watcher/issues", + "source": "https://github.com/spatie/phpunit-watcher/tree/1.24.0" + }, + "time": "2024-05-22T09:31:00+00:00" + }, { "name": "spatie/ray", - "version": "1.36.2", + "version": "1.41.2", "source": { "type": "git", "url": "https://github.com/spatie/ray.git", - "reference": "71dfde21900447ab37698fc07ff28b7f1e1822b8" + "reference": "c44f8cfbf82c69909b505de61d8d3f2d324e93fc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/ray/zipball/71dfde21900447ab37698fc07ff28b7f1e1822b8", - "reference": "71dfde21900447ab37698fc07ff28b7f1e1822b8", + "url": "https://api.github.com/repos/spatie/ray/zipball/c44f8cfbf82c69909b505de61d8d3f2d324e93fc", + "reference": "c44f8cfbf82c69909b505de61d8d3f2d324e93fc", "shasum": "" }, "require": { @@ -4571,19 +6410,28 @@ "ramsey/uuid": "^3.0|^4.1", "spatie/backtrace": "^1.1", "spatie/macroable": "^1.0|^2.0", - "symfony/stopwatch": "^4.0|^5.1|^6.0", - "symfony/var-dumper": "^4.2|^5.1|^6.0" + "symfony/stopwatch": "^4.0|^5.1|^6.0|^7.0", + "symfony/var-dumper": "^4.2|^5.1|^6.0|^7.0.3" }, "require-dev": { "illuminate/support": "6.x|^8.18|^9.0", "nesbot/carbon": "^2.63", "pestphp/pest": "^1.22", - "phpstan/phpstan": "^0.12.92", + "phpstan/phpstan": "^1.10", "phpunit/phpunit": "^9.5", + "rector/rector": "^0.19.2", "spatie/phpunit-snapshot-assertions": "^4.2", "spatie/test-time": "^1.2" }, + "bin": [ + "bin/remove-ray.sh" + ], "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.x-dev" + } + }, "autoload": { "files": [ "src/helpers.php" @@ -4612,7 +6460,7 @@ ], "support": { "issues": "https://github.com/spatie/ray/issues", - "source": "https://github.com/spatie/ray/tree/1.36.2" + "source": "https://github.com/spatie/ray/tree/1.41.2" }, "funding": [ { @@ -4624,28 +6472,28 @@ "type": "other" } ], - "time": "2023-02-10T09:24:13+00:00" + "time": "2024-04-24T14:21:46+00:00" }, { "name": "symfony/console", - "version": "v6.2.5", + "version": "v6.4.8", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "3e294254f2191762c1d137aed4b94e966965e985" + "reference": "be5854cee0e8c7b110f00d695d11debdfa1a2a91" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/3e294254f2191762c1d137aed4b94e966965e985", - "reference": "3e294254f2191762c1d137aed4b94e966965e985", + "url": "https://api.github.com/repos/symfony/console/zipball/be5854cee0e8c7b110f00d695d11debdfa1a2a91", + "reference": "be5854cee0e8c7b110f00d695d11debdfa1a2a91", "shasum": "" }, "require": { "php": ">=8.1", - "symfony/deprecation-contracts": "^2.1|^3", + "symfony/deprecation-contracts": "^2.5|^3", "symfony/polyfill-mbstring": "~1.0", - "symfony/service-contracts": "^1.1|^2|^3", - "symfony/string": "^5.4|^6.0" + "symfony/service-contracts": "^2.5|^3", + "symfony/string": "^5.4|^6.0|^7.0" }, "conflict": { "symfony/dependency-injection": "<5.4", @@ -4659,18 +6507,16 @@ }, "require-dev": { "psr/log": "^1|^2|^3", - "symfony/config": "^5.4|^6.0", - "symfony/dependency-injection": "^5.4|^6.0", - "symfony/event-dispatcher": "^5.4|^6.0", - "symfony/lock": "^5.4|^6.0", - "symfony/process": "^5.4|^6.0", - "symfony/var-dumper": "^5.4|^6.0" - }, - "suggest": { - "psr/log": "For using the console logger", - "symfony/event-dispatcher": "", - "symfony/lock": "", - "symfony/process": "" + "symfony/config": "^5.4|^6.0|^7.0", + "symfony/dependency-injection": "^5.4|^6.0|^7.0", + "symfony/event-dispatcher": "^5.4|^6.0|^7.0", + "symfony/http-foundation": "^6.4|^7.0", + "symfony/http-kernel": "^6.4|^7.0", + "symfony/lock": "^5.4|^6.0|^7.0", + "symfony/messenger": "^5.4|^6.0|^7.0", + "symfony/process": "^5.4|^6.0|^7.0", + "symfony/stopwatch": "^5.4|^6.0|^7.0", + "symfony/var-dumper": "^5.4|^6.0|^7.0" }, "type": "library", "autoload": { @@ -4699,12 +6545,12 @@ "homepage": "https://symfony.com", "keywords": [ "cli", - "command line", + "command-line", "console", "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.2.5" + "source": "https://github.com/symfony/console/tree/v6.4.8" }, "funding": [ { @@ -4720,24 +6566,24 @@ "type": "tidelift" } ], - "time": "2023-01-01T08:38:09+00:00" + "time": "2024-05-31T14:49:08+00:00" }, { "name": "symfony/css-selector", - "version": "v6.2.5", + "version": "v7.1.1", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", - "reference": "bf1b9d4ad8b1cf0dbde8b08e0135a2f6259b9ba1" + "reference": "1c7cee86c6f812896af54434f8ce29c8d94f9ff4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/bf1b9d4ad8b1cf0dbde8b08e0135a2f6259b9ba1", - "reference": "bf1b9d4ad8b1cf0dbde8b08e0135a2f6259b9ba1", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/1c7cee86c6f812896af54434f8ce29c8d94f9ff4", + "reference": "1c7cee86c6f812896af54434f8ce29c8d94f9ff4", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.2" }, "type": "library", "autoload": { @@ -4769,7 +6615,7 @@ "description": "Converts CSS selectors to XPath expressions", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/css-selector/tree/v6.2.5" + "source": "https://github.com/symfony/css-selector/tree/v7.1.1" }, "funding": [ { @@ -4785,20 +6631,20 @@ "type": "tidelift" } ], - "time": "2023-01-01T08:38:09+00:00" + "time": "2024-05-31T14:57:53+00:00" }, { "name": "symfony/deprecation-contracts", - "version": "v3.2.0", + "version": "v3.5.0", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "1ee04c65529dea5d8744774d474e7cbd2f1206d3" + "reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/1ee04c65529dea5d8744774d474e7cbd2f1206d3", - "reference": "1ee04c65529dea5d8744774d474e7cbd2f1206d3", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1", + "reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1", "shasum": "" }, "require": { @@ -4807,7 +6653,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "3.3-dev" + "dev-main": "3.5-dev" }, "thanks": { "name": "symfony/contracts", @@ -4836,7 +6682,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.2.0" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.0" }, "funding": [ { @@ -4852,31 +6698,35 @@ "type": "tidelift" } ], - "time": "2022-11-25T10:21:52+00:00" + "time": "2024-04-18T09:32:20+00:00" }, { "name": "symfony/error-handler", - "version": "v6.2.5", + "version": "v6.4.8", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "0092696af0be8e6124b042fbe2890ca1788d7b28" + "reference": "ef836152bf13472dc5fb5b08b0c0c4cfeddc0fcc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/0092696af0be8e6124b042fbe2890ca1788d7b28", - "reference": "0092696af0be8e6124b042fbe2890ca1788d7b28", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/ef836152bf13472dc5fb5b08b0c0c4cfeddc0fcc", + "reference": "ef836152bf13472dc5fb5b08b0c0c4cfeddc0fcc", "shasum": "" }, "require": { "php": ">=8.1", "psr/log": "^1|^2|^3", - "symfony/var-dumper": "^5.4|^6.0" + "symfony/var-dumper": "^5.4|^6.0|^7.0" + }, + "conflict": { + "symfony/deprecation-contracts": "<2.5", + "symfony/http-kernel": "<6.4" }, "require-dev": { - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/http-kernel": "^5.4|^6.0", - "symfony/serializer": "^5.4|^6.0" + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/http-kernel": "^6.4|^7.0", + "symfony/serializer": "^5.4|^6.0|^7.0" }, "bin": [ "Resources/bin/patch-type-declarations" @@ -4907,7 +6757,7 @@ "description": "Provides tools to manage errors and ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/error-handler/tree/v6.2.5" + "source": "https://github.com/symfony/error-handler/tree/v6.4.8" }, "funding": [ { @@ -4923,28 +6773,29 @@ "type": "tidelift" } ], - "time": "2023-01-01T08:38:09+00:00" + "time": "2024-05-31T14:49:08+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v6.2.5", + "version": "v7.1.1", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "f02d108b5e9fd4a6245aa73a9d2df2ec060c3e68" + "reference": "9fa7f7a21beb22a39a8f3f28618b29e50d7a55a7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/f02d108b5e9fd4a6245aa73a9d2df2ec060c3e68", - "reference": "f02d108b5e9fd4a6245aa73a9d2df2ec060c3e68", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/9fa7f7a21beb22a39a8f3f28618b29e50d7a55a7", + "reference": "9fa7f7a21beb22a39a8f3f28618b29e50d7a55a7", "shasum": "" }, "require": { - "php": ">=8.1", - "symfony/event-dispatcher-contracts": "^2|^3" + "php": ">=8.2", + "symfony/event-dispatcher-contracts": "^2.5|^3" }, "conflict": { - "symfony/dependency-injection": "<5.4" + "symfony/dependency-injection": "<6.4", + "symfony/service-contracts": "<2.5" }, "provide": { "psr/event-dispatcher-implementation": "1.0", @@ -4952,17 +6803,13 @@ }, "require-dev": { "psr/log": "^1|^2|^3", - "symfony/config": "^5.4|^6.0", - "symfony/dependency-injection": "^5.4|^6.0", - "symfony/error-handler": "^5.4|^6.0", - "symfony/expression-language": "^5.4|^6.0", - "symfony/http-foundation": "^5.4|^6.0", - "symfony/service-contracts": "^1.1|^2|^3", - "symfony/stopwatch": "^5.4|^6.0" - }, - "suggest": { - "symfony/dependency-injection": "", - "symfony/http-kernel": "" + "symfony/config": "^6.4|^7.0", + "symfony/dependency-injection": "^6.4|^7.0", + "symfony/error-handler": "^6.4|^7.0", + "symfony/expression-language": "^6.4|^7.0", + "symfony/http-foundation": "^6.4|^7.0", + "symfony/service-contracts": "^2.5|^3", + "symfony/stopwatch": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -4990,7 +6837,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v6.2.5" + "source": "https://github.com/symfony/event-dispatcher/tree/v7.1.1" }, "funding": [ { @@ -5006,33 +6853,30 @@ "type": "tidelift" } ], - "time": "2023-01-01T08:38:09+00:00" + "time": "2024-05-31T14:57:53+00:00" }, { "name": "symfony/event-dispatcher-contracts", - "version": "v3.2.0", + "version": "v3.5.0", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "0782b0b52a737a05b4383d0df35a474303cabdae" + "reference": "8f93aec25d41b72493c6ddff14e916177c9efc50" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/0782b0b52a737a05b4383d0df35a474303cabdae", - "reference": "0782b0b52a737a05b4383d0df35a474303cabdae", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/8f93aec25d41b72493c6ddff14e916177c9efc50", + "reference": "8f93aec25d41b72493c6ddff14e916177c9efc50", "shasum": "" }, "require": { "php": ">=8.1", "psr/event-dispatcher": "^1" }, - "suggest": { - "symfony/event-dispatcher-implementation": "" - }, "type": "library", "extra": { "branch-alias": { - "dev-main": "3.3-dev" + "dev-main": "3.5-dev" }, "thanks": { "name": "symfony/contracts", @@ -5069,7 +6913,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.2.0" + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.5.0" }, "funding": [ { @@ -5085,27 +6929,27 @@ "type": "tidelift" } ], - "time": "2022-11-25T10:21:52+00:00" + "time": "2024-04-18T09:32:20+00:00" }, { "name": "symfony/finder", - "version": "v6.2.5", + "version": "v6.4.8", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "c90dc446976a612e3312a97a6ec0069ab0c2099c" + "reference": "3ef977a43883215d560a2cecb82ec8e62131471c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/c90dc446976a612e3312a97a6ec0069ab0c2099c", - "reference": "c90dc446976a612e3312a97a6ec0069ab0c2099c", + "url": "https://api.github.com/repos/symfony/finder/zipball/3ef977a43883215d560a2cecb82ec8e62131471c", + "reference": "3ef977a43883215d560a2cecb82ec8e62131471c", "shasum": "" }, "require": { "php": ">=8.1" }, "require-dev": { - "symfony/filesystem": "^6.0" + "symfony/filesystem": "^6.0|^7.0" }, "type": "library", "autoload": { @@ -5133,7 +6977,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v6.2.5" + "source": "https://github.com/symfony/finder/tree/v6.4.8" }, "funding": [ { @@ -5149,41 +6993,40 @@ "type": "tidelift" } ], - "time": "2023-01-20T17:45:48+00:00" + "time": "2024-05-31T14:49:08+00:00" }, { "name": "symfony/http-foundation", - "version": "v6.2.6", + "version": "v6.4.8", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "e8dd1f502bc2b3371d05092aa233b064b03ce7ed" + "reference": "27de8cc95e11db7a50b027e71caaab9024545947" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/e8dd1f502bc2b3371d05092aa233b064b03ce7ed", - "reference": "e8dd1f502bc2b3371d05092aa233b064b03ce7ed", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/27de8cc95e11db7a50b027e71caaab9024545947", + "reference": "27de8cc95e11db7a50b027e71caaab9024545947", "shasum": "" }, "require": { "php": ">=8.1", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-mbstring": "~1.1" + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/polyfill-mbstring": "~1.1", + "symfony/polyfill-php83": "^1.27" }, "conflict": { - "symfony/cache": "<6.2" + "symfony/cache": "<6.3" }, "require-dev": { - "predis/predis": "~1.0", - "symfony/cache": "^5.4|^6.0", - "symfony/dependency-injection": "^5.4|^6.0", - "symfony/expression-language": "^5.4|^6.0", - "symfony/http-kernel": "^5.4.12|^6.0.12|^6.1.4", - "symfony/mime": "^5.4|^6.0", - "symfony/rate-limiter": "^5.2|^6.0" - }, - "suggest": { - "symfony/mime": "To use the file extension guesser" + "doctrine/dbal": "^2.13.1|^3|^4", + "predis/predis": "^1.1|^2.0", + "symfony/cache": "^6.3|^7.0", + "symfony/dependency-injection": "^5.4|^6.0|^7.0", + "symfony/expression-language": "^5.4|^6.0|^7.0", + "symfony/http-kernel": "^5.4.12|^6.0.12|^6.1.4|^7.0", + "symfony/mime": "^5.4|^6.0|^7.0", + "symfony/rate-limiter": "^5.4|^6.0|^7.0" }, "type": "library", "autoload": { @@ -5211,7 +7054,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v6.2.6" + "source": "https://github.com/symfony/http-foundation/tree/v6.4.8" }, "funding": [ { @@ -5227,29 +7070,29 @@ "type": "tidelift" } ], - "time": "2023-01-30T15:46:28+00:00" + "time": "2024-05-31T14:49:08+00:00" }, { "name": "symfony/http-kernel", - "version": "v6.2.6", + "version": "v6.4.8", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "7122db07b0d8dbf0de682267c84217573aee3ea7" + "reference": "6c519aa3f32adcfd1d1f18d923f6b227d9acf3c1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/7122db07b0d8dbf0de682267c84217573aee3ea7", - "reference": "7122db07b0d8dbf0de682267c84217573aee3ea7", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/6c519aa3f32adcfd1d1f18d923f6b227d9acf3c1", + "reference": "6c519aa3f32adcfd1d1f18d923f6b227d9acf3c1", "shasum": "" }, "require": { "php": ">=8.1", "psr/log": "^1|^2|^3", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/error-handler": "^6.1", - "symfony/event-dispatcher": "^5.4|^6.0", - "symfony/http-foundation": "^5.4|^6.0", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/error-handler": "^6.4|^7.0", + "symfony/event-dispatcher": "^5.4|^6.0|^7.0", + "symfony/http-foundation": "^6.4|^7.0", "symfony/polyfill-ctype": "^1.8" }, "conflict": { @@ -5257,15 +7100,18 @@ "symfony/cache": "<5.4", "symfony/config": "<6.1", "symfony/console": "<5.4", - "symfony/dependency-injection": "<6.2", + "symfony/dependency-injection": "<6.4", "symfony/doctrine-bridge": "<5.4", "symfony/form": "<5.4", "symfony/http-client": "<5.4", + "symfony/http-client-contracts": "<2.5", "symfony/mailer": "<5.4", "symfony/messenger": "<5.4", "symfony/translation": "<5.4", + "symfony/translation-contracts": "<2.5", "symfony/twig-bridge": "<5.4", - "symfony/validator": "<5.4", + "symfony/validator": "<6.4", + "symfony/var-dumper": "<6.3", "twig/twig": "<2.13" }, "provide": { @@ -5273,29 +7119,29 @@ }, "require-dev": { "psr/cache": "^1.0|^2.0|^3.0", - "symfony/browser-kit": "^5.4|^6.0", - "symfony/config": "^6.1", - "symfony/console": "^5.4|^6.0", - "symfony/css-selector": "^5.4|^6.0", - "symfony/dependency-injection": "^6.2", - "symfony/dom-crawler": "^5.4|^6.0", - "symfony/expression-language": "^5.4|^6.0", - "symfony/finder": "^5.4|^6.0", - "symfony/http-client-contracts": "^1.1|^2|^3", - "symfony/process": "^5.4|^6.0", - "symfony/routing": "^5.4|^6.0", - "symfony/stopwatch": "^5.4|^6.0", - "symfony/translation": "^5.4|^6.0", - "symfony/translation-contracts": "^1.1|^2|^3", - "symfony/uid": "^5.4|^6.0", + "symfony/browser-kit": "^5.4|^6.0|^7.0", + "symfony/clock": "^6.2|^7.0", + "symfony/config": "^6.1|^7.0", + "symfony/console": "^5.4|^6.0|^7.0", + "symfony/css-selector": "^5.4|^6.0|^7.0", + "symfony/dependency-injection": "^6.4|^7.0", + "symfony/dom-crawler": "^5.4|^6.0|^7.0", + "symfony/expression-language": "^5.4|^6.0|^7.0", + "symfony/finder": "^5.4|^6.0|^7.0", + "symfony/http-client-contracts": "^2.5|^3", + "symfony/process": "^5.4|^6.0|^7.0", + "symfony/property-access": "^5.4.5|^6.0.5|^7.0", + "symfony/routing": "^5.4|^6.0|^7.0", + "symfony/serializer": "^6.4.4|^7.0.4", + "symfony/stopwatch": "^5.4|^6.0|^7.0", + "symfony/translation": "^5.4|^6.0|^7.0", + "symfony/translation-contracts": "^2.5|^3", + "symfony/uid": "^5.4|^6.0|^7.0", + "symfony/validator": "^6.4|^7.0", + "symfony/var-dumper": "^5.4|^6.4|^7.0", + "symfony/var-exporter": "^6.2|^7.0", "twig/twig": "^2.13|^3.0.4" }, - "suggest": { - "symfony/browser-kit": "", - "symfony/config": "", - "symfony/console": "", - "symfony/dependency-injection": "" - }, "type": "library", "autoload": { "psr-4": { @@ -5322,7 +7168,7 @@ "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-kernel/tree/v6.2.6" + "source": "https://github.com/symfony/http-kernel/tree/v6.4.8" }, "funding": [ { @@ -5338,20 +7184,20 @@ "type": "tidelift" } ], - "time": "2023-02-01T08:32:25+00:00" + "time": "2024-06-02T16:06:25+00:00" }, { "name": "symfony/mailer", - "version": "v6.2.5", + "version": "v6.4.8", "source": { "type": "git", "url": "https://github.com/symfony/mailer.git", - "reference": "29729ac0b4e5113f24c39c46746bd6afb79e0aaa" + "reference": "76326421d44c07f7824b19487cfbf87870b37efc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mailer/zipball/29729ac0b4e5113f24c39c46746bd6afb79e0aaa", - "reference": "29729ac0b4e5113f24c39c46746bd6afb79e0aaa", + "url": "https://api.github.com/repos/symfony/mailer/zipball/76326421d44c07f7824b19487cfbf87870b37efc", + "reference": "76326421d44c07f7824b19487cfbf87870b37efc", "shasum": "" }, "require": { @@ -5359,21 +7205,22 @@ "php": ">=8.1", "psr/event-dispatcher": "^1", "psr/log": "^1|^2|^3", - "symfony/event-dispatcher": "^5.4|^6.0", - "symfony/mime": "^6.2", - "symfony/service-contracts": "^1.1|^2|^3" + "symfony/event-dispatcher": "^5.4|^6.0|^7.0", + "symfony/mime": "^6.2|^7.0", + "symfony/service-contracts": "^2.5|^3" }, "conflict": { + "symfony/http-client-contracts": "<2.5", "symfony/http-kernel": "<5.4", "symfony/messenger": "<6.2", "symfony/mime": "<6.2", "symfony/twig-bridge": "<6.2.1" }, "require-dev": { - "symfony/console": "^5.4|^6.0", - "symfony/http-client-contracts": "^1.1|^2|^3", - "symfony/messenger": "^6.2", - "symfony/twig-bridge": "^6.2" + "symfony/console": "^5.4|^6.0|^7.0", + "symfony/http-client": "^5.4|^6.0|^7.0", + "symfony/messenger": "^6.2|^7.0", + "symfony/twig-bridge": "^6.2|^7.0" }, "type": "library", "autoload": { @@ -5401,7 +7248,7 @@ "description": "Helps sending emails", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/mailer/tree/v6.2.5" + "source": "https://github.com/symfony/mailer/tree/v6.4.8" }, "funding": [ { @@ -5417,24 +7264,25 @@ "type": "tidelift" } ], - "time": "2023-01-10T18:53:53+00:00" + "time": "2024-05-31T14:49:08+00:00" }, { "name": "symfony/mime", - "version": "v6.2.5", + "version": "v6.4.8", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "4b7b349f67d15cd0639955c8179a76c89f6fd610" + "reference": "618597ab8b78ac86d1c75a9d0b35540cda074f33" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/4b7b349f67d15cd0639955c8179a76c89f6fd610", - "reference": "4b7b349f67d15cd0639955c8179a76c89f6fd610", + "url": "https://api.github.com/repos/symfony/mime/zipball/618597ab8b78ac86d1c75a9d0b35540cda074f33", + "reference": "618597ab8b78ac86d1c75a9d0b35540cda074f33", "shasum": "" }, "require": { "php": ">=8.1", + "symfony/deprecation-contracts": "^2.5|^3", "symfony/polyfill-intl-idn": "^1.10", "symfony/polyfill-mbstring": "^1.0" }, @@ -5443,16 +7291,17 @@ "phpdocumentor/reflection-docblock": "<3.2.2", "phpdocumentor/type-resolver": "<1.4.0", "symfony/mailer": "<5.4", - "symfony/serializer": "<6.2" + "symfony/serializer": "<6.3.2" }, "require-dev": { "egulias/email-validator": "^2.1.10|^3.1|^4", "league/html-to-markdown": "^5.0", "phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0", - "symfony/dependency-injection": "^5.4|^6.0", - "symfony/property-access": "^5.4|^6.0", - "symfony/property-info": "^5.4|^6.0", - "symfony/serializer": "^6.2" + "symfony/dependency-injection": "^5.4|^6.0|^7.0", + "symfony/process": "^5.4|^6.4|^7.0", + "symfony/property-access": "^5.4|^6.0|^7.0", + "symfony/property-info": "^5.4|^6.0|^7.0", + "symfony/serializer": "^6.3.2|^7.0" }, "type": "library", "autoload": { @@ -5484,7 +7333,7 @@ "mime-type" ], "support": { - "source": "https://github.com/symfony/mime/tree/v6.2.5" + "source": "https://github.com/symfony/mime/tree/v6.4.8" }, "funding": [ { @@ -5500,20 +7349,20 @@ "type": "tidelift" } ], - "time": "2023-01-10T18:53:53+00:00" + "time": "2024-06-01T07:50:16+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.27.0", + "version": "v1.30.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "5bbc823adecdae860bb64756d639ecfec17b050a" + "reference": "0424dff1c58f028c451efff2045f5d92410bd540" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/5bbc823adecdae860bb64756d639ecfec17b050a", - "reference": "5bbc823adecdae860bb64756d639ecfec17b050a", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/0424dff1c58f028c451efff2045f5d92410bd540", + "reference": "0424dff1c58f028c451efff2045f5d92410bd540", "shasum": "" }, "require": { @@ -5527,9 +7376,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.27-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -5566,7 +7412,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.30.0" }, "funding": [ { @@ -5582,20 +7428,20 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2024-05-31T15:07:36+00:00" }, { "name": "symfony/polyfill-iconv", - "version": "v1.27.0", + "version": "v1.30.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-iconv.git", - "reference": "927013f3aac555983a5059aada98e1907d842695" + "reference": "c027e6a3c6aee334663ec21f5852e89738abc805" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/927013f3aac555983a5059aada98e1907d842695", - "reference": "927013f3aac555983a5059aada98e1907d842695", + "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/c027e6a3c6aee334663ec21f5852e89738abc805", + "reference": "c027e6a3c6aee334663ec21f5852e89738abc805", "shasum": "" }, "require": { @@ -5609,9 +7455,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.27-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -5649,7 +7492,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-iconv/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-iconv/tree/v1.30.0" }, "funding": [ { @@ -5665,20 +7508,20 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2024-05-31T15:07:36+00:00" }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.27.0", + "version": "v1.30.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "511a08c03c1960e08a883f4cffcacd219b758354" + "reference": "64647a7c30b2283f5d49b874d84a18fc22054b7a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/511a08c03c1960e08a883f4cffcacd219b758354", - "reference": "511a08c03c1960e08a883f4cffcacd219b758354", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/64647a7c30b2283f5d49b874d84a18fc22054b7a", + "reference": "64647a7c30b2283f5d49b874d84a18fc22054b7a", "shasum": "" }, "require": { @@ -5689,9 +7532,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.27-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -5730,7 +7570,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.30.0" }, "funding": [ { @@ -5746,20 +7586,20 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2024-05-31T15:07:36+00:00" }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.27.0", + "version": "v1.30.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "639084e360537a19f9ee352433b84ce831f3d2da" + "reference": "a6e83bdeb3c84391d1dfe16f42e40727ce524a5c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/639084e360537a19f9ee352433b84ce831f3d2da", - "reference": "639084e360537a19f9ee352433b84ce831f3d2da", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/a6e83bdeb3c84391d1dfe16f42e40727ce524a5c", + "reference": "a6e83bdeb3c84391d1dfe16f42e40727ce524a5c", "shasum": "" }, "require": { @@ -5772,9 +7612,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.27-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -5817,7 +7654,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.30.0" }, "funding": [ { @@ -5833,20 +7670,20 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2024-05-31T15:07:36+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.27.0", + "version": "v1.30.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6" + "reference": "a95281b0be0d9ab48050ebd988b967875cdb9fdb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/19bd1e4fcd5b91116f14d8533c57831ed00571b6", - "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/a95281b0be0d9ab48050ebd988b967875cdb9fdb", + "reference": "a95281b0be0d9ab48050ebd988b967875cdb9fdb", "shasum": "" }, "require": { @@ -5857,9 +7694,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.27-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -5901,7 +7735,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.30.0" }, "funding": [ { @@ -5917,20 +7751,20 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2024-05-31T15:07:36+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.27.0", + "version": "v1.30.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534" + "reference": "fd22ab50000ef01661e2a31d850ebaa297f8e03c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534", - "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/fd22ab50000ef01661e2a31d850ebaa297f8e03c", + "reference": "fd22ab50000ef01661e2a31d850ebaa297f8e03c", "shasum": "" }, "require": { @@ -5944,9 +7778,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.27-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -5984,7 +7815,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.30.0" }, "funding": [ { @@ -6000,20 +7831,20 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2024-06-19T12:30:46+00:00" }, { "name": "symfony/polyfill-php72", - "version": "v1.27.0", + "version": "v1.30.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "869329b1e9894268a8a61dabb69153029b7a8c97" + "reference": "10112722600777e02d2745716b70c5db4ca70442" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/869329b1e9894268a8a61dabb69153029b7a8c97", - "reference": "869329b1e9894268a8a61dabb69153029b7a8c97", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/10112722600777e02d2745716b70c5db4ca70442", + "reference": "10112722600777e02d2745716b70c5db4ca70442", "shasum": "" }, "require": { @@ -6021,9 +7852,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.27-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -6060,7 +7888,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php72/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-php72/tree/v1.30.0" }, "funding": [ { @@ -6076,20 +7904,20 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2024-06-19T12:30:46+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.27.0", + "version": "v1.30.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936" + "reference": "77fa7995ac1b21ab60769b7323d600a991a90433" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", - "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/77fa7995ac1b21ab60769b7323d600a991a90433", + "reference": "77fa7995ac1b21ab60769b7323d600a991a90433", "shasum": "" }, "require": { @@ -6097,9 +7925,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.27-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -6143,7 +7968,83 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.30.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-05-31T15:07:36+00:00" + }, + { + "name": "symfony/polyfill-php83", + "version": "v1.30.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php83.git", + "reference": "dbdcdf1a4dcc2743591f1079d0c35ab1e2dcbbc9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php83/zipball/dbdcdf1a4dcc2743591f1079d0c35ab1e2dcbbc9", + "reference": "dbdcdf1a4dcc2743591f1079d0c35ab1e2dcbbc9", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php83\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.3+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php83/tree/v1.30.0" }, "funding": [ { @@ -6159,20 +8060,20 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2024-06-19T12:35:24+00:00" }, { "name": "symfony/polyfill-uuid", - "version": "v1.27.0", + "version": "v1.30.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-uuid.git", - "reference": "f3cf1a645c2734236ed1e2e671e273eeb3586166" + "reference": "2ba1f33797470debcda07fe9dce20a0003df18e9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-uuid/zipball/f3cf1a645c2734236ed1e2e671e273eeb3586166", - "reference": "f3cf1a645c2734236ed1e2e671e273eeb3586166", + "url": "https://api.github.com/repos/symfony/polyfill-uuid/zipball/2ba1f33797470debcda07fe9dce20a0003df18e9", + "reference": "2ba1f33797470debcda07fe9dce20a0003df18e9", "shasum": "" }, "require": { @@ -6186,9 +8087,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.27-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -6225,7 +8123,7 @@ "uuid" ], "support": { - "source": "https://github.com/symfony/polyfill-uuid/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-uuid/tree/v1.30.0" }, "funding": [ { @@ -6241,20 +8139,20 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2024-05-31T15:07:36+00:00" }, { "name": "symfony/process", - "version": "v6.2.5", + "version": "v6.4.8", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "9ead139f63dfa38c4e4a9049cc64a8b2748c83b7" + "reference": "8d92dd79149f29e89ee0f480254db595f6a6a2c5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/9ead139f63dfa38c4e4a9049cc64a8b2748c83b7", - "reference": "9ead139f63dfa38c4e4a9049cc64a8b2748c83b7", + "url": "https://api.github.com/repos/symfony/process/zipball/8d92dd79149f29e89ee0f480254db595f6a6a2c5", + "reference": "8d92dd79149f29e89ee0f480254db595f6a6a2c5", "shasum": "" }, "require": { @@ -6286,7 +8184,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v6.2.5" + "source": "https://github.com/symfony/process/tree/v6.4.8" }, "funding": [ { @@ -6302,24 +8200,25 @@ "type": "tidelift" } ], - "time": "2023-01-01T08:38:09+00:00" + "time": "2024-05-31T14:49:08+00:00" }, { "name": "symfony/routing", - "version": "v6.2.5", + "version": "v6.4.8", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "589bd742d5d03c192c8521911680fe88f61712fe" + "reference": "8a40d0f9b01f0fbb80885d3ce0ad6714fb603a58" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/589bd742d5d03c192c8521911680fe88f61712fe", - "reference": "589bd742d5d03c192c8521911680fe88f61712fe", + "url": "https://api.github.com/repos/symfony/routing/zipball/8a40d0f9b01f0fbb80885d3ce0ad6714fb603a58", + "reference": "8a40d0f9b01f0fbb80885d3ce0ad6714fb603a58", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.1", + "symfony/deprecation-contracts": "^2.5|^3" }, "conflict": { "doctrine/annotations": "<1.12", @@ -6330,17 +8229,11 @@ "require-dev": { "doctrine/annotations": "^1.12|^2", "psr/log": "^1|^2|^3", - "symfony/config": "^6.2", - "symfony/dependency-injection": "^5.4|^6.0", - "symfony/expression-language": "^5.4|^6.0", - "symfony/http-foundation": "^5.4|^6.0", - "symfony/yaml": "^5.4|^6.0" - }, - "suggest": { - "symfony/config": "For using the all-in-one router or any loader", - "symfony/expression-language": "For using expression matching", - "symfony/http-foundation": "For using a Symfony Request object", - "symfony/yaml": "For using the YAML loader" + "symfony/config": "^6.2|^7.0", + "symfony/dependency-injection": "^5.4|^6.0|^7.0", + "symfony/expression-language": "^5.4|^6.0|^7.0", + "symfony/http-foundation": "^5.4|^6.0|^7.0", + "symfony/yaml": "^5.4|^6.0|^7.0" }, "type": "library", "autoload": { @@ -6374,7 +8267,7 @@ "url" ], "support": { - "source": "https://github.com/symfony/routing/tree/v6.2.5" + "source": "https://github.com/symfony/routing/tree/v6.4.8" }, "funding": [ { @@ -6390,36 +8283,34 @@ "type": "tidelift" } ], - "time": "2023-01-01T08:38:09+00:00" + "time": "2024-05-31T14:49:08+00:00" }, { "name": "symfony/service-contracts", - "version": "v3.2.0", + "version": "v3.5.0", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "aac98028c69df04ee77eb69b96b86ee51fbf4b75" + "reference": "bd1d9e59a81d8fa4acdcea3f617c581f7475a80f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/aac98028c69df04ee77eb69b96b86ee51fbf4b75", - "reference": "aac98028c69df04ee77eb69b96b86ee51fbf4b75", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/bd1d9e59a81d8fa4acdcea3f617c581f7475a80f", + "reference": "bd1d9e59a81d8fa4acdcea3f617c581f7475a80f", "shasum": "" }, "require": { "php": ">=8.1", - "psr/container": "^2.0" + "psr/container": "^1.1|^2.0", + "symfony/deprecation-contracts": "^2.5|^3" }, "conflict": { "ext-psr": "<1.1|>=2" }, - "suggest": { - "symfony/service-implementation": "" - }, "type": "library", "extra": { "branch-alias": { - "dev-main": "3.3-dev" + "dev-main": "3.5-dev" }, "thanks": { "name": "symfony/contracts", @@ -6459,7 +8350,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v3.2.0" + "source": "https://github.com/symfony/service-contracts/tree/v3.5.0" }, "funding": [ { @@ -6475,25 +8366,25 @@ "type": "tidelift" } ], - "time": "2022-11-25T10:21:52+00:00" + "time": "2024-04-18T09:32:20+00:00" }, { "name": "symfony/stopwatch", - "version": "v6.2.5", + "version": "v7.1.1", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", - "reference": "00b6ac156aacffc53487c930e0ab14587a6607f6" + "reference": "5b75bb1ac2ba1b9d05c47fc4b3046a625377d23d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/00b6ac156aacffc53487c930e0ab14587a6607f6", - "reference": "00b6ac156aacffc53487c930e0ab14587a6607f6", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/5b75bb1ac2ba1b9d05c47fc4b3046a625377d23d", + "reference": "5b75bb1ac2ba1b9d05c47fc4b3046a625377d23d", "shasum": "" }, "require": { - "php": ">=8.1", - "symfony/service-contracts": "^1|^2|^3" + "php": ">=8.2", + "symfony/service-contracts": "^2.5|^3" }, "type": "library", "autoload": { @@ -6521,7 +8412,7 @@ "description": "Provides a way to profile code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/stopwatch/tree/v6.2.5" + "source": "https://github.com/symfony/stopwatch/tree/v7.1.1" }, "funding": [ { @@ -6537,38 +8428,39 @@ "type": "tidelift" } ], - "time": "2023-01-01T08:36:55+00:00" + "time": "2024-05-31T14:57:53+00:00" }, { "name": "symfony/string", - "version": "v6.2.5", + "version": "v7.1.1", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "b2dac0fa27b1ac0f9c0c0b23b43977f12308d0b0" + "reference": "60bc311c74e0af215101235aa6f471bcbc032df2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/b2dac0fa27b1ac0f9c0c0b23b43977f12308d0b0", - "reference": "b2dac0fa27b1ac0f9c0c0b23b43977f12308d0b0", + "url": "https://api.github.com/repos/symfony/string/zipball/60bc311c74e0af215101235aa6f471bcbc032df2", + "reference": "60bc311c74e0af215101235aa6f471bcbc032df2", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.2", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-intl-grapheme": "~1.0", "symfony/polyfill-intl-normalizer": "~1.0", "symfony/polyfill-mbstring": "~1.0" }, "conflict": { - "symfony/translation-contracts": "<2.0" + "symfony/translation-contracts": "<2.5" }, "require-dev": { - "symfony/error-handler": "^5.4|^6.0", - "symfony/http-client": "^5.4|^6.0", - "symfony/intl": "^6.2", - "symfony/translation-contracts": "^2.0|^3.0", - "symfony/var-exporter": "^5.4|^6.0" + "symfony/emoji": "^7.1", + "symfony/error-handler": "^6.4|^7.0", + "symfony/http-client": "^6.4|^7.0", + "symfony/intl": "^6.4|^7.0", + "symfony/translation-contracts": "^2.5|^3.0", + "symfony/var-exporter": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -6607,7 +8499,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v6.2.5" + "source": "https://github.com/symfony/string/tree/v7.1.1" }, "funding": [ { @@ -6623,32 +8515,35 @@ "type": "tidelift" } ], - "time": "2023-01-01T08:38:09+00:00" + "time": "2024-06-04T06:40:14+00:00" }, { "name": "symfony/translation", - "version": "v6.2.5", + "version": "v6.4.8", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "60556925a703cfbc1581cde3b3f35b0bb0ea904c" + "reference": "a002933b13989fc4bd0b58e04bf7eec5210e438a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/60556925a703cfbc1581cde3b3f35b0bb0ea904c", - "reference": "60556925a703cfbc1581cde3b3f35b0bb0ea904c", + "url": "https://api.github.com/repos/symfony/translation/zipball/a002933b13989fc4bd0b58e04bf7eec5210e438a", + "reference": "a002933b13989fc4bd0b58e04bf7eec5210e438a", "shasum": "" }, "require": { "php": ">=8.1", + "symfony/deprecation-contracts": "^2.5|^3", "symfony/polyfill-mbstring": "~1.0", - "symfony/translation-contracts": "^2.3|^3.0" + "symfony/translation-contracts": "^2.5|^3.0" }, "conflict": { "symfony/config": "<5.4", "symfony/console": "<5.4", "symfony/dependency-injection": "<5.4", + "symfony/http-client-contracts": "<2.5", "symfony/http-kernel": "<5.4", + "symfony/service-contracts": "<2.5", "symfony/twig-bundle": "<5.4", "symfony/yaml": "<5.4" }, @@ -6656,25 +8551,19 @@ "symfony/translation-implementation": "2.3|3.0" }, "require-dev": { - "nikic/php-parser": "^4.13", + "nikic/php-parser": "^4.18|^5.0", "psr/log": "^1|^2|^3", - "symfony/config": "^5.4|^6.0", - "symfony/console": "^5.4|^6.0", - "symfony/dependency-injection": "^5.4|^6.0", - "symfony/finder": "^5.4|^6.0", - "symfony/http-client-contracts": "^1.1|^2.0|^3.0", - "symfony/http-kernel": "^5.4|^6.0", - "symfony/intl": "^5.4|^6.0", + "symfony/config": "^5.4|^6.0|^7.0", + "symfony/console": "^5.4|^6.0|^7.0", + "symfony/dependency-injection": "^5.4|^6.0|^7.0", + "symfony/finder": "^5.4|^6.0|^7.0", + "symfony/http-client-contracts": "^2.5|^3.0", + "symfony/http-kernel": "^5.4|^6.0|^7.0", + "symfony/intl": "^5.4|^6.0|^7.0", "symfony/polyfill-intl-icu": "^1.21", - "symfony/routing": "^5.4|^6.0", - "symfony/service-contracts": "^1.1.2|^2|^3", - "symfony/yaml": "^5.4|^6.0" - }, - "suggest": { - "nikic/php-parser": "To use PhpAstExtractor", - "psr/log-implementation": "To use logging capability in translator", - "symfony/config": "", - "symfony/yaml": "" + "symfony/routing": "^5.4|^6.0|^7.0", + "symfony/service-contracts": "^2.5|^3", + "symfony/yaml": "^5.4|^6.0|^7.0" }, "type": "library", "autoload": { @@ -6705,7 +8594,7 @@ "description": "Provides tools to internationalize your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/translation/tree/v6.2.5" + "source": "https://github.com/symfony/translation/tree/v6.4.8" }, "funding": [ { @@ -6721,32 +8610,29 @@ "type": "tidelift" } ], - "time": "2023-01-05T07:00:27+00:00" + "time": "2024-05-31T14:49:08+00:00" }, { "name": "symfony/translation-contracts", - "version": "v3.2.0", + "version": "v3.5.0", "source": { "type": "git", "url": "https://github.com/symfony/translation-contracts.git", - "reference": "68cce71402305a015f8c1589bfada1280dc64fe7" + "reference": "b9d2189887bb6b2e0367a9fc7136c5239ab9b05a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/68cce71402305a015f8c1589bfada1280dc64fe7", - "reference": "68cce71402305a015f8c1589bfada1280dc64fe7", + "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/b9d2189887bb6b2e0367a9fc7136c5239ab9b05a", + "reference": "b9d2189887bb6b2e0367a9fc7136c5239ab9b05a", "shasum": "" }, "require": { "php": ">=8.1" }, - "suggest": { - "symfony/translation-implementation": "" - }, "type": "library", "extra": { "branch-alias": { - "dev-main": "3.3-dev" + "dev-main": "3.5-dev" }, "thanks": { "name": "symfony/contracts", @@ -6786,7 +8672,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/translation-contracts/tree/v3.2.0" + "source": "https://github.com/symfony/translation-contracts/tree/v3.5.0" }, "funding": [ { @@ -6802,20 +8688,20 @@ "type": "tidelift" } ], - "time": "2022-11-25T10:21:52+00:00" + "time": "2024-04-18T09:32:20+00:00" }, { "name": "symfony/uid", - "version": "v6.2.5", + "version": "v6.4.8", "source": { "type": "git", "url": "https://github.com/symfony/uid.git", - "reference": "8ace895bded57d6496638c9b2d3b788e05b7395b" + "reference": "35904eca37a84bb764c560cbfcac9f0ac2bcdbdf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/uid/zipball/8ace895bded57d6496638c9b2d3b788e05b7395b", - "reference": "8ace895bded57d6496638c9b2d3b788e05b7395b", + "url": "https://api.github.com/repos/symfony/uid/zipball/35904eca37a84bb764c560cbfcac9f0ac2bcdbdf", + "reference": "35904eca37a84bb764c560cbfcac9f0ac2bcdbdf", "shasum": "" }, "require": { @@ -6823,7 +8709,7 @@ "symfony/polyfill-uuid": "^1.15" }, "require-dev": { - "symfony/console": "^5.4|^6.0" + "symfony/console": "^5.4|^6.0|^7.0" }, "type": "library", "autoload": { @@ -6860,7 +8746,7 @@ "uuid" ], "support": { - "source": "https://github.com/symfony/uid/tree/v6.2.5" + "source": "https://github.com/symfony/uid/tree/v6.4.8" }, "funding": [ { @@ -6876,42 +8762,39 @@ "type": "tidelift" } ], - "time": "2023-01-01T08:38:09+00:00" + "time": "2024-05-31T14:49:08+00:00" }, { "name": "symfony/var-dumper", - "version": "v6.2.5", + "version": "v6.4.8", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "44b7b81749fd20c1bdf4946c041050e22bc8da27" + "reference": "ad23ca4312395f0a8a8633c831ef4c4ee542ed25" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/44b7b81749fd20c1bdf4946c041050e22bc8da27", - "reference": "44b7b81749fd20c1bdf4946c041050e22bc8da27", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/ad23ca4312395f0a8a8633c831ef4c4ee542ed25", + "reference": "ad23ca4312395f0a8a8633c831ef4c4ee542ed25", "shasum": "" }, "require": { "php": ">=8.1", + "symfony/deprecation-contracts": "^2.5|^3", "symfony/polyfill-mbstring": "~1.0" }, "conflict": { - "phpunit/phpunit": "<5.4.3", "symfony/console": "<5.4" }, "require-dev": { "ext-iconv": "*", - "symfony/console": "^5.4|^6.0", - "symfony/process": "^5.4|^6.0", - "symfony/uid": "^5.4|^6.0", + "symfony/console": "^5.4|^6.0|^7.0", + "symfony/error-handler": "^6.3|^7.0", + "symfony/http-kernel": "^5.4|^6.0|^7.0", + "symfony/process": "^5.4|^6.0|^7.0", + "symfony/uid": "^5.4|^6.0|^7.0", "twig/twig": "^2.13|^3.0.4" }, - "suggest": { - "ext-iconv": "To convert non-UTF-8 strings to UTF-8 (or symfony/polyfill-iconv in case ext-iconv cannot be used).", - "ext-intl": "To show region name in time zone dump", - "symfony/console": "To use the ServerDumpCommand and/or the bin/var-dump-server script" - }, "bin": [ "Resources/bin/var-dump-server" ], @@ -6948,7 +8831,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v6.2.5" + "source": "https://github.com/symfony/var-dumper/tree/v6.4.8" }, "funding": [ { @@ -6964,34 +8847,32 @@ "type": "tidelift" } ], - "time": "2023-01-20T17:45:48+00:00" + "time": "2024-05-31T14:49:08+00:00" }, { "name": "symfony/yaml", - "version": "v6.2.5", + "version": "v6.4.8", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "2bbfbdacc8a15574f8440c4838ce0d7bb6c86b19" + "reference": "52903de178d542850f6f341ba92995d3d63e60c9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/2bbfbdacc8a15574f8440c4838ce0d7bb6c86b19", - "reference": "2bbfbdacc8a15574f8440c4838ce0d7bb6c86b19", + "url": "https://api.github.com/repos/symfony/yaml/zipball/52903de178d542850f6f341ba92995d3d63e60c9", + "reference": "52903de178d542850f6f341ba92995d3d63e60c9", "shasum": "" }, "require": { "php": ">=8.1", + "symfony/deprecation-contracts": "^2.5|^3", "symfony/polyfill-ctype": "^1.8" }, "conflict": { "symfony/console": "<5.4" }, "require-dev": { - "symfony/console": "^5.4|^6.0" - }, - "suggest": { - "symfony/console": "For validating YAML files using the lint command" + "symfony/console": "^5.4|^6.0|^7.0" }, "bin": [ "Resources/bin/yaml-lint" @@ -7022,7 +8903,7 @@ "description": "Loads and dumps YAML files", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/yaml/tree/v6.2.5" + "source": "https://github.com/symfony/yaml/tree/v6.4.8" }, "funding": [ { @@ -7038,20 +8919,20 @@ "type": "tidelift" } ], - "time": "2023-01-10T18:53:53+00:00" + "time": "2024-05-31T14:49:08+00:00" }, { "name": "theseer/tokenizer", - "version": "1.2.1", + "version": "1.2.3", "source": { "type": "git", "url": "https://github.com/theseer/tokenizer.git", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" + "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", + "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", "shasum": "" }, "require": { @@ -7080,7 +8961,7 @@ "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", "support": { "issues": "https://github.com/theseer/tokenizer/issues", - "source": "https://github.com/theseer/tokenizer/tree/1.2.1" + "source": "https://github.com/theseer/tokenizer/tree/1.2.3" }, "funding": [ { @@ -7088,27 +8969,27 @@ "type": "github" } ], - "time": "2021-07-28T10:34:58+00:00" + "time": "2024-03-03T12:36:25+00:00" }, { "name": "tijsverkoyen/css-to-inline-styles", - "version": "2.2.6", + "version": "v2.2.7", "source": { "type": "git", "url": "https://github.com/tijsverkoyen/CssToInlineStyles.git", - "reference": "c42125b83a4fa63b187fdf29f9c93cb7733da30c" + "reference": "83ee6f38df0a63106a9e4536e3060458b74ccedb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/tijsverkoyen/CssToInlineStyles/zipball/c42125b83a4fa63b187fdf29f9c93cb7733da30c", - "reference": "c42125b83a4fa63b187fdf29f9c93cb7733da30c", + "url": "https://api.github.com/repos/tijsverkoyen/CssToInlineStyles/zipball/83ee6f38df0a63106a9e4536e3060458b74ccedb", + "reference": "83ee6f38df0a63106a9e4536e3060458b74ccedb", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", "php": "^5.5 || ^7.0 || ^8.0", - "symfony/css-selector": "^2.7 || ^3.0 || ^4.0 || ^5.0 || ^6.0" + "symfony/css-selector": "^2.7 || ^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0" }, "require-dev": { "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0 || ^7.5 || ^8.5.21 || ^9.5.10" @@ -7139,37 +9020,37 @@ "homepage": "https://github.com/tijsverkoyen/CssToInlineStyles", "support": { "issues": "https://github.com/tijsverkoyen/CssToInlineStyles/issues", - "source": "https://github.com/tijsverkoyen/CssToInlineStyles/tree/2.2.6" + "source": "https://github.com/tijsverkoyen/CssToInlineStyles/tree/v2.2.7" }, - "time": "2023-01-03T09:29:04+00:00" + "time": "2023-12-08T13:03:43+00:00" }, { "name": "vlucas/phpdotenv", - "version": "v5.5.0", + "version": "v5.6.0", "source": { "type": "git", "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "1a7ea2afc49c3ee6d87061f5a233e3a035d0eae7" + "reference": "2cf9fb6054c2bb1d59d1f3817706ecdb9d2934c4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/1a7ea2afc49c3ee6d87061f5a233e3a035d0eae7", - "reference": "1a7ea2afc49c3ee6d87061f5a233e3a035d0eae7", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/2cf9fb6054c2bb1d59d1f3817706ecdb9d2934c4", + "reference": "2cf9fb6054c2bb1d59d1f3817706ecdb9d2934c4", "shasum": "" }, "require": { "ext-pcre": "*", - "graham-campbell/result-type": "^1.0.2", - "php": "^7.1.3 || ^8.0", - "phpoption/phpoption": "^1.8", - "symfony/polyfill-ctype": "^1.23", - "symfony/polyfill-mbstring": "^1.23.1", - "symfony/polyfill-php80": "^1.23.1" + "graham-campbell/result-type": "^1.1.2", + "php": "^7.2.5 || ^8.0", + "phpoption/phpoption": "^1.9.2", + "symfony/polyfill-ctype": "^1.24", + "symfony/polyfill-mbstring": "^1.24", + "symfony/polyfill-php80": "^1.24" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.4.1", + "bamarni/composer-bin-plugin": "^1.8.2", "ext-filter": "*", - "phpunit/phpunit": "^7.5.20 || ^8.5.30 || ^9.5.25" + "phpunit/phpunit": "^8.5.34 || ^9.6.13 || ^10.4.2" }, "suggest": { "ext-filter": "Required to use the boolean validator." @@ -7181,7 +9062,7 @@ "forward-command": true }, "branch-alias": { - "dev-master": "5.5-dev" + "dev-master": "5.6-dev" } }, "autoload": { @@ -7213,7 +9094,7 @@ ], "support": { "issues": "https://github.com/vlucas/phpdotenv/issues", - "source": "https://github.com/vlucas/phpdotenv/tree/v5.5.0" + "source": "https://github.com/vlucas/phpdotenv/tree/v5.6.0" }, "funding": [ { @@ -7225,7 +9106,7 @@ "type": "tidelift" } ], - "time": "2022-10-16T01:01:54+00:00" + "time": "2023-11-12T22:43:29+00:00" }, { "name": "voku/portable-ascii", @@ -7361,16 +9242,16 @@ }, { "name": "zbateson/mail-mime-parser", - "version": "2.4.0", + "version": "2.4.1", "source": { "type": "git", "url": "https://github.com/zbateson/mail-mime-parser.git", - "reference": "20b3e48eb799537683780bc8782fbbe9bc25934a" + "reference": "ff49e02f6489b38f7cc3d1bd3971adc0f872569c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zbateson/mail-mime-parser/zipball/20b3e48eb799537683780bc8782fbbe9bc25934a", - "reference": "20b3e48eb799537683780bc8782fbbe9bc25934a", + "url": "https://api.github.com/repos/zbateson/mail-mime-parser/zipball/ff49e02f6489b38f7cc3d1bd3971adc0f872569c", + "reference": "ff49e02f6489b38f7cc3d1bd3971adc0f872569c", "shasum": "" }, "require": { @@ -7432,20 +9313,20 @@ "type": "github" } ], - "time": "2023-02-14T22:58:03+00:00" + "time": "2024-04-28T00:58:54+00:00" }, { "name": "zbateson/mb-wrapper", - "version": "1.2.0", + "version": "1.2.1", "source": { "type": "git", "url": "https://github.com/zbateson/mb-wrapper.git", - "reference": "faf35dddfacfc5d4d5f9210143eafd7a7fe74334" + "reference": "09a8b77eb94af3823a9a6623dcc94f8d988da67f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zbateson/mb-wrapper/zipball/faf35dddfacfc5d4d5f9210143eafd7a7fe74334", - "reference": "faf35dddfacfc5d4d5f9210143eafd7a7fe74334", + "url": "https://api.github.com/repos/zbateson/mb-wrapper/zipball/09a8b77eb94af3823a9a6623dcc94f8d988da67f", + "reference": "09a8b77eb94af3823a9a6623dcc94f8d988da67f", "shasum": "" }, "require": { @@ -7456,7 +9337,7 @@ "require-dev": { "friendsofphp/php-cs-fixer": "*", "phpstan/phpstan": "*", - "phpunit/phpunit": "<=9.0" + "phpunit/phpunit": "<10.0" }, "suggest": { "ext-iconv": "For best support/performance", @@ -7493,7 +9374,7 @@ ], "support": { "issues": "https://github.com/zbateson/mb-wrapper/issues", - "source": "https://github.com/zbateson/mb-wrapper/tree/1.2.0" + "source": "https://github.com/zbateson/mb-wrapper/tree/1.2.1" }, "funding": [ { @@ -7501,31 +9382,31 @@ "type": "github" } ], - "time": "2023-01-11T23:05:44+00:00" + "time": "2024-03-18T04:31:04+00:00" }, { "name": "zbateson/stream-decorators", - "version": "1.1.0", + "version": "1.2.1", "source": { "type": "git", "url": "https://github.com/zbateson/stream-decorators.git", - "reference": "7466ff45d249c86b96267a83cdae68365ae1787e" + "reference": "783b034024fda8eafa19675fb2552f8654d3a3e9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zbateson/stream-decorators/zipball/7466ff45d249c86b96267a83cdae68365ae1787e", - "reference": "7466ff45d249c86b96267a83cdae68365ae1787e", + "url": "https://api.github.com/repos/zbateson/stream-decorators/zipball/783b034024fda8eafa19675fb2552f8654d3a3e9", + "reference": "783b034024fda8eafa19675fb2552f8654d3a3e9", "shasum": "" }, "require": { "guzzlehttp/psr7": "^1.9 | ^2.0", - "php": ">=7.1", + "php": ">=7.2", "zbateson/mb-wrapper": "^1.0.0" }, "require-dev": { "friendsofphp/php-cs-fixer": "*", "phpstan/phpstan": "*", - "phpunit/phpunit": "<=9.0" + "phpunit/phpunit": "<10.0" }, "type": "library", "autoload": { @@ -7556,7 +9437,7 @@ ], "support": { "issues": "https://github.com/zbateson/stream-decorators/issues", - "source": "https://github.com/zbateson/stream-decorators/tree/1.1.0" + "source": "https://github.com/zbateson/stream-decorators/tree/1.2.1" }, "funding": [ { @@ -7564,7 +9445,7 @@ "type": "github" } ], - "time": "2023-01-11T23:22:44+00:00" + "time": "2023-05-30T22:51:52+00:00" } ], "aliases": [], @@ -7574,5 +9455,5 @@ "prefer-lowest": false, "platform": [], "platform-dev": [], - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.6.0" } diff --git a/config/config.php b/config/config.php index 881ab67..9c02f5f 100644 --- a/config/config.php +++ b/config/config.php @@ -1,2 +1,6 @@ false, + 'population_model' => '\Guava\LaravelPopulator\Models\Population', +]; diff --git a/database/factories/PopulationFactory.php b/database/factories/PopulationFactory.php new file mode 100644 index 0000000..49761b4 --- /dev/null +++ b/database/factories/PopulationFactory.php @@ -0,0 +1,23 @@ + + */ +class PopulationFactory extends Factory +{ + protected $model = Population::class; + + public function definition(): array + { + return [ + 'populator' => $this->faker->slug(), + 'key' => $this->faker->unique()->sha1(), + 'bundle' => $this->faker->unique()->sha1(), + ]; + } +} diff --git a/database/migrations/2024_06_22_000001_create_populations.php b/database/migrations/2024_06_22_000001_create_populations.php new file mode 100644 index 0000000..e78582e --- /dev/null +++ b/database/migrations/2024_06_22_000001_create_populations.php @@ -0,0 +1,28 @@ +id(); + $table->timestamps(); + $table->string('populator'); + $table->string('bundle'); + $table->string('key'); + $table->morphs('populatable'); + // $table->unique(['populatable_type', 'populatable_id']); + }); + } + + public function down(): void + { + Schema::dropIfExists('populations'); + } +}; diff --git a/phpstan.neon b/phpstan.neon new file mode 100644 index 0000000..15f531b --- /dev/null +++ b/phpstan.neon @@ -0,0 +1,16 @@ +includes: + - vendor/larastan/larastan/extension.neon +parameters: + noModelMake: false + paths: + - src + - config + - database + # Level 9 is the highest level + level: 6 + typeAliases: + PopulatorArray: 'array' + PopulatorCollection: 'Collection' + PopulatorData: 'PopulatorArray|PopulatorCollection' + reportUnmatchedIgnoredErrors: false + ignoreErrors: diff --git a/phpunit.xml b/phpunit.xml new file mode 100644 index 0000000..5d29de8 --- /dev/null +++ b/phpunit.xml @@ -0,0 +1,27 @@ + + + + + tests/Unit + + + tests/Feature + + + + + + src + + + + + + + + + diff --git a/pint.json b/pint.json new file mode 100644 index 0000000..2a63655 --- /dev/null +++ b/pint.json @@ -0,0 +1,13 @@ +{ + "preset": "laravel", + "rules": { + "method_argument_space": true, + "multiline_whitespace_before_semicolons": { + "strategy": "new_line_for_chained_calls" + }, + "types_spaces": { + "space": "single" + }, + "concat_space": false + } +} \ No newline at end of file diff --git a/src/Bundle.php b/src/Bundle.php index bc2ff15..3af850b 100644 --- a/src/Bundle.php +++ b/src/Bundle.php @@ -2,6 +2,7 @@ namespace Guava\LaravelPopulator; +use Closure; use Exception; use Guava\LaravelPopulator\Concerns\Bundle\HasDefaults; use Guava\LaravelPopulator\Concerns\Bundle\HasGenerators; @@ -9,6 +10,9 @@ use Guava\LaravelPopulator\Concerns\Bundle\HasRecords; use Guava\LaravelPopulator\Concerns\HasEnvironments; use Guava\LaravelPopulator\Concerns\HasName; +use Guava\LaravelPopulator\Concerns\HasPipeline; +use Guava\LaravelPopulator\Contracts\InteractsWithBundleInsert; +use Guava\LaravelPopulator\Contracts\InteractsWithPipeline; use Illuminate\Database\Eloquent\Model; use Illuminate\Support\Facades\File; use Illuminate\Support\Str; @@ -18,49 +22,46 @@ */ class Bundle { - use HasName; - use HasEnvironments; - use HasDefaults; - use HasMutators; + use HasEnvironments; use HasGenerators; + use HasMutators; + use HasName; + use HasPipeline; use HasRecords; public Model $model; + public string $table; public Populator $populator; - /** - * Can be used to set up repeating samples. - * - * @return void - */ - public function setup(): void - { - } + protected ?Closure $makeProcessorUsing = null; + + protected null | Closure | InteractsWithPipeline $performInsertUsing = null; /** * Parses all samples from the populators directory and attempts to insert them into the database. - * @param Populator $populator - * @return void + * * @throws Exception */ public function handle(Populator $populator): void { - if (!$this->checkEnvironment()) { + if (! $this->checkEnvironment()) { return; } $this->populator = $populator; - if (!empty($this->records)) { + if (! empty($this->records)) { collect($this->records) ->each(function (array $record, $key) { - $modelName = $this->model::class; - Processor::make($this) - ->process($record, is_int($key) ? "{$modelName}-$key" : $key); - }); + $this->makeProcessor() + ->pipeableUsing($this->populator->getPipeable() ?? $this->getPipeable()) + ->process($record, $key) + ; + }) + ; return; } @@ -72,51 +73,88 @@ public function handle(Populator $populator): void database_path("populators/{$populator->getName()}/{$singular}"), ]); - $found = false; - - $paths - ->filter(fn($path) => File::exists($path)) - ->each(function ($path) use (&$found) { - if ($found) return; - $found = true; + $found = $paths + ->filter(fn ($path) => File::exists($path)) + ->first() + ; + if ($found) { + collect(File::files($found)) + ->each(function (\SplFileInfo $file) { + $data = include $file->getPathname(); + $name = str($file->getFilename()) + ->beforeLast('.') + ->toString() + ; + + $this->makeProcessor() + ->pipeableUsing($this->getPipeable() ?? $this->populator->getPipeable()) + ->process($data, $name) + ; + }) + ; + } else { + $modelName = $this->model::class; + throw new Exception("A directory for the bundle of '$modelName' does not exist. Please make sure to create one of the following directories: \n" . $paths->map(fn ($path) => str($path)->prepend("\t - "))->implode("\n")); + } + } - collect(File::files($path)) - ->each(function (\SplFileInfo $file) { - $data = include $file->getPathname(); - $name = str($file->getFilename()) - ->beforeLast('.') - ->toString(); + /** + * Custom @Processor instantiation by closure + * + * @param Closure():Processor|null $closure + * @return $this + */ + public function makeProcessorUsing(?Closure $closure): static + { + $this->makeProcessorUsing = $closure; - Processor::make($this) - ->process($data, $name); - }); - }); + return $this; + } - if (!$found) { - $modelName = $this->model::class; - throw new Exception("A directory for the bundle of '$modelName' does not exist. Please make sure to create one of the following directories: \n" . $paths->map(fn($path) => str($path)->prepend("\t - "))->implode("\n")); + /** + * Instantiates @return Processor + * + * @see Processor to process the bundle + */ + protected function makeProcessor(): Processor + { + if ($factory = $this->makeProcessorUsing) { + $processor = $factory($this); + } else { + $processor = Processor::make($this); } + + return $processor->performInsertUsing($this->performInsertUsing); + } + + /** + * Custom @Model insertion by closure which needs to return the key for the model, typically by + * `getKey()` operation on the model. + * + * @param InteractsWithBundleInsert|Closure(array,Bundle):(string|int)|null $closure + * @return $this + */ + public function performInsertUsing(null | InteractsWithBundleInsert | Closure $closure): static + { + $this->performInsertUsing = $closure; + + return $this; } /** * Creates an instance of the class. */ - private final function __construct(string $model, string $name = null) + final private function __construct(string $model, ?string $name = null) { $this->model = new $model; $this->name = $name; $this->table = $this->model->getTable(); } - /** * Static factory to create an instance of the class. - * - * @param string $model - * @param string|null $name - * @return static */ - public static function make(string $model, string $name = null): static + public static function make(string $model, ?string $name = null): static { return new static($model, $name); } diff --git a/src/Concerns/Bundle/HasDefaults.php b/src/Concerns/Bundle/HasDefaults.php index 35762d0..63b31b0 100644 --- a/src/Concerns/Bundle/HasDefaults.php +++ b/src/Concerns/Bundle/HasDefaults.php @@ -2,16 +2,20 @@ namespace Guava\LaravelPopulator\Concerns\Bundle; +use Closure; + trait HasDefaults { - + /** + * @var array + */ public array $defaults = []; /** * Adds a default attribute to the record. * - * @param string $attribute Name of the attribute. - * @param mixed $closure Callback to run on the attribute. + * @param string $attribute Name of the attribute. + * @param mixed $closure Callback to run on the attribute. * @return $this */ public function default(string $attribute, mixed $closure): static diff --git a/src/Concerns/Bundle/HasGenerators.php b/src/Concerns/Bundle/HasGenerators.php index bd79060..0a393b4 100644 --- a/src/Concerns/Bundle/HasGenerators.php +++ b/src/Concerns/Bundle/HasGenerators.php @@ -6,14 +6,16 @@ trait HasGenerators { - + /** + * @var array):scalar> + */ public array $generators = []; /** * Adds a generated attribute to the record. * - * @param string $attribute Name of the attribute. - * @param Closure $closure Callback to run on the attribute. + * @param string $attribute Name of the attribute. + * @param Closure(array):scalar $closure Callback to run on the attribute. * @return $this */ public function generate(string $attribute, Closure $closure): static diff --git a/src/Concerns/Bundle/HasMutators.php b/src/Concerns/Bundle/HasMutators.php index 62232ca..d36c1e2 100644 --- a/src/Concerns/Bundle/HasMutators.php +++ b/src/Concerns/Bundle/HasMutators.php @@ -6,14 +6,16 @@ trait HasMutators { - + /** + * @var array + */ public array $mutators = []; /** * Mutates the specified attribute using the given callback. * - * @param string $attribute Attribute to mutate. - * @param Closure $closure Callback to run on the attribute. + * @param string $attribute Attribute to mutate. + * @param Closure(scalar):scalar $closure Callback to run on the attribute. * @return $this */ public function mutate(string $attribute, Closure $closure): static diff --git a/src/Concerns/Bundle/HasRecords.php b/src/Concerns/Bundle/HasRecords.php index 6d8e99d..42ff2d7 100644 --- a/src/Concerns/Bundle/HasRecords.php +++ b/src/Concerns/Bundle/HasRecords.php @@ -6,16 +6,18 @@ trait HasRecords { + /** + * @var array> + */ public array $records = []; /** * Adds a record to the bundle for population. * - * @param string $key Key to access the record by from other records. - * @param array|Closure $record Data to populate the record with or closure returning the data. - * @return static + * @param string $key Key to access the record by from other records. + * @param array|Closure():array $record Data to populate the record with or closure returning the data. */ - public function record(string $key, array|Closure $record): static + public function record(string $key, array | Closure $record): static { $this->records[$key] = is_callable($record) ? $record() : $record; @@ -25,10 +27,9 @@ public function record(string $key, array|Closure $record): static /** * Adds an array of records to the bundle for population. * - * @param array|Closure $records Records to populate the bundle with or closure returning the records. - * @return static + * @param array|Closure():array $records Records to populate the bundle with or closure returning the records. */ - public function records(array|Closure $records): static + public function records(array | Closure $records): static { $this->records = is_callable($records) ? $records() : $records; diff --git a/src/Concerns/HasData.php b/src/Concerns/HasData.php new file mode 100644 index 0000000..c9e8065 --- /dev/null +++ b/src/Concerns/HasData.php @@ -0,0 +1,13 @@ + + */ + protected Collection $data; +} diff --git a/src/Concerns/HasEnvironments.php b/src/Concerns/HasEnvironments.php index 89454a1..58640b1 100644 --- a/src/Concerns/HasEnvironments.php +++ b/src/Concerns/HasEnvironments.php @@ -4,12 +4,15 @@ trait HasEnvironments { + /** + * @var string[] + */ public array $environments = []; /** * Sets the allowed environments. * - * @param array $environments + * @param string[] $environments * @return $this */ public function environments(array $environments): static @@ -22,7 +25,7 @@ public function environments(array $environments): static /** * Returns the allowed environments. * - * @return array + * @return string[] */ public function getEnvironments(): array { @@ -31,12 +34,9 @@ public function getEnvironments(): array /** * Checks whether the environment is valid. - * - * @return bool */ public function checkEnvironment(): bool { return empty($this->getEnvironments()) || app()->environment($this->getEnvironments()); } - } diff --git a/src/Concerns/HasName.php b/src/Concerns/HasName.php index 2b89203..3b87cc2 100644 --- a/src/Concerns/HasName.php +++ b/src/Concerns/HasName.php @@ -4,16 +4,12 @@ trait HasName { - public string|null $name; + public ?string $name; /** * Returns the name of the class. - * - * @param string|null $class - * @param bool $withNamespace - * @return string */ - public function getName(string $class = null, bool $withNamespace = false): string + public function getName(?string $class = null, bool $withNamespace = false): string { if ($this->name) { return $this->name; @@ -21,10 +17,11 @@ public function getName(string $class = null, bool $withNamespace = false): stri $class = $class ?? static::class; $class = $withNamespace ? str($class)->replace('\\', '.') : class_basename($class); + return str($class) - ->whenEndsWith('Populator', fn($str) => $str->replaceLast('Populator', '')) + ->whenEndsWith('Populator', fn ($str) => $str->replaceLast('Populator', '')) ->kebab() - ->toString(); + ->toString() + ; } - } diff --git a/src/Concerns/HasPipeline.php b/src/Concerns/HasPipeline.php new file mode 100644 index 0000000..1e5294d --- /dev/null +++ b/src/Concerns/HasPipeline.php @@ -0,0 +1,24 @@ +pipeable = $withPipeline; + } + + return $this; + } + + public function getPipeable(): ?InteractsWithPipeline + { + return $this->pipeable; + } +} diff --git a/src/Concerns/HasPopulation.php b/src/Concerns/HasPopulation.php new file mode 100644 index 0000000..3ffb722 --- /dev/null +++ b/src/Concerns/HasPopulation.php @@ -0,0 +1,23 @@ + + */ + public function population(): MorphOne + { + return $this->morphOne(Population::class, 'populatable'); + } +} diff --git a/src/Concerns/Pipe/DefaultsPipe.php b/src/Concerns/Pipe/DefaultsPipe.php index ea626b0..d1f0786 100644 --- a/src/Concerns/Pipe/DefaultsPipe.php +++ b/src/Concerns/Pipe/DefaultsPipe.php @@ -6,28 +6,32 @@ trait DefaultsPipe { - /** * Adds default values for attributes that are not set. * - * @param Collection $data - * @return Collection + * @param Collection $data + * @return Collection */ - protected function defaults(Collection $data): Collection + public function defaults(Collection $data): Collection { return $data - ->when($this->bundle->model->usesTimestamps(), - fn(Collection $collection) => $collection->merge([ + ->when( + $this->bundle->model->usesTimestamps(), + fn (Collection $collection) => $collection->merge([ 'created_at' => now(), 'updated_at' => now(), - ])) - ->when(fn() => !empty($this->bundle->defaults), - fn(Collection $collection) => $collection->merge( + ]) + ) + ->when( + fn () => ! empty($this->bundle->defaults), + fn (Collection $collection) => $collection->merge( collect($this->bundle->defaults) - ->filter(fn($item, $key) => !$data->has($key)) + ->filter(fn ($item, $key) => ! $data->has($key)) ->map(function ($value) { return is_callable($value) ? $value() : $value; }) - )); + ) + ) + ; } } diff --git a/src/Concerns/Pipe/GeneratorsPipe.php b/src/Concerns/Pipe/GeneratorsPipe.php index 463c676..bbc5ffe 100644 --- a/src/Concerns/Pipe/GeneratorsPipe.php +++ b/src/Concerns/Pipe/GeneratorsPipe.php @@ -6,23 +6,25 @@ trait GeneratorsPipe { - /** * Adds default values for attributes that are not set. * - * @param Collection $data - * @return Collection + * @param Collection $data + * @return Collection */ - protected function generators(Collection $data): Collection + public function generators(Collection $data): Collection { return $data - ->when(fn() => !empty($this->bundle->generators), - fn(Collection $collection) => $collection->merge( + ->when( + fn () => ! empty($this->bundle->generators), + fn (Collection $collection) => $collection->merge( collect($this->bundle->generators) - ->filter(fn($item, $key) => !$data->has($key)) + ->filter(fn ($item, $key) => ! $data->has($key)) ->map(fn ($value) => app()->call($value, [ - 'attributes' => $data->toArray() + 'attributes' => $data->toArray(), ])) - )); + ) + ) + ; } } diff --git a/src/Concerns/Pipe/InsertPipe.php b/src/Concerns/Pipe/InsertPipe.php index 5023ac8..7838cc7 100644 --- a/src/Concerns/Pipe/InsertPipe.php +++ b/src/Concerns/Pipe/InsertPipe.php @@ -2,29 +2,79 @@ namespace Guava\LaravelPopulator\Concerns\Pipe; +use Closure; +use Guava\LaravelPopulator\Bundle; +use Guava\LaravelPopulator\Contracts\InteractsWithBundleInsert; +use Guava\LaravelPopulator\Exceptions\InvalidBundleException; use Illuminate\Support\Collection; use Illuminate\Support\Facades\DB; trait InsertPipe { + protected ?InteractsWithBundleInsert $performInsertUsing = null; + /** * Inserts the model into the database. * - * @param Collection $data - * @return Collection + * @param Collection $data + * @return Collection + * + * @throws InvalidBundleException + */ + public function insert(Collection $data): Collection + { + $id = $this->insertBundle($data->toArray(), $this->bundle); + throw_unless($id, InvalidBundleException::class, 'insertBundle cannot return a blank value'); + $this->bundle->populator->memory->set($this->bundle->model::class, $this->name, $id); + + return $data; + } + + /** + * @param array $data */ - protected function insert(Collection $data): Collection + public function insertBundle(array $data, Bundle $bundle): int|string { - $id = DB::table($this->bundle->table) - ->insertGetId($data->toArray()); + if ($this->performInsertUsing) { + return $this->performInsertUsing->insertDataFromBundle($data, $bundle); + } + $id = DB::table($bundle->table) + ->insertGetId($data); // Get the ID if it's not auto incrementing - if (!$this->bundle->model->getIncrementing()) { - $id = $data->get($this->bundle->model->getKeyName()); + if (!$bundle->model->getIncrementing()) { + return data_get($data, $bundle->model->getKeyName()); } - $this->bundle->populator->memory->set($this->bundle->model::class, $this->name, $id); + return $id; + } - return $data; + /** + * @param Closure(array,Bundle):(int|string)|InteractsWithBundleInsert|null $withBundleInsert + * @return $this + */ + public function performInsertUsing(null|Closure|InteractsWithBundleInsert $withBundleInsert): static + { + if ($withBundleInsert) { + $this->performInsertUsing = $withBundleInsert instanceof InteractsWithBundleInsert ? + $withBundleInsert : + new class($withBundleInsert) implements InteractsWithBundleInsert { + public function __construct( + readonly protected Closure $insert + ) + { + } + + /** + * @param array $data + */ + public function insertDataFromBundle(array $data, Bundle $bundle): int|string + { + return forward_static_call($this->insert, $data, $bundle); + } + }; + } + + return $this; } } diff --git a/src/Concerns/Pipe/MutatorsPipe.php b/src/Concerns/Pipe/MutatorsPipe.php index 83c2e6e..c517414 100644 --- a/src/Concerns/Pipe/MutatorsPipe.php +++ b/src/Concerns/Pipe/MutatorsPipe.php @@ -10,15 +10,18 @@ trait MutatorsPipe /** * Mutes the attributes of the model using the defined mutators. * - * @param Collection $data - * @return Collection + * @param Collection $data + * @return Collection */ - protected function mutate(Collection $data): Collection + public function mutate(Collection $data): Collection { return $data - ->when(fn() => !empty($this->bundle->mutators), - fn(Collection $collection) => $collection->map(function ($value, $key) { + ->when( + fn () => ! empty($this->bundle->mutators), + fn (Collection $collection) => $collection->map(function ($value, $key) { return Arr::exists($this->bundle->mutators, $key) ? $this->bundle->mutators[$key]($value) : $value; - })); + }) + ) + ; } } diff --git a/src/Concerns/Pipe/RelatedPipe.php b/src/Concerns/Pipe/RelatedPipe.php index 2661e9c..ae783fb 100644 --- a/src/Concerns/Pipe/RelatedPipe.php +++ b/src/Concerns/Pipe/RelatedPipe.php @@ -4,7 +4,11 @@ use Guava\LaravelPopulator\Bundle; use Illuminate\Database\Eloquent\Relations\BelongsToMany; +use Illuminate\Database\Eloquent\Relations\HasMany; +use Illuminate\Database\Eloquent\Relations\HasOne; use Illuminate\Database\Eloquent\Relations\HasOneOrMany; +use Illuminate\Database\Eloquent\Relations\MorphMany; +use Illuminate\Database\Eloquent\Relations\MorphOne; use Illuminate\Database\Eloquent\Relations\MorphOneOrMany; use Illuminate\Database\Eloquent\Relations\MorphToMany; use Illuminate\Support\Collection; @@ -12,14 +16,13 @@ trait RelatedPipe { - /** * Handles the queued related models and inserts them into the database. * - * @param Collection $data - * @return Collection + * @param Collection $data + * @return Collection */ - protected function related(Collection $data): Collection + public function related(Collection $data): Collection { $id = $this->bundle->populator->memory->get($this->bundle->model::class, $this->name); @@ -27,7 +30,11 @@ protected function related(Collection $data): Collection foreach ($relations as $name => $relation) { - if ($relation['relation'] === HasOneOrMany::class) { + if ( + $relation['relation'] === HasOneOrMany::class + || $relation['relation'] === HasOne::class + || $relation['relation'] === HasMany::class + ) { $bundle = Bundle::make($relation['related']); $bundle->populator = $this->bundle->populator; @@ -41,7 +48,8 @@ protected function related(Collection $data): Collection $relation['foreign']['pivot_key'] => $id, $relation['foreign']['morph_type'] => $this->bundle->model::class, $relation['related']['pivot_key'] => $relation['related']['id'], - ]); + ]) + ; } if ($relation['relation'] === BelongsToMany::class) { @@ -49,10 +57,14 @@ protected function related(Collection $data): Collection ->insert([ $relation['foreign']['pivot_key'] => $id, $relation['related']['pivot_key'] => $relation['related']['id'], - ]); + ]) + ; } - if ($relation['relation'] === MorphOneOrMany::class) { + if ($relation['relation'] === MorphOneOrMany::class + || $relation['relation'] === MorphOne::class + || $relation['relation'] === MorphMany::class + ) { $bundle = Bundle::make($relation['related']); $bundle->populator = $this->bundle->populator; diff --git a/src/Concerns/Pipe/Relations/BelongsRelations.php b/src/Concerns/Pipe/Relations/BelongsRelations.php index 050a3a7..bf7240f 100644 --- a/src/Concerns/Pipe/Relations/BelongsRelations.php +++ b/src/Concerns/Pipe/Relations/BelongsRelations.php @@ -3,26 +3,25 @@ namespace Guava\LaravelPopulator\Concerns\Pipe\Relations; use Guava\LaravelPopulator\Exceptions\InvalidBundleException; +use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\BelongsTo; use Illuminate\Database\Eloquent\Relations\BelongsToMany; trait BelongsRelations { - - /** * Processes the belongs to relationship and sets the foreign key. * - * @param BelongsTo $relation - * @param string $value - * @return array + * @param BelongsTo $relation + * @return array + * * @throws InvalidBundleException */ protected function belongsTo(BelongsTo $relation, string $value): array { $id = $this->getPrimaryId($relation->getRelated(), $value); - if (!$id) { + if (! $id) { $bundleName = $this->bundle->model::class; throw new InvalidBundleException("Item {$this->name} from Sample {$bundleName} has an invalid belongsTo relation set for {$relation->getRelationName()} (value: {$value})."); } @@ -33,9 +32,9 @@ protected function belongsTo(BelongsTo $relation, string $value): array /** * Processes the belongs to many relationship and queues the relation for creation. * - * @param BelongsToMany $relation - * @param array $value - * @return void + * @param BelongsToMany $relation + * @param string[] $value + * * @throws InvalidBundleException */ protected function belongsToMany(BelongsToMany $relation, array $value): void @@ -43,7 +42,7 @@ protected function belongsToMany(BelongsToMany $relation, array $value): void foreach ($value as $identifier) { $id = $this->getPrimaryId($relation->getRelated(), $identifier); - if (!$id) { + if (! $id) { $bundleName = $this->bundle->model::class; throw new InvalidBundleException("Item {$this->name} from Sample {$bundleName} has an invalid belongsToMany relation set for {$relation->getRelationName()} (value: {$identifier})."); } @@ -51,7 +50,7 @@ protected function belongsToMany(BelongsToMany $relation, array $value): void $this->memory->set($relation->getTable(), $identifier, [ 'relation' => $relation::class, 'foreign' => [ - 'pivot_key' => $relation->getForeignPivotKeyName() + 'pivot_key' => $relation->getForeignPivotKeyName(), ], 'related' => [ 'pivot_key' => $relation->getRelatedPivotKeyName(), diff --git a/src/Concerns/Pipe/Relations/HasOneOrManyRelations.php b/src/Concerns/Pipe/Relations/HasOneOrManyRelations.php index e8a6863..8bdfd92 100644 --- a/src/Concerns/Pipe/Relations/HasOneOrManyRelations.php +++ b/src/Concerns/Pipe/Relations/HasOneOrManyRelations.php @@ -2,6 +2,7 @@ namespace Guava\LaravelPopulator\Concerns\Pipe\Relations; +use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\HasMany; use Illuminate\Database\Eloquent\Relations\HasOne; use Illuminate\Database\Eloquent\Relations\HasOneOrMany; @@ -9,13 +10,11 @@ trait HasOneOrManyRelations { - /** * Handles the hasOne relation of the processed record. * - * @param HasOne $relation - * @param array $record - * @return void + * @param HasOne $relation + * @param array> $record */ protected function hasOne(HasOne $relation, array $record): void { @@ -27,9 +26,8 @@ protected function hasOne(HasOne $relation, array $record): void /** * Handles the hasMany relation of the processed record. * - * @param HasMany $relation - * @param array $records - * @return void + * @param HasMany $relation + * @param array>> $records */ protected function hasMany(HasMany $relation, array $records): void { @@ -39,9 +37,8 @@ protected function hasMany(HasMany $relation, array $records): void /** * Handles the hasOneOrMany relation of the procesed record. * - * @param HasOneOrMany $relation - * @param array $records - * @return void + * @param HasOneOrMany $relation + * @param array>> $records */ protected function hasOneOrMany(HasOneOrMany $relation, array $records): void { @@ -54,7 +51,7 @@ protected function hasOneOrMany(HasOneOrMany $relation, array $records): void 'related' => $relation->getRelated()::class, 'record' => array_merge($record, [ $relationName => $this->name, - ]) + ]), ]); $index++; } diff --git a/src/Concerns/Pipe/Relations/MorphRelations.php b/src/Concerns/Pipe/Relations/MorphRelations.php index 6cfee73..beb0d64 100644 --- a/src/Concerns/Pipe/Relations/MorphRelations.php +++ b/src/Concerns/Pipe/Relations/MorphRelations.php @@ -3,33 +3,33 @@ namespace Guava\LaravelPopulator\Concerns\Pipe\Relations; use Guava\LaravelPopulator\Exceptions\InvalidBundleException; -use Illuminate\Database\Eloquent\Relations\BelongsToMany; +use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\MorphMany; use Illuminate\Database\Eloquent\Relations\MorphOne; use Illuminate\Database\Eloquent\Relations\MorphOneOrMany; use Illuminate\Database\Eloquent\Relations\MorphTo; use Illuminate\Database\Eloquent\Relations\MorphToMany; +use Illuminate\Support\Arr; use Illuminate\Support\Str; trait MorphRelations { - - /** * Processes the morph to relationship and sets the foreign key. * - * @param MorphTo $relation - * @param array $value - * @return array + * @param MorphTo $relation + * @param string[]|int[] $value + * @return array + * * @throws InvalidBundleException */ protected function morphTo(MorphTo $relation, array $value): array { $id = $this->getPrimaryId(new $value[1], $value[0]); - if (!$id) { + if (! $id) { $bundleName = $this->bundle->model::class; - throw new InvalidBundleException("Item {$this->name} from Sample {$bundleName} has an invalid belongsToMany relation set for {$relation->getRelationName()} (value: {$value})."); + throw new InvalidBundleException("Item {$this->name} from Sample {$bundleName} has an invalid belongsToMany relation set for {$relation->getRelationName()} (value: {$value[0]})."); } return [$relation->getForeignKeyName() => $id, $relation->getMorphType() => $value[1]]; @@ -38,9 +38,8 @@ protected function morphTo(MorphTo $relation, array $value): array /** * Processes the morph one relationship and sets the foreign key. * - * @param MorphOne $relation - * @param array $record - * @return void + * @param MorphOne $relation + * @param array $record */ protected function morphOne(MorphOneOrMany $relation, array $record): void { @@ -52,9 +51,8 @@ protected function morphOne(MorphOneOrMany $relation, array $record): void /** * Processes the morph many relationship and sets the foreign key. * - * @param MorphMany $relation - * @param array $items - * @return void + * @param MorphMany $relation + * @param string[]|int[] $items */ protected function morphMany(MorphMany $relation, array $items): void { @@ -64,16 +62,15 @@ protected function morphMany(MorphMany $relation, array $items): void /** * Processes the morph one or many relationship and sets the foreign key. * - * @param MorphOneOrMany $relation - * @param array $records - * @return void + * @param MorphOneOrMany $relation + * @param array>|array $records */ protected function morphOneOrMany(MorphOneOrMany $relation, array $records): void { $index = 0; foreach ($records as $record) { $morphName = Str::beforeLast($relation->getForeignKeyName(), '_'); - $record = collect($record)->merge([ + $record = collect(Arr::wrap($record))->merge([ $morphName => [$this->name, $relation->getMorphClass()], ])->toArray(); @@ -91,9 +88,9 @@ protected function morphOneOrMany(MorphOneOrMany $relation, array $records): voi /** * Processes the belongs to many relationship and queues the relation for creation. * - * @param MorphToMany $relation - * @param array $value - * @return void + * @param MorphToMany $relation + * @param string[]|int[] $value + * * @throws InvalidBundleException */ protected function morphToMany(MorphToMany $relation, array $value): void @@ -101,7 +98,7 @@ protected function morphToMany(MorphToMany $relation, array $value): void foreach ($value as $identifier) { $id = $this->getPrimaryId($relation->getRelated(), $identifier); - if (!$id) { + if (! $id) { $bundleName = $this->bundle->model::class; throw new InvalidBundleException("Item {$this->name} from Sample {$bundleName} has an invalid belongsToMany relation set for {$relation->getRelationName()} (value: {$identifier})."); } diff --git a/src/Concerns/Pipe/RelationsPipe.php b/src/Concerns/Pipe/RelationsPipe.php index 0116768..b14c7fd 100644 --- a/src/Concerns/Pipe/RelationsPipe.php +++ b/src/Concerns/Pipe/RelationsPipe.php @@ -18,46 +18,51 @@ trait RelationsPipe { - use HasOneOrManyRelations; use BelongsRelations; + use HasOneOrManyRelations; use MorphRelations; /** * Parses the relations defined on the model and processes the supported relations. * - * @param Collection $data - * @return Collection + * @param Collection $data + * @return Collection|bool|float|int|string> + * * @throws InvalidBundleException */ - protected function relations(Collection $data): Collection + public function relations(Collection $data): Collection { return $data ->mapWithKeys(function ($value, $relationName) { if ($this->bundle->model->isRelation($relationName)) { $relation = $this->bundle->model->$relationName(); - switch ($relation) { case $relation instanceof MorphTo: return $this->morphTo($relation, $value); case $relation instanceof MorphOne: $this->morphOne($relation, $value); + return []; case $relation instanceof MorphMany: $this->morphMany($relation, $value); + return []; case $relation instanceof MorphToMany: $this->morphToMany($relation, $value); + return []; case $relation instanceof HasOne: $this->hasOne($relation, $value); + return []; case $relation instanceof HasMany: $this->hasMany($relation, $value); + return []; case $relation instanceof BelongsTo: @@ -65,6 +70,7 @@ protected function relations(Collection $data): Collection case $relation instanceof BelongsToMany: $this->belongsToMany($relation, $value); + return []; default: @@ -73,7 +79,7 @@ protected function relations(Collection $data): Collection } else { return [$relationName => $value]; } - }); + }) + ; } - } diff --git a/src/Concerns/Pipe/TracksPopulationPipe.php b/src/Concerns/Pipe/TracksPopulationPipe.php new file mode 100644 index 0000000..818c427 --- /dev/null +++ b/src/Concerns/Pipe/TracksPopulationPipe.php @@ -0,0 +1,42 @@ + $data + * @return Collection + */ + public function track(Collection $data): Collection + { + $model = $this->bundle->model; + if ($model instanceof TracksPopulatedEntries && static::hasTrackingFeature()) { + assert($model instanceof Model); + $processor = $this->bundle->populator->getName(); + foreach (data_get($this->bundle->populator->memory->all(), $model::class) as $key => $id) { + Population::insert([ + 'key' => $key, + 'populator' => $processor, + 'bundle' => $this->bundle->getName(), + 'populatable_id' => $id, + 'populatable_type' => $model->getMorphClass(), + ]); + } + } + + return $data; + } +} diff --git a/src/Console/MakePopulatorCommand.php b/src/Console/MakePopulatorCommand.php index c4bedfa..1d38f91 100644 --- a/src/Console/MakePopulatorCommand.php +++ b/src/Console/MakePopulatorCommand.php @@ -5,11 +5,11 @@ use Illuminate\Console\GeneratorCommand; use Illuminate\Contracts\Filesystem\FileNotFoundException; use Illuminate\Support\Stringable; + use function str; class MakePopulatorCommand extends GeneratorCommand { - protected $name = 'make:populator'; protected $description = 'Creates a new populator definition class'; @@ -21,17 +21,20 @@ protected function getStub(): string return __DIR__ . '/../../stubs/populator.stub.php'; } - protected function getSampleStub(): string { + protected function getSampleStub(): string + { return __DIR__ . '/../../stubs/sample.stub.json'; } protected function qualifyClass($name): string { - return parent::qualifyClass(ucwords(str($name) - ->whenEndsWith('Populator', - fn(Stringable $str) => $str, - fn(Stringable $str) => $str->append('Populator') - ), "\t\r\n\f\v/") + return parent::qualifyClass( + ucwords(str($name) + ->whenEndsWith( + 'Populator', + fn (Stringable $str) => $str, + fn (Stringable $str) => $str->append('Populator') + ), "\t\r\n\f\v/") ); } @@ -43,7 +46,6 @@ protected function getDefaultNamespace($rootNamespace): string /** * Creates the files for the populator. * - * @return bool * @throws FileNotFoundException */ public function handle(): bool @@ -54,16 +56,18 @@ public function handle(): bool ->beforeLast('Populator') // ->append('/user/') ->append('/') - ->append(str($this->getSampleStub()) - ->afterLast('/') - ->replace('.stub', '') + ->append( + str($this->getSampleStub()) + ->afterLast('/') + ->replace('.stub', '') ) - ->lower(); + ->lower() + ; $path = database_path('populators/' . $name); $this->makeDirectory($path); -// $this->files->put($path, file_get_contents($this->getSampleStub())); + // $this->files->put($path, file_get_contents($this->getSampleStub())); return true; } diff --git a/src/Console/MakeSampleCommand.php b/src/Console/MakeSampleCommand.php index f5e2b0f..8f23457 100644 --- a/src/Console/MakeSampleCommand.php +++ b/src/Console/MakeSampleCommand.php @@ -5,11 +5,11 @@ use Illuminate\Console\GeneratorCommand; use Illuminate\Contracts\Filesystem\FileNotFoundException; use Illuminate\Support\Stringable; + use function str; class MakeSampleCommand extends GeneratorCommand { - protected $name = 'make:sample'; protected $description = 'Creates a new sample definition class'; @@ -21,17 +21,20 @@ protected function getStub(): string return __DIR__ . '/../../stubs/sample.stub.php'; } - protected function getSampleStub(): string { + protected function getSampleStub(): string + { return __DIR__ . '/../../stubs/sample.stub.json'; } protected function qualifyClass($name): string { - return parent::qualifyClass(ucwords(str($name) - ->whenEndsWith('Sample', - fn(Stringable $str) => $str, - fn(Stringable $str) => $str->append('Sample') - ), "\t\r\n\f\v/") + return parent::qualifyClass( + ucwords(str($name) + ->whenEndsWith( + 'Sample', + fn (Stringable $str) => $str, + fn (Stringable $str) => $str->append('Sample') + ), "\t\r\n\f\v/") ); } @@ -43,27 +46,26 @@ protected function getDefaultNamespace($rootNamespace): string /** * Creates the files for the populator. * - * @return bool * @throws FileNotFoundException */ public function handle(): bool { parent::handle(); -// $name = str($this->getNameInput()) -// ->beforeLast('Sample') -//// ->append('/user/') -// ->append('/') -// ->append(str($this->getSampleStub()) -// ->afterLast('/') -// ->replace('.stub', '') -// ) -// ->lower(); -// $path = database_path('populators/' . $name); -// -// $this->makeDirectory($path); + // $name = str($this->getNameInput()) + // ->beforeLast('Sample') + //// ->append('/user/') + // ->append('/') + // ->append(str($this->getSampleStub()) + // ->afterLast('/') + // ->replace('.stub', '') + // ) + // ->lower(); + // $path = database_path('populators/' . $name); + // + // $this->makeDirectory($path); -// $this->files->put($path, file_get_contents($this->getSampleStub())); + // $this->files->put($path, file_get_contents($this->getSampleStub())); return true; } diff --git a/src/Contracts/InteractsWithBundleInsert.php b/src/Contracts/InteractsWithBundleInsert.php new file mode 100644 index 0000000..34bd63e --- /dev/null +++ b/src/Contracts/InteractsWithBundleInsert.php @@ -0,0 +1,15 @@ + $data + */ + public function insertDataFromBundle(array $data, Bundle $bundle): int | string; +} diff --git a/src/Contracts/InteractsWithPipeline.php b/src/Contracts/InteractsWithPipeline.php new file mode 100644 index 0000000..0a48c90 --- /dev/null +++ b/src/Contracts/InteractsWithPipeline.php @@ -0,0 +1,16 @@ + $data + */ + public function processPipeline(Processor $processor, Collection $data): void; +} diff --git a/src/Contracts/TracksPopulatedEntries.php b/src/Contracts/TracksPopulatedEntries.php new file mode 100644 index 0000000..3993944 --- /dev/null +++ b/src/Contracts/TracksPopulatedEntries.php @@ -0,0 +1,10 @@ + + */ + protected array $enabled = [ + 'tracking' => null, + 'population_model' => null, + ]; + + /** + * Check if a feature is currently enabled + */ + public function enabled(string $feature): bool + { + return boolval(data_get($this->enabled, $feature) ?? data_get(config('populator', []), $feature, false)); + } + + /** + * Identity for the tracking feature + */ + public function tracking(): string + { + return 'tracking'; + } + + /** + * Identity for the tracking feature + */ + public function populationModel(): string + { + return 'population_model'; + } + + /** + * Enabled state for the populated model tracking feature + */ + public function hasTrackingFeature(): bool + { + return $this->enabled($this->tracking()); + } + + /** + * Disable the populated model tracking feature + */ + public function disableTrackingFeature(): void + { + $this->enabled['tracking'] = false; + } + + /** + * Enable the populated model tracking feature + */ + public function enableTrackingFeature(): void + { + $this->enabled['tracking'] = true; + } + + /** + * Enabled state for the populated model tracking feature + */ + public function hasCustomPopulationModel(): bool + { + return $this->populationModelClass() !== Population::class; + } + + /** + * Set the model used for Population + * + * @param class-string $model + */ + public function customPopulationModel(string $model): void + { + $this->enabled[$this->populationModel()] = $model; + } + + /** + * @return class-string + */ + public function populationModelClass(): string + { + return $this->enabled[$this->populationModel()] ?? Population::class; + } + + /** + * Instantiate Population + */ + public function makePopulationModel(): Population + { + $class = $this->populationModelClass(); + + return new $class; + } +} diff --git a/src/Models/Population.php b/src/Models/Population.php new file mode 100644 index 0000000..12b0b64 --- /dev/null +++ b/src/Models/Population.php @@ -0,0 +1,39 @@ + + */ + public function populatable(): MorphTo + { + return $this->morphTo(); + } + + public function getMorphClass(): string + { + return 'population'; + } + + protected static function newFactory(): PopulationFactory + { + return new PopulationFactory(); + } +} diff --git a/src/Populator.php b/src/Populator.php index f06330b..0577aa0 100644 --- a/src/Populator.php +++ b/src/Populator.php @@ -4,26 +4,33 @@ use Guava\LaravelPopulator\Concerns\HasEnvironments; use Guava\LaravelPopulator\Concerns\HasName; +use Guava\LaravelPopulator\Concerns\HasPipeline; +use Guava\LaravelPopulator\Contracts\TracksPopulatedEntries; +use Guava\LaravelPopulator\Exceptions\FeatureNotEnabledException; +use Guava\LaravelPopulator\Facades\Feature; +use Guava\LaravelPopulator\Models\Population; use Guava\LaravelPopulator\Storage\Memory; /** * The populator is used to populate your database with the defined bundles of model records. - * - * @package Guava\LaravelPopulator */ class Populator { - use HasName; use HasEnvironments; + use HasName; + use HasPipeline; public Memory $memory; + /** + * @var Bundle[] + */ public array $bundles = []; /** * Defines all bundles of the populator. * - * @param array $bundles + * @param Bundle[] $bundles * @return $this */ public function bundles(array $bundles): static @@ -44,18 +51,56 @@ public function call(): void } /** - * Calls the defined samples to populate the database. + * Deletes any inserted records that were tracked by Population. + * + * In order to be eligible for tracking @return void * - * @return void + * @throws FeatureNotEnabledException + * + * @see TracksPopulatedEntries + * and tracking must not be disabled (either by config or service provider) + */ + public function rollback(): void + { + throw_unless(Feature::hasTrackingFeature(), FeatureNotEnabledException::class, 'Rollback is not allowed when tracking is disabled'); + + $bundles = collect($this->bundles) + ->map(function (Bundle $bundle) { + return $bundle->getName(); + }) + ; + + $classes = collect($this->bundles) + ->map(function (Bundle $bundle) { + return $bundle->model->getMorphClass(); + }) + ; + + Population::where('populator', '=', $this->getName()) + ->where(function ($query) use ($bundles, $classes) { + return $query + ->when($classes->isNotEmpty(), fn ($query) => $query->whereIn('populatable_type', $classes)) + ->when($bundles->isNotEmpty(), fn ($query) => $query->whereIn('bundle', $bundles)) + ; + }) + ->orderBy('id', 'desc') + ->lazy() + ->each(function (Population $record) { + $record->populatable()->delete(); + $record->delete(); + }) + ; + } + + /** + * Calls the defined samples to populate the database. */ private function handle(): void { - if (!$this->checkEnvironment()) { + if (! $this->checkEnvironment()) { return; } - $this->memory = new Memory(); - foreach ($this->bundles as $bundle) { $bundle->handle($this); } @@ -64,19 +109,17 @@ private function handle(): void /** * Creates an instance of the class. */ - private function __construct(string $name) { + final private function __construct(string $name) + { $this->name = $name; + $this->memory = new Memory(); } /** * Static factory to create an instance of the class. - * - * @param string $name - * @return static */ public static function make(string $name): static { return new static($name); } - } diff --git a/src/PopulatorServiceProvider.php b/src/PopulatorServiceProvider.php index 3380c41..6a3953d 100644 --- a/src/PopulatorServiceProvider.php +++ b/src/PopulatorServiceProvider.php @@ -3,15 +3,17 @@ namespace Guava\LaravelPopulator; use Guava\LaravelPopulator\Console\MakePopulatorCommand; -use Guava\LaravelPopulator\Console\MakeSampleCommand; +use Guava\LaravelPopulator\Contracts\InteractsWithPipeline; +use Guava\LaravelPopulator\Support\Processors\InsertPipelineInvoker; use Illuminate\Support\ServiceProvider; class PopulatorServiceProvider extends ServiceProvider { - public function register(): void { $this->mergeConfigFrom(__DIR__.'/../config/config.php', 'populator'); + $this->app->bind(InteractsWithPipeline::class, InsertPipelineInvoker::class); + $this->app->scoped(Features::class); } public function boot(): void @@ -21,11 +23,17 @@ public function boot(): void __DIR__.'/../config/config.php' => config_path('populator.php'), ], 'config'); + $this->publishes([ + __DIR__.'/../database/migrations/' => database_path('migrations'), + ], 'migrations'); + + $this->loadMigrationsFrom([ + __DIR__.'/../database/migrations' => database_path('migrations'), + ]); + $this->commands([ MakePopulatorCommand::class, -// MakeSampleCommand::class, ]); } } - } diff --git a/src/Processor.php b/src/Processor.php index 8641f3d..10cd3eb 100644 --- a/src/Processor.php +++ b/src/Processor.php @@ -2,12 +2,17 @@ namespace Guava\LaravelPopulator; +use Guava\LaravelPopulator\Concerns\HasData; +use Guava\LaravelPopulator\Concerns\HasPipeline; use Guava\LaravelPopulator\Concerns\Pipe\DefaultsPipe; use Guava\LaravelPopulator\Concerns\Pipe\GeneratorsPipe; use Guava\LaravelPopulator\Concerns\Pipe\InsertPipe; use Guava\LaravelPopulator\Concerns\Pipe\MutatorsPipe; use Guava\LaravelPopulator\Concerns\Pipe\RelatedPipe; use Guava\LaravelPopulator\Concerns\Pipe\RelationsPipe; +use Guava\LaravelPopulator\Concerns\Pipe\TracksPopulationPipe; +use Guava\LaravelPopulator\Contracts\InteractsWithPipeline; +use Guava\LaravelPopulator\Facades\Feature; use Guava\LaravelPopulator\Storage\Memory; use Illuminate\Database\Eloquent\Model; use Illuminate\Support\Collection; @@ -18,17 +23,20 @@ */ class Processor { - use RelationsPipe; use DefaultsPipe; - use MutatorsPipe; use GeneratorsPipe; + use HasData; + use HasPipeline; use InsertPipe; + use MutatorsPipe; use RelatedPipe; + use RelationsPipe; + use TracksPopulationPipe; protected Bundle $bundle; protected \SplFileInfo $file; - protected Collection $data; + protected string $name; protected Memory $memory; @@ -36,33 +44,20 @@ class Processor /** * Processes the passed data through a set of pipelines. * - * @param array|Collection $data The data to process. - * @param string $name Name of the current 'process'. - * @return void + * @param array|Collection $data The data to process. + * @param string $name Name of the current 'process'. */ - public function process(array|Collection $data, string $name): void + public function process(array | Collection $data, string $name): void { $this->data = is_array($data) ? collect($data) : $data; $this->name = $name; - - $this->data->pipeThrough([ - $this->relations(...), - $this->defaults(...), - $this->mutate(...), - $this->generators(...), - $this->insert(...), - $this->related(...), - ]); + $this->pipeable->processPipeline($this, $this->data); } /** * Attempts to find the primary ID of the specified model's record with the given identifier. - * - * @param Model $model - * @param string $identifier - * @return int|string|null */ - protected function getPrimaryId(Model $model, string $identifier): int|string|null + protected function getPrimaryId(Model $model, string $identifier): int | string | null { $id = $this->bundle->populator->memory->get($model::class, $identifier); @@ -90,21 +85,75 @@ protected function getPrimaryId(Model $model, string $identifier): int|string|nu /** * Creates an instance of the class. */ - private function __construct(Bundle $bundle) + final public function __construct(Bundle $bundle, ?InteractsWithPipeline $invoker = null) { $this->bundle = $bundle; + $this->pipeable = $invoker ?? app(InteractsWithPipeline::class); $this->memory = new Memory(); } /** * Static factory to create an instance of the class. - * - * @param Bundle $bundle - * @return static */ public static function make(Bundle $bundle): static { return new static($bundle); } + /** + * Enable tracking model populations + */ + public static function enableTracking(): void + { + Feature::enableTrackingFeature(); + } + + /** + * Disable tracking model populations + */ + public static function disableTracking(): void + { + Feature::disableTrackingFeature(); + } + + /** + * Runs a closure with tracking temporarily disabled + */ + public static function disabledTracking(\Closure $callable): void + { + $enabled = static::hasTrackingFeature(); + try { + if ($enabled) { + static::disableTracking(); + } + $callable(); + } finally { + if ($enabled) { + static::enableTracking(); + } + } + } + + /** + * Runs a closure with tracking temporarily enabled + */ + public static function enabledTracking(\Closure $callable): void + { + $enabled = static::hasTrackingFeature(); + try { + if (! $enabled) { + static::enableTracking(); + } + $callable(); + } finally { + if (! $enabled) { + static::disableTracking(); + } + } + } + + public static function hasTrackingFeature(): bool + { + return Feature::hasTrackingFeature(); + } } diff --git a/src/Storage/Memory.php b/src/Storage/Memory.php index 2ffcdbe..939a450 100644 --- a/src/Storage/Memory.php +++ b/src/Storage/Memory.php @@ -9,20 +9,17 @@ */ class Memory { - + /** + * @var array> + */ private array $memory = []; /** * Stores the passed data in the memory. - * - * @param string $model - * @param string $key - * @param mixed $value - * @return void */ public function set(string $model, string $key, mixed $value): void { - if (!Arr::exists($this->memory, $model)) { + if (! Arr::exists($this->memory, $model)) { Arr::set($this->memory, $model, []); } @@ -32,10 +29,6 @@ public function set(string $model, string $key, mixed $value): void /** * Returns the stored data for the passed model and key. - * - * @param string $model - * @param string $key - * @return mixed */ public function get(string $model, string $key): mixed { @@ -44,10 +37,6 @@ public function get(string $model, string $key): mixed /** * Checks if the stored data for the passed model exists in memory. - * - * @param string $model - * @param string $key - * @return bool */ public function has(string $model, string $key): bool { @@ -57,11 +46,10 @@ public function has(string $model, string $key): bool /** * Returns the stored data from memory. * - * @return array + * @return array> */ public function all(): array { return $this->memory; } - } diff --git a/src/Support/Processors/InsertPipelineInvoker.php b/src/Support/Processors/InsertPipelineInvoker.php new file mode 100644 index 0000000..86b4709 --- /dev/null +++ b/src/Support/Processors/InsertPipelineInvoker.php @@ -0,0 +1,29 @@ +):Collection> + */ + public function defaultPipes(Processor $processor): array + { + return [ + $processor->relations(...), + $processor->defaults(...), + $processor->mutate(...), + $processor->generators(...), + $processor->insert(...), + $processor->track(...), + $processor->related(...), + ]; + } +} diff --git a/src/Support/Processors/PipelineInvoker.php b/src/Support/Processors/PipelineInvoker.php new file mode 100644 index 0000000..279323e --- /dev/null +++ b/src/Support/Processors/PipelineInvoker.php @@ -0,0 +1,58 @@ + $data + */ + public function processPipeline(Processor $processor, Collection $data): void + { + $data->pipeThrough($this->pipes($processor)); + } + + /** + * Provides the list of pipes by a closure, receiving the current Processor + * as a parameter + * + * @param Closure(Processor):array):Collection> $pipes + * @return $this + */ + public function usingPipes(Closure $pipes): static + { + $this->usingPipes = $pipes; + + return $this; + } + + /** + * Provides a list of closures to pipe the data through + * + * @return array):Collection> + */ + protected function pipes(Processor $processor): array + { + if ($pipe = $this->usingPipes) { + return $pipe($processor); + } + + return $this->defaultPipes($processor); + } + + /** + * A list of default closures to pipe the data through + * + * @return array):Collection> + */ + abstract public function defaultPipes(Processor $processor): array; +} diff --git a/stubs/populator.stub.php b/stubs/populator.stub.php index f40e275..8eab773 100644 --- a/stubs/populator.stub.php +++ b/stubs/populator.stub.php @@ -1,11 +1,11 @@ mutate('password', fn($value) => Hash::make($value)); } - } diff --git a/tests/Feature/BundleTest.php b/tests/Feature/BundleTest.php new file mode 100644 index 0000000..365e78b --- /dev/null +++ b/tests/Feature/BundleTest.php @@ -0,0 +1,79 @@ +records([ + 'user-foo' => TestUser::factory()->raw([ + 'name' => 'Foo', + 'email' => 'foo@example.com', + ]), + ]) + ; + $bundle->handle($populator); + + $this->assertTrue(TestUser::whereEmail('foo@example.com')->exists()); + } + + public function testHandleWithFilesystemBackedRecords(): void + { + $populator = Populator::make('initial'); + (Bundle::make(TestUser::class))->handle($populator); + (Bundle::make(TestPost::class))->handle($populator); + + $this->assertEquals(1, TestUser::whereEmail('foo@example.com')->withCount('posts')->sole()->posts_count); + + } + + public function testHandleWithFilesystemBackedRecordsThrowsMissingDirectoryException(): void + { + $this->expectExceptionMessageMatches('/^A directory for the bundle of/'); + $populator = Populator::make('initial_v2'); + $bundle = Bundle::make(TestUser::class); + $bundle->handle($populator); + } + + public function testHandleOnlyRunsInCorrectEnvironment(): void + { + $this->assertEquals(0, TestUser::count()); + $populator = Populator::make('test'); + $bundle = Bundle::make(TestUser::class) + ->environments(['not-this-env']) + ->record('user-foo', [ + 'name' => 'Foo', + ]) + ; + $bundle->handle($populator); + $this->assertEquals(0, TestUser::count()); + } + + public function testHandleInsertUsingClosure(): void + { + $populator = Populator::make('initial'); + $bundle = Bundle::make(TestUser::class) + ->performInsertUsing(function (array $data, Bundle $bundle) { + $created = $bundle->model->newInstance()->forceFill($data); + $created->saveOrFail(); + + return $created->getKey(); + }) + ; + $bundle->handle($populator); + + $this->assertTrue(TestUser::whereEmail('foo@example.com')->exists()); + } +} diff --git a/tests/Feature/Concerns/HasEnvironmentTest.php b/tests/Feature/Concerns/HasEnvironmentTest.php new file mode 100644 index 0000000..9d29f26 --- /dev/null +++ b/tests/Feature/Concerns/HasEnvironmentTest.php @@ -0,0 +1,46 @@ +target = new class + { + use HasEnvironments; + }; + } + + public function testEnvironmentsStartsEmpty(): void + { + $this->assertEmpty($this->target->environments); + } + + public function testEnvironmentsSetsEnvironments(): void + { + $this->target->environments(['foo', 'bar']); + $this->assertEquals(['foo', 'bar'], $this->target->environments); + } + + public function testGetEnvironmentsReturnsEnvironments(): void + { + $this->target->environments(['foo', 'bar']); + $this->assertEquals($this->target->environments, $this->target->getEnvironments()); + } + + public function testCheckEnvironmentChecksAgainstLaravelEnvironment(): void + { + $this->target->environments(['foo', 'bar']); + $this->assertFalse($this->target->checkEnvironment()); + $this->target->environments(['testing']); + $this->assertTrue($this->target->checkEnvironment()); + } +} diff --git a/tests/Feature/Concerns/HasNameTest.php b/tests/Feature/Concerns/HasNameTest.php new file mode 100644 index 0000000..8bc8839 --- /dev/null +++ b/tests/Feature/Concerns/HasNameTest.php @@ -0,0 +1,68 @@ +target = new class + { + use HasName; + }; + } + + public function test_name_starts_uninitialized() + { + $this->assertFalse(isset($this->target->name)); + } + + public function test_get_name_returns_name_if_set() + { + $this->target->name = 'foo'; + $this->assertEquals('foo', $this->target->getName()); + } + + public function test_get_name_class_with_namespace() + { + $this->target->name = null; + $this->assertEquals( + 'app.-foo', //FIXME this doesn't seem to be the desired behavior + $this->target->getName('App\\Foo', true) + ); + } + + public function test_get_name_class_without_namespace() + { + $this->target->name = null; + $this->assertEquals( + 'foo', + $this->target->getName('App\\Foo', false) + ); + } + + public function test_get_name_without_class_calls_static_class_for_name() + { + $this->target->name = null; + $this->assertStringStartsWith( + 'has-name-test.php', + $this->target->getName() + ); + } + + public function test_get_name_removes_the_string_populator_from_class() + { + $this->target->name = null; + $this->assertEquals( + 'foo', + $this->target->getName('App\\FooPopulator', false) + ); + } +} diff --git a/tests/Feature/Concerns/Pipe/DefaultsPipeTest.php b/tests/Feature/Concerns/Pipe/DefaultsPipeTest.php new file mode 100644 index 0000000..71146ea --- /dev/null +++ b/tests/Feature/Concerns/Pipe/DefaultsPipeTest.php @@ -0,0 +1,34 @@ +pipeableUsing((new NullPipelineInvoker())->usingPipes( + fn (Processor $processor) => [ + $processor->defaults(...), + function (Collection $collection) { + $this->assertEquals('bar', $collection->get('foo')); + }, + ] + )) + ->bundles([ + Bundle::make(TestUser::class) + ->default('foo', 'bar'), + ]) + ; + $populator->call(); + + } +} diff --git a/tests/Feature/Concerns/Pipe/GeneratorsPipeTest.php b/tests/Feature/Concerns/Pipe/GeneratorsPipeTest.php new file mode 100644 index 0000000..ef11c8f --- /dev/null +++ b/tests/Feature/Concerns/Pipe/GeneratorsPipeTest.php @@ -0,0 +1,34 @@ +pipeableUsing((new NullPipelineInvoker())->usingPipes( + fn (Processor $processor) => [ + $processor->generators(...), + function (Collection $collection) { + $this->assertEquals('bar', $collection->get('foo')); + }, + ] + )) + ->bundles([ + Bundle::make(TestUser::class) + ->generate('foo', fn () => 'bar'), + ]) + ; + $populator->call(); + + } +} diff --git a/tests/Feature/Concerns/Pipe/InsertPipeTest.php b/tests/Feature/Concerns/Pipe/InsertPipeTest.php new file mode 100644 index 0000000..2fd2206 --- /dev/null +++ b/tests/Feature/Concerns/Pipe/InsertPipeTest.php @@ -0,0 +1,70 @@ +pipeableUsing((new NullPipelineInvoker())->usingPipes( + fn (Processor $processor) => [$processor->insert(...)] + )) + ->bundles([ + Bundle::make(TestUser::class), + ]) + ->call() + ; + + $this->assertTrue(TestUser::whereEmail('foo@example.com')->exists()); + } + + public function testInsertUsing(): void + { + Populator::make('initial') + ->pipeableUsing((new NullPipelineInvoker())->usingPipes( + fn (Processor $processor) => [$processor + ->performInsertUsing(new class implements InteractsWithBundleInsert + { + public function insertDataFromBundle(array $data, Bundle $bundle): int | string + { + return $bundle->model::unguarded(fn () => $bundle->model::create($data)->getKey()); + } + }) + ->insert(...)] + )) + ->bundles([ + Bundle::make(TestUser::class), + ]) + ->call() + ; + + $this->assertTrue(TestUser::whereEmail('foo@example.com')->exists()); + } + + public function testInsertNonIncrementingId(): void + { + Populator::make('initial') + ->pipeableUsing((new NullPipelineInvoker())->usingPipes( + fn (Processor $processor) => [$processor->insert(...)] + )) + ->bundles([ + Bundle::make(TestUser::class), + ]) + ->call() + ; + + $this->assertTrue(TestUser::whereEmail('foo@example.com')->exists()); + } +} diff --git a/tests/Feature/Concerns/Pipe/MutatorsPipeTest.php b/tests/Feature/Concerns/Pipe/MutatorsPipeTest.php new file mode 100644 index 0000000..13397c3 --- /dev/null +++ b/tests/Feature/Concerns/Pipe/MutatorsPipeTest.php @@ -0,0 +1,34 @@ +pipeableUsing((new NullPipelineInvoker())->usingPipes( + fn (Processor $processor) => [ + $processor->mutate(...), + function (Collection $collection) { + $this->assertEquals('FOO@EXAMPLE.COM', $collection->get('email')); + }, + ] + )) + ->bundles([ + Bundle::make(TestUser::class) + ->mutate('email', fn ($value) => strtoupper($value)), + ]) + ; + $populator->call(); + + } +} diff --git a/tests/Feature/Concerns/Pipe/RelationsPipeTest.php b/tests/Feature/Concerns/Pipe/RelationsPipeTest.php new file mode 100644 index 0000000..8abb8a0 --- /dev/null +++ b/tests/Feature/Concerns/Pipe/RelationsPipeTest.php @@ -0,0 +1,54 @@ +pipeableUsing((new NullPipelineInvoker())->usingPipes( + fn (Processor $processor) => [ + $processor->relations(...), + function (Collection $collection) { + $this->assertEquals(1, $collection->get('user_id')); + }, + ] + )) + ->bundles([ + Bundle::make(TestPost::class) + ->makeProcessorUsing(function (Bundle $bundle) { + $processor = \Mockery::mock( + Processor::class, + [$bundle] + ) + ->makePartial() + ; + + return $processor + ->shouldAllowMockingProtectedMethods() + ->shouldReceive('getPrimaryId')->once()->andReturn(1) + ->getMock() + ; + }) + ->records([ + 'post-one' => [ + 'user' => 'email:foo@example.com', + 'content' => 'test', + ], + ]), + ]) + ; + $populator->call(); + + } +} diff --git a/tests/Feature/FeaturesTest.php b/tests/Feature/FeaturesTest.php new file mode 100644 index 0000000..2d1272e --- /dev/null +++ b/tests/Feature/FeaturesTest.php @@ -0,0 +1,72 @@ +features = new Features(); + } + + public function testHasTrackingFeature(): void + { + $this->features->enableTrackingFeature(); + $this->assertTrue($this->features->hasTrackingFeature()); + } + + public function testEnabled(): void + { + config(['populator.tracking' => true]); + $this->assertTrue($this->features->enabled('tracking')); + + config(['populator.tracking' => false]); + $this->assertFalse($this->features->enabled('tracking')); + + } + + public function testEnableTrackingFeature(): void + { + config(['populator.tracking' => false]); + $this->assertFalse($this->features->enabled('tracking')); + $this->features->enableTrackingFeature(); + $this->assertTrue($this->features->hasTrackingFeature()); + } + + public function testDisableTrackingFeature(): void + { + config(['populator.tracking' => true]); + $this->assertTrue($this->features->enabled('tracking')); + $this->features->disableTrackingFeature(); + $this->assertFalse($this->features->hasTrackingFeature()); + } + + public function testTracking(): void + { + $this->assertEquals('tracking', $this->features->tracking()); + } + + public function testHasCustomPopulationModel(): void + { + $this->assertFalse($this->features->hasCustomPopulationModel()); + + $this->features->customPopulationModel(TestPopulation::class); + $this->assertTrue($this->features->hasCustomPopulationModel()); + } + + public function testCustomPopulationModel(): void + { + $this->assertEquals(Population::class, $this->features->populationModelClass()); + $this->features->customPopulationModel(TestPopulation::class); + $this->assertTrue($this->features->hasCustomPopulationModel()); + $this->assertInstanceOf(TestPopulation::class, $this->features->makePopulationModel()); + } +} diff --git a/tests/Feature/Models/PopulationTest.php b/tests/Feature/Models/PopulationTest.php new file mode 100644 index 0000000..2d3982e --- /dev/null +++ b/tests/Feature/Models/PopulationTest.php @@ -0,0 +1,24 @@ +has(Population::factory(), 'population') + ->create() + ; + $this->assertInstanceOf(Population::class, $test->population); + } + + public function testGetMorphClass(): void + { + $this->assertEquals('population', (new Population)->getMorphClass()); + } +} diff --git a/tests/Feature/PipelineInvokerTest.php b/tests/Feature/PipelineInvokerTest.php new file mode 100644 index 0000000..73b8733 --- /dev/null +++ b/tests/Feature/PipelineInvokerTest.php @@ -0,0 +1,48 @@ +app->bind(InteractsWithPipeline::class, fn () => (new InsertPipelineInvoker())->usingPipes( + fn (Processor $processor) => [$processor->insert(...)] + )); + + Populator::make('initial') + ->bundles([ + Bundle::make(TestUser::class), + ]) + ->call() + ; + + $this->assertNotNull($user = TestUser::whereEmail('foo@example.com')->sole()); + + $user->delete(); + + $this->app->bind(InteractsWithPipeline::class, fn () => (new InsertPipelineInvoker())->usingPipes( + fn (Processor $processor) => [] + )); + + Populator::make('initial') + ->bundles([ + Bundle::make(TestUser::class), + ]) + ->call() + ; + + $this->assertFalse(TestUser::whereEmail('foo@example.com')->exists()); + } +} diff --git a/tests/Feature/PopulatorServiceProviderTest.php b/tests/Feature/PopulatorServiceProviderTest.php new file mode 100644 index 0000000..93cbb06 --- /dev/null +++ b/tests/Feature/PopulatorServiceProviderTest.php @@ -0,0 +1,27 @@ +artisan('vendor:publish', [ + '--provider' => 'Guava\LaravelPopulator\PopulatorServiceProvider', + ]); + + $this->assertFileExists(config_path('populator.php')); + $this->assertFileIsReadable(config_path('populator.php')); + // $this->assertFileEquals(config_path('larapoke.php'), __DIR__ . '/../../config/larapoke.php'); + $this->assertTrue(unlink(config_path('populator.php'))); + } + + public function testRegistersCommands(): void + { + $commands = \Artisan::all(); + $this->assertArrayHasKey('make:populator', $commands); + // $this->assertArrayHasKey('make:sample', $commands); + } +} diff --git a/tests/Feature/PopulatorTest.php b/tests/Feature/PopulatorTest.php new file mode 100644 index 0000000..62ad5b7 --- /dev/null +++ b/tests/Feature/PopulatorTest.php @@ -0,0 +1,108 @@ +assertEquals([$bundle], Populator::make('test') + ->bundles([ + $bundle, + ])->bundles); + } + + public function testOnlyHandlesInCurrentEnvironment(): void + { + $bundle = $this->spy(Bundle::class); + Populator::make('test') + ->bundles([$bundle]) + ->call() + ; + $bundle->shouldHaveReceived('handle'); + + $bundle = $this->spy(Bundle::class); + Populator::make('test') + ->environments(['local']) + ->bundles([$bundle]) + ->call() + ; + $bundle->shouldNotHaveReceived('handle'); + } + + public function testRollbackWithEmptyBundles(): void + { + + Processor::enableTracking(); + $this->assertTrue(Processor::hasTrackingFeature()); + $populator = Populator::make('initial') + ->bundles([ + Bundle::make(TestUser::class), + Bundle::make(TestPost::class) + ->generate('id', fn () => Str::uuid()), + ]) + ; + $populator->call(); + $this->assertDatabaseCount(TestUser::class, 1); + $this->assertDatabaseCount(TestPost::class, 1); + Populator::make('initial')->rollback(); + $this->assertDatabaseCount(TestUser::class, 0); + $this->assertDatabaseCount(TestPost::class, 0); + } + + public function testRollbackRemovesBundleEntries(): void + { + Processor::enableTracking(); + $this->assertTrue(Processor::hasTrackingFeature()); + $populator = Populator::make('initial') + ->bundles([ + Bundle::make(TestUser::class), + Bundle::make(TestPost::class) + ->generate('id', fn () => Str::uuid()), + ]) + ; + $populator->call(); + $this->assertDatabaseCount(TestUser::class, 1); + $this->assertDatabaseCount(TestPost::class, 1); + + $populator->rollback(); + + $this->assertDatabaseCount(TestUser::class, 0); + $this->assertDatabaseCount(TestPost::class, 0); + + $populator->call(); + + $this->assertDatabaseCount(TestUser::class, 1); + $this->assertDatabaseCount(TestPost::class, 1); + + Populator::make('initial') + ->bundles([Bundle::make(TestPost::class)]) + ->rollback() + ; + + $this->assertDatabaseCount(TestUser::class, 1); + $this->assertDatabaseCount(TestPost::class, 0); + + } + + public function testRollbackThrowsIfTrackingDisabled(): void + { + Processor::disableTracking(); + $this->expectException(FeatureNotEnabledException::class); + Populator::make('initial') + ->rollback(); + } +} diff --git a/tests/Feature/ProcessorTest.php b/tests/Feature/ProcessorTest.php new file mode 100644 index 0000000..d70cf5f --- /dev/null +++ b/tests/Feature/ProcessorTest.php @@ -0,0 +1,402 @@ +bundles([ + Bundle::make(TestUser::class) + ->record('user-test', [ + 'id' => 1, + 'email' => 'foo@example.com', + 'name' => 'foo', + 'password' => 'password', + 'phone' => [ + 'phone' => '5555555555', + ], + ]), + Bundle::make(TestPost::class) + ->generate('id', fn () => Str::uuid()) + ->records([ + 'post-one' => [ + 'user' => 1, + 'content' => 'test one', + ], + 'post-two' => [ + 'user' => 'email:foo@example.com', + 'content' => 'test two', + ], + ]), + ]) + ->call() + ; + $this->assertEquals(2, TestUser::sole()->withCount('posts')->sole()->posts_count); + } + + public function testHasOneRelation(): void + { + $this->assertEquals(0, TestPhone::count()); + Populator::make('test') + ->bundles([ + Bundle::make(TestUser::class) + ->record('user-test', [ + 'email' => 'foo@example.com', + 'name' => 'foo', + 'password' => 'password', + 'phone' => [ + 'phone' => '5555555555', + ], + ]), + ]) + ->call() + ; + + $this->assertEquals(1, TestPhone::count()); + } + + public function testHasOneRelationThrowsOnInvalidRelationship(): void + { + $this->expectException(InvalidBundleException::class); + $this->expectExceptionMessageMatches('/has an invalid .*? relation set/'); + Populator::make('test') + ->bundles([ + Bundle::make(TestPhone::class) + ->record('user-test', [ + 'user' => 'invalid', + 'phone' => '5555555555', + ]), + ]) + ->call() + ; + + } + + public function testHasManyRelation(): void + { + $this->assertEquals(0, TestPost::count()); + Populator::make('test') + ->bundles([ + Bundle::make(TestUser::class) + ->record('user-test', [ + 'email' => 'foo@example.com', + 'name' => 'foo', + 'password' => 'password', + 'posts' => [ + [ + 'id' => '1a4d5b58-8ee4-4adc-9628-98dcc5691b63', + 'content' => 'foobar', + ], + ], + ]), + ]) + ->call() + ; + + $this->assertEquals(1, TestPost::count()); + } + + public function testBelongsToManyRelation(): void + { + Populator::make('test') + ->bundles([ + Bundle::make(TestRole::class) + ->record('role-users', [ + 'name' => 'users', + ]), + Bundle::make(TestUser::class) + ->record('user-test', [ + 'email' => 'foo@example.com', + 'name' => 'foo', + 'password' => 'password', + 'roles' => [ + 'role-users', + ], + ]), + ]) + ->call() + ; + + $this->assertEquals( + 1, + TestUser::whereEmail('foo@example.com') + ->withCount('roles')->sole()->roles_count, + ); + } + + public function testBelongsToManyRelationThrowsOnInvalidRelationship(): void + { + + $this->expectException(InvalidBundleException::class); + $this->expectExceptionMessageMatches('/has an invalid .*? relation set/'); + + Populator::make('test') + ->bundles([ + Bundle::make(TestRole::class) + ->record('role-users', [ + 'name' => 'users', + ]), + Bundle::make(TestUser::class) + ->record('user-test', [ + 'email' => 'foo@example.com', + 'name' => 'foo', + 'password' => 'password', + 'roles' => [ + 'role-users-invalid', + ], + ]), + ]) + ->call() + ; + + } + + public function testMorphsOneRelation(): void + { + $this->assertEquals(0, TestImage::count()); + Populator::make('test') + ->bundles([ + Bundle::make(TestUser::class) + ->record('user-test', [ + 'email' => 'foo@example.com', + 'name' => 'foo', + 'password' => 'password', + 'image' => [ + 'url' => 'localhost/image.png', + ], + ]), + ]) + ->call() + ; + + $this->assertEquals(1, TestImage::count()); + } + + public function testMorphsOneRelationThrowsOnInvalidRelationship(): void + { + $this->expectException(InvalidBundleException::class); + $this->expectExceptionMessageMatches('/has an invalid .*? relation set/'); + Populator::make('test') + ->bundles([ + Bundle::make(TestImage::class) + ->record('invalid-test', [ + 'url' => 'localhost/image.png', + 'imageable' => ['invalid-test', TestUser::class], + ]), + ]) + ->call() + ; + } + + public function testMorphsManyRelation(): void + { + Populator::make('test') + ->bundles([ + Bundle::make(TestUser::class) + ->record('user-test', [ + 'email' => 'foo@example.com', + 'name' => 'foo', + 'password' => 'password', + ]), + Bundle::make(TestPost::class) + ->generate('id', fn () => Str::uuid()) + ->record('post-test', [ + 'user' => 'user-test', + 'content' => 'foobar', + 'comments' => [ + ['body' => 'comment body'], + ], + ]), + ]) + ->call() + ; + + $this->assertEquals(1, TestPost::withCount('comments')->sole()->comments_count); + + } + + public function testMorphsManyRelationThrowsOnInvalidRelationship(): void + { + $this->expectException(InvalidBundleException::class); + $this->expectExceptionMessageMatches('/has an invalid .*? relation set/'); + Populator::make('test') + ->bundles([ + Bundle::make(TestComment::class) + ->record('invalid-test', [ + 'body' => 'comment body', + 'commentable' => ['invalid-test', TestPost::class], + ]), + ]) + ->call() + ; + } + + public function testMorphsToManyRelationThrowsOnInvalidRelationship(): void + { + $this->expectException(InvalidBundleException::class); + $this->expectExceptionMessageMatches('/has an invalid .*? relation set/'); + + Populator::make('test') + ->bundles([ + Bundle::make(TestUser::class) + ->record('user-test', [ + 'email' => 'foo@example.com', + 'name' => 'foo', + 'password' => 'password', + ]), + Bundle::make(TestPost::class) + ->generate('id', fn () => Str::uuid()) + ->record('post-test', [ + 'user' => 'user-test', + 'content' => 'foobar', + 'tags' => ['invalid-tag'], + ]), + ]) + ->call() + ; + } + + public function testMorphsToManyRelation(): void + { + Populator::make('test') + ->bundles([ + Bundle::make(TestTag::class) + ->record('tag-test', [ + 'name' => 'test', + ]), + Bundle::make(TestUser::class) + ->record('user-test', [ + 'email' => 'foo@example.com', + 'name' => 'foo', + 'password' => 'password', + ]), + Bundle::make(TestPost::class) + ->generate('id', fn () => Str::uuid()) + ->record('post-test', [ + 'user' => 'user-test', + 'content' => 'foobar', + 'tags' => ['tag-test'], + ]), + ]) + ->call() + ; + + $this->assertEquals( + 1, + TestPost::withCount('tags')->sole()->tags_count + ); + + } + + public function testThrowsForInvalidRelationship(): void + { + $this->expectException(InvalidBundleException::class); + $this->expectExceptionMessage('The relation type of faux is not supported yet'); + Populator::make('test') + ->bundles([ + Bundle::make(TestTag::class) + ->record('tag-test', [ + 'name' => 'test', + 'faux' => '', + ]), + ])->call() + ; + } + + public function testTracksPopulation(): void + { + Processor::enableTracking(); + $this->assertEquals(0, Population::count()); + Populator::make('test') + ->bundles([ + Bundle::make(TestUser::class) + ->record('user-test', [ + 'email' => 'foo@example.com', + 'name' => 'foo', + 'password' => 'password', + 'phone' => [ + 'phone' => '5555555555', + ], + ]), + ]) + ->call() + ; + + $this->assertEquals(1, Population::count()); + } + + public function testHasPopulationTraitCanAccessPopulationRelationship(): void + { + Processor::enableTracking(); + Populator::make('test') + ->bundles([ + Bundle::make(TestUser::class) + ->record('user-test', [ + 'email' => 'foo@example.com', + 'name' => 'foo', + 'password' => 'password', + 'phone' => [ + 'phone' => '5555555555', + ], + ]), + ]) + ->call() + ; + + $user = TestUser::with('population')->sole(); + $this->assertEquals('test', $user->population->populator); + $this->assertEquals('user-test', $user->population->key); + } + + public function testDisableTracking(): void + { + config(['populator.tracking' => true]); + $this->assertTrue(Processor::hasTrackingFeature()); + Processor::disableTracking(); + $this->assertFalse(Processor::hasTrackingFeature()); + } + + public function testDisabledTracking(): void + { + config(['populator.tracking' => true]); + $this->assertTrue(Processor::hasTrackingFeature()); + Processor::disabledTracking(fn () => $this->assertFalse(Processor::hasTrackingFeature())); + $this->assertTrue(Processor::hasTrackingFeature()); + } + + public function testEnabledTracking(): void + { + config(['populator.tracking' => false]); + $this->assertFalse(Processor::hasTrackingFeature()); + Processor::enabledTracking(fn () => $this->assertTrue(Processor::hasTrackingFeature())); + $this->assertFalse(Processor::hasTrackingFeature()); + } + + public function testEnableTracking(): void + { + config(['populator.tracking' => false]); + $this->assertFalse(Processor::hasTrackingFeature()); + Processor::enableTracking(); + $this->assertTrue(Processor::hasTrackingFeature()); + } +} diff --git a/tests/Fixtures/FakeBelongsTo.php b/tests/Fixtures/FakeBelongsTo.php new file mode 100644 index 0000000..19b819f --- /dev/null +++ b/tests/Fixtures/FakeBelongsTo.php @@ -0,0 +1,34 @@ +morphTo(); + } +} diff --git a/tests/Fixtures/TestImage.php b/tests/Fixtures/TestImage.php new file mode 100644 index 0000000..1ac39c3 --- /dev/null +++ b/tests/Fixtures/TestImage.php @@ -0,0 +1,18 @@ +morphTo(); + } +} diff --git a/tests/Fixtures/TestPhone.php b/tests/Fixtures/TestPhone.php new file mode 100644 index 0000000..0e9e119 --- /dev/null +++ b/tests/Fixtures/TestPhone.php @@ -0,0 +1,21 @@ + + */ + public function user(): BelongsTo + { + return $this->belongsTo(TestUser::class, 'user_id'); + } +} diff --git a/tests/Fixtures/TestPopulation.php b/tests/Fixtures/TestPopulation.php new file mode 100644 index 0000000..2977d79 --- /dev/null +++ b/tests/Fixtures/TestPopulation.php @@ -0,0 +1,7 @@ + + */ + public function user(): BelongsTo + { + return $this->belongsTo(TestUser::class, 'user_id', 'id'); + } + + /** + * @return MorphOne + */ + public function image(): MorphOne + { + return $this->morphOne(TestImage::class, 'imageable'); + } + + /** + * @return MorphMany + */ + public function comments(): MorphMany + { + return $this->morphMany(TestComment::class, 'commentable'); + } + + /** + * @return MorphToMany + */ + public function tags(): MorphToMany + { + return $this->morphToMany( + TestTag::class, + 'taggable', + 'taggables', + 'taggable_id', + 'tag_id' + ); + } +} diff --git a/tests/Fixtures/TestRole.php b/tests/Fixtures/TestRole.php new file mode 100644 index 0000000..352d898 --- /dev/null +++ b/tests/Fixtures/TestRole.php @@ -0,0 +1,26 @@ + + */ + public function users(): BelongsToMany + { + return $this->belongsToMany( + TestUser::class, + 'role_user', + 'role_id', + 'user_id', + ); + } +} diff --git a/tests/Fixtures/TestTag.php b/tests/Fixtures/TestTag.php new file mode 100644 index 0000000..1aa6d6b --- /dev/null +++ b/tests/Fixtures/TestTag.php @@ -0,0 +1,41 @@ + + */ + public function posts(): MorphToMany + { + return $this->morphedByMany(TestPost::class, 'taggable'); + } + + public function faux(): FakeBelongsTo + { + return new FakeBelongsTo( + TestUser::query(), + new TestUser(), + ); + } + + public function invalid(): BelongsTo + { + return new BelongsTo( + TestUser::query(), + new TestUser(), + 'user_id', + 'id', + 'invalid', + ); + } +} diff --git a/tests/Fixtures/TestUser.php b/tests/Fixtures/TestUser.php new file mode 100644 index 0000000..0f9651a --- /dev/null +++ b/tests/Fixtures/TestUser.php @@ -0,0 +1,94 @@ + 'boolean', + ]; + + public function phone(): HasOne + { + return $this->hasOne(TestPhone::class, 'user_id'); + } + + /** + * @return HasMany + */ + public function posts(): HasMany + { + return $this->hasMany(TestPost::class, 'user_id'); + } + + /** + * @return BelongsToMany + */ + public function roles(): BelongsToMany + { + return $this->belongsToMany( + TestRole::class, + 'role_user', + 'user_id', + 'role_id' + ); + } + + /** + * @return MorphOne + */ + public function image(): MorphOne + { + return $this->morphOne(TestImage::class, 'imageable'); + } + + public function getAuthIdentifierName(): string + { + return 'test-user-auth-identifier-name'; + } + + public function getAuthIdentifier(): string + { + return 'test-user-auth-identifier'; + } + + public function getAuthPassword(): string + { + return 'test-user-auth-password'; + } + + public function getRememberToken(): string + { + return 'test-user-remember-token'; + } + + public function setRememberToken($value): void + { + // + } + + public function getRememberTokenName(): string + { + return 'test-user-remember-token-name'; + } +} diff --git a/tests/Fixtures/database/2024_06_22_000001_create_users_table.php b/tests/Fixtures/database/2024_06_22_000001_create_users_table.php new file mode 100644 index 0000000..a3ced88 --- /dev/null +++ b/tests/Fixtures/database/2024_06_22_000001_create_users_table.php @@ -0,0 +1,29 @@ +id(); + $table->string('name'); + $table->string('email')->unique(); + $table->timestamp('email_verified_at')->nullable(); + $table->string('password'); + $table->rememberToken(); + $table->boolean('is_admin')->default(false); + $table->timestamps(); + }); + } + + public function down(): void + { + Schema::dropIfExists('users'); + } +}; diff --git a/tests/Fixtures/database/2024_06_22_000002_create_posts_table.php b/tests/Fixtures/database/2024_06_22_000002_create_posts_table.php new file mode 100644 index 0000000..a5f409a --- /dev/null +++ b/tests/Fixtures/database/2024_06_22_000002_create_posts_table.php @@ -0,0 +1,29 @@ +uuid('id')->primary(); + $table->timestamps(); + $table->foreignIdFor(TestUser::class, 'user_id') + ->constrained() + ->cascadeOnDelete() + ->cascadeOnUpdate() + ; + $table->text('content'); + }); + } + + public function down(): void + { + Schema::dropIfExists('posts'); + } +}; diff --git a/tests/Fixtures/database/2024_06_22_000003_create_comments_table.php b/tests/Fixtures/database/2024_06_22_000003_create_comments_table.php new file mode 100644 index 0000000..44a7f2a --- /dev/null +++ b/tests/Fixtures/database/2024_06_22_000003_create_comments_table.php @@ -0,0 +1,23 @@ +id(); + $table->timestamps(); + $table->string('body'); + $table->morphs('commentable'); + }); + } + + public function down(): void + { + Schema::dropIfExists('comments'); + } +}; diff --git a/tests/Fixtures/database/2024_06_22_000003_create_images_table.php b/tests/Fixtures/database/2024_06_22_000003_create_images_table.php new file mode 100644 index 0000000..2ffc809 --- /dev/null +++ b/tests/Fixtures/database/2024_06_22_000003_create_images_table.php @@ -0,0 +1,23 @@ +id(); + $table->timestamps(); + $table->string('url'); + $table->morphs('imageable'); + }); + } + + public function down(): void + { + Schema::dropIfExists('images'); + } +}; diff --git a/tests/Fixtures/database/2024_06_22_000003_create_role_user_table.php b/tests/Fixtures/database/2024_06_22_000003_create_role_user_table.php new file mode 100644 index 0000000..34ae937 --- /dev/null +++ b/tests/Fixtures/database/2024_06_22_000003_create_role_user_table.php @@ -0,0 +1,27 @@ +foreignId('role_id') + ->constrained('roles') + ->cascadeOnDelete() + ; + $table->foreignId('user_id') + ->constrained('users') + ->cascadeOnDelete() + ; + }); + } + + public function down(): void + { + Schema::dropIfExists('roles'); + } +}; diff --git a/tests/Fixtures/database/2024_06_22_000003_create_roles_table.php b/tests/Fixtures/database/2024_06_22_000003_create_roles_table.php new file mode 100644 index 0000000..1230f17 --- /dev/null +++ b/tests/Fixtures/database/2024_06_22_000003_create_roles_table.php @@ -0,0 +1,22 @@ +id(); + $table->timestamps(); + $table->string('name'); + }); + } + + public function down(): void + { + Schema::dropIfExists('roles'); + } +}; diff --git a/tests/Fixtures/database/2024_06_22_000003_create_tags_table.php b/tests/Fixtures/database/2024_06_22_000003_create_tags_table.php new file mode 100644 index 0000000..cf28a87 --- /dev/null +++ b/tests/Fixtures/database/2024_06_22_000003_create_tags_table.php @@ -0,0 +1,22 @@ +id(); + $table->timestamps(); + $table->string('name'); + }); + } + + public function down(): void + { + Schema::dropIfExists('tags'); + } +}; diff --git a/tests/Fixtures/database/2024_06_22_000004_create_taggables_table.php b/tests/Fixtures/database/2024_06_22_000004_create_taggables_table.php new file mode 100644 index 0000000..2edfe4b --- /dev/null +++ b/tests/Fixtures/database/2024_06_22_000004_create_taggables_table.php @@ -0,0 +1,21 @@ +foreignId('tag_id'); + $table->morphs('taggable'); + }); + } + + public function down(): void + { + Schema::dropIfExists('taggables'); + } +}; diff --git a/tests/Fixtures/database/2024_06_22_000005_create_phones_table.php b/tests/Fixtures/database/2024_06_22_000005_create_phones_table.php new file mode 100644 index 0000000..b776481 --- /dev/null +++ b/tests/Fixtures/database/2024_06_22_000005_create_phones_table.php @@ -0,0 +1,27 @@ +id(); + $table->timestamps(); + $table->foreignId('user_id') + ->constrained('users') + ->cascadeOnDelete() + ; + $table->string('phone'); + + }); + } + + public function down(): void + { + Schema::dropIfExists('phones'); + } +}; diff --git a/tests/Fixtures/database/factories/TestPostFactory.php b/tests/Fixtures/database/factories/TestPostFactory.php new file mode 100644 index 0000000..d019b38 --- /dev/null +++ b/tests/Fixtures/database/factories/TestPostFactory.php @@ -0,0 +1,23 @@ + + */ +class TestPostFactory extends Factory +{ + protected $model = TestPost::class; + + public function definition(): array + { + return [ + 'user_id' => TestUser::factory(), + 'content' => $this->faker->paragraph(), + ]; + } +} diff --git a/tests/Fixtures/database/factories/TestUserFactory.php b/tests/Fixtures/database/factories/TestUserFactory.php new file mode 100644 index 0000000..2077abb --- /dev/null +++ b/tests/Fixtures/database/factories/TestUserFactory.php @@ -0,0 +1,28 @@ + + */ +class TestUserFactory extends Factory +{ + protected $model = TestUser::class; + + public function definition(): array + { + return [ + 'name' => fake()->name(), + 'email' => fake()->safeEmail(), + 'password' => Hash::make('password'), + 'email_verified_at' => now(), + 'remember_token' => Str::random(10), + 'is_admin' => true, + ]; + } +} diff --git a/tests/Fixtures/database/migrations/2024_06_22_000001_create_populations.php b/tests/Fixtures/database/migrations/2024_06_22_000001_create_populations.php new file mode 100644 index 0000000..e78582e --- /dev/null +++ b/tests/Fixtures/database/migrations/2024_06_22_000001_create_populations.php @@ -0,0 +1,28 @@ +id(); + $table->timestamps(); + $table->string('populator'); + $table->string('bundle'); + $table->string('key'); + $table->morphs('populatable'); + // $table->unique(['populatable_type', 'populatable_id']); + }); + } + + public function down(): void + { + Schema::dropIfExists('populations'); + } +}; diff --git a/tests/Fixtures/database/populators/initial/test-post/example-post.php b/tests/Fixtures/database/populators/initial/test-post/example-post.php new file mode 100644 index 0000000..bbe508a --- /dev/null +++ b/tests/Fixtures/database/populators/initial/test-post/example-post.php @@ -0,0 +1,7 @@ + '1a4d5b58-8ee4-4adc-9628-98dcc5691b63', + 'user' => 'example-user', + 'content' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.', +]; diff --git a/tests/Fixtures/database/populators/initial/test-user/example-user.php b/tests/Fixtures/database/populators/initial/test-user/example-user.php new file mode 100644 index 0000000..5999e05 --- /dev/null +++ b/tests/Fixtures/database/populators/initial/test-user/example-user.php @@ -0,0 +1,7 @@ + 'Foo', + 'email' => 'foo@example.com', + 'password' => 'password', +]; diff --git a/tests/TestCase.php b/tests/TestCase.php new file mode 100644 index 0000000..088357f --- /dev/null +++ b/tests/TestCase.php @@ -0,0 +1,58 @@ + 'Tests\\Database\\Factories\\'.class_basename($modelName).'Factory' + ); + + copy(__DIR__.'/../config/config.php', config_path('populator.php')); + // copy(__DIR__.'/../database/migrations', database_path()); + + } + + #[\Override] + protected function tearDown(): void + { + parent::tearDown(); + if (file_exists($path = config_path('populator.php'))) { + unlink($path); + } + } + + protected function getPackageProviders($app) + { + return [ + PopulatorServiceProvider::class, + ]; + } + + protected function defineDatabaseMigrations(): void + { + $this->loadMigrationsFrom(__DIR__.'/Fixtures/database'); + $this->loadMigrationsFrom(__DIR__.'/../database/migrations'); + } + + public function defineEnvironment($app): void + { + $app->useDatabasePath(__DIR__.'/Fixtures/database'); + } +} diff --git a/tests/Unit/HasDefaultsTest.php b/tests/Unit/HasDefaultsTest.php new file mode 100644 index 0000000..8892ed3 --- /dev/null +++ b/tests/Unit/HasDefaultsTest.php @@ -0,0 +1,31 @@ +target = new class + { + use HasDefaults; + }; + } + + public function testDefaultsStartsEmpty(): void + { + $this->assertEmpty($this->target->defaults); + } + + public function testDefault(): void + { + $this->target->default('foo', 'bar'); + $this->assertArrayHasKey('foo', $this->target->defaults); + $this->assertEquals('bar', $this->target->defaults['foo']); + } +} diff --git a/tests/Unit/HasGeneratorsTest.php b/tests/Unit/HasGeneratorsTest.php new file mode 100644 index 0000000..70a4825 --- /dev/null +++ b/tests/Unit/HasGeneratorsTest.php @@ -0,0 +1,30 @@ +target = new class + { + use HasGenerators; + }; + } + + public function testGeneratorsStartsEmpty(): void + { + $this->assertEmpty($this->target->generators); + } + + public function testGenerate(): void + { + $this->target->generate('foo', fn () => 'bar'); + $this->assertIsCallable($this->target->generators['foo']); + } +} diff --git a/tests/Unit/HasMutatorsTest.php b/tests/Unit/HasMutatorsTest.php new file mode 100644 index 0000000..821bb56 --- /dev/null +++ b/tests/Unit/HasMutatorsTest.php @@ -0,0 +1,31 @@ +target = new class + { + use HasMutators; + }; + } + + public function testMutateStartsEmpty(): void + { + $this->assertEmpty($this->target->mutators); + } + + public function testMutate(): void + { + $this->target->mutate('foo', fn () => 'bar'); + $this->assertArrayHasKey('foo', $this->target->mutators); + $this->assertIsCallable($this->target->mutators['foo']); + } +} diff --git a/tests/Unit/HasRecordsTest.php b/tests/Unit/HasRecordsTest.php new file mode 100644 index 0000000..e3af322 --- /dev/null +++ b/tests/Unit/HasRecordsTest.php @@ -0,0 +1,53 @@ +target = new class + { + use HasRecords; + }; + } + + public function testRecordsStartsEmpty(): void + { + $this->assertEmpty($this->target->records); + } + + public function testRecord(): void + { + $this->target->record('foo', fn () => [ + 'baz' => 'bee', + ]); + $this->target->record('bar', [ + 'baz' => 'bee', + ]); + $this->assertEquals(['foo' => ['baz' => 'bee'], 'bar' => ['baz' => 'bee']], $this->target->records); + } + + public function testRecordsCallable(): void + { + $this->target->records(fn () => [ + 'foo' => ['baz' => 'bee'], + 'bar' => ['baz' => 'bee'], + ]); + $this->assertEquals(['foo' => ['baz' => 'bee'], 'bar' => ['baz' => 'bee']], $this->target->records); + } + + public function testRecordsArray(): void + { + $this->target->records([ + 'foo' => ['baz' => 'bee'], + 'bar' => ['baz' => 'bee'], + ]); + $this->assertEquals(['foo' => ['baz' => 'bee'], 'bar' => ['baz' => 'bee']], $this->target->records); + } +} diff --git a/tests/Unit/MemoryTest.php b/tests/Unit/MemoryTest.php new file mode 100644 index 0000000..ed20841 --- /dev/null +++ b/tests/Unit/MemoryTest.php @@ -0,0 +1,35 @@ +storage = new Memory(); + } + + public function testAllStartsEmpty(): void + { + $this->assertEmpty($this->storage->all()); + } + + public function testGetValue(): void + { + $this->assertNull($this->storage->get('foo', 'bar')); + $this->storage->set('foo', 'bar', 'baz'); + $this->assertEquals('baz', $this->storage->get('foo', 'bar')); + } + + public function testHasValue(): void + { + $this->assertFalse($this->storage->has('foo', 'bar')); + $this->storage->set('foo', 'bar', 'baz'); + $this->assertTrue($this->storage->has('foo', 'bar')); + } +}