diff --git a/CHANGELOG.md b/CHANGELOG.md index a11db5534..15bd1fd2b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,72 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [8.14.0] - 2024-11-13 + +### Added + +* Test that ensures the `RequestMustBeJson` middleware throws `BadRequestHttpException`, when no `content-type` is set in the request headers. + +### Changed + +* Updated dependencies (_service update_). + +## [8.13.0] - 2024-10-29 + +### Changed + +* Updated dependencies (_service update_). + +### Fixed + +* `TypeError` thrown in `CaptureFieldsToSelect` middleware, when "select" query parameter is not a string. [#197](https://github.com/aedart/athenaeum/issues/197). + +## [8.12.0] - 2024-10-21 + +### Changed + +* Updated dependencies (_service update_). + +## [8.11.0] - 2024-10-02 + +### Changed + +* Updated dependencies (_service update_). + +### Fixed + +* `DatabaseAdapter` fails when attempting to move or copy to the same destination as the source (_adapter now skips performing `move()` or `copy()`, if source and destination are the same_). [#195](https://github.com/aedart/athenaeum/issues/195). + +## [8.10.0] - 2024-09-23 + +### Changed + +* Updated dependencies (_service update_). + +## [8.9.0] - 2024-09-04 + +### Changed + +* Updated dependencies (_service update_). + +### Fixed + +* Incorrect `port` argument, in `BrowserTestCase` (_`--port` expected, but `port` was given as argument_). + +## [8.8.0] - 2024-08-07 + +### Changed + +* Updated dependencies (_service update_). + +## [8.7.0] - 2024-07-22 + +### Changed + +* Updated dependencies (_service update_). + +## [8.6.0] - 2024-06-27 + ### Changed * Updated dependencies (_service update_). @@ -1482,7 +1548,16 @@ It will high-jack the `app` binding, which will cause your application to behave * Please review commits on [GitHub](https://github.com/aedart/athenaeum/commits/master) -[Unreleased]: https://github.com/aedart/athenaeum/compare/8.5.0...HEAD +[Unreleased]: https://github.com/aedart/athenaeum/compare/8.14.0...HEAD +[8.14.0]: https://github.com/aedart/athenaeum/compare/8.13.0...8.14.0 +[8.13.0]: https://github.com/aedart/athenaeum/compare/8.12.0...8.13.0 +[8.12.0]: https://github.com/aedart/athenaeum/compare/8.11.0...8.12.0 +[8.11.0]: https://github.com/aedart/athenaeum/compare/8.10.0...8.11.0 +[8.10.0]: https://github.com/aedart/athenaeum/compare/8.9.0...8.10.0 +[8.9.0]: https://github.com/aedart/athenaeum/compare/8.8.0...8.9.0 +[8.8.0]: https://github.com/aedart/athenaeum/compare/8.7.0...8.8.0 +[8.7.0]: https://github.com/aedart/athenaeum/compare/8.6.0...8.7.0 +[8.6.0]: https://github.com/aedart/athenaeum/compare/8.5.0...8.6.0 [8.5.0]: https://github.com/aedart/athenaeum/compare/8.4.0...8.5.0 [8.4.0]: https://github.com/aedart/athenaeum/compare/8.3.0...8.4.0 [8.3.0]: https://github.com/aedart/athenaeum/compare/8.2.0...8.3.0 diff --git a/README.md b/README.md index aebd79248..b2eab4c17 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ _A configuration loader, supporting *.ini, *.json, *.php, *.yml, *.toml, and *.n **[Core](https://aedart.github.io/athenaeum/archive/current/core/)** -_A custom Laravel Application implementation, intended to be testing, tinkering or developing non-essential custom applications._ +_A custom Laravel Application implementation, intended for testing, tinkering or development of non-essential custom applications._ **[Circuits](https://aedart.github.io/athenaeum/archive/current/circuits)** diff --git a/composer.json b/composer.json index cfc0d1029..8b17ce1b2 100644 --- a/composer.json +++ b/composer.json @@ -14,35 +14,35 @@ "ext-json": "*", "ext-sockets": "*", "composer-runtime-api": "^2.2.2", - "dragonmantank/cron-expression": "^3.3.3", - "fakerphp/faker": "^v1.23.1", - "guzzlehttp/guzzle": "^7.8.1", - "illuminate/auth": "^v11.13.0", - "illuminate/cache": "^v11.13.0", - "illuminate/collections": "^v11.13.0", - "illuminate/config": "^v11.13.0", - "illuminate/console": "^v11.13.0", - "illuminate/container": "^v11.13.0", - "illuminate/contracts": "^v11.13.0", - "illuminate/database": "^v11.13.0", - "illuminate/events": "^v11.13.0", - "illuminate/filesystem": "^v11.13.0", - "illuminate/http": "^v11.13.0", - "illuminate/pipeline": "^v11.13.0", - "illuminate/support": "^v11.13.0", - "illuminate/translation": "^v11.13.0", - "illuminate/validation": "^v11.13.0", - "league/flysystem": "^3.28.0", + "dragonmantank/cron-expression": "^3.4.0", + "fakerphp/faker": "^v1.24.0", + "guzzlehttp/guzzle": "^7.9.2", + "illuminate/auth": "^v11.31.0", + "illuminate/cache": "^v11.31.0", + "illuminate/collections": "^v11.31.0", + "illuminate/config": "^v11.31.0", + "illuminate/console": "^v11.31.0", + "illuminate/container": "^v11.31.0", + "illuminate/contracts": "^v11.31.0", + "illuminate/database": "^v11.31.0", + "illuminate/events": "^v11.31.0", + "illuminate/filesystem": "^v11.31.0", + "illuminate/http": "^v11.31.0", + "illuminate/pipeline": "^v11.31.0", + "illuminate/support": "^v11.31.0", + "illuminate/translation": "^v11.31.0", + "illuminate/validation": "^v11.31.0", + "league/flysystem": "^3.29.1", "mockery/mockery": "1.6.*", "psr/http-client": "^1.0.3", "psr/http-factory": "^1.1.0", "psr/http-message": "^1.1", - "psr/log": "^3.0.0", + "psr/log": "^3.0.2", "ramsey/http-range": "^1.1.0", "shrikeh/teapot": "^2.3.1", - "symfony/console": "^v7.1.1", - "symfony/finder": "^7.1.1", - "vlucas/phpdotenv": "^5.6.0", + "symfony/console": "^v7.1.7", + "symfony/finder": "^7.1.6", + "vlucas/phpdotenv": "^5.6.1", "xenolope/quahog": "^3.0" }, "require-dev": { @@ -50,18 +50,18 @@ "bamarni/composer-bin-plugin": "^1.8.2", "codeception/codeception": "^5.1.2", "codeception/module-asserts": "^3.0.0", - "illuminate/testing": "^v11.13.0", - "laravel/fortify": "^1.21.3", - "league/flysystem-adapter-test-utilities": "^3.28.0", - "nette/neon": "^3.4.1", - "orchestra/testbench": "^v9.1.2", - "orchestra/testbench-dusk": "^v9.3.0", - "phpstan/phpstan": "^1.11.5", + "illuminate/testing": "^v11.31.0", + "laravel/fortify": "^1.24.5", + "league/flysystem-adapter-test-utilities": "^3.29.0", + "nette/neon": "^3.4.4", + "orchestra/testbench": "^v9.5.2", + "orchestra/testbench-dusk": "^v9.8.1", + "phpstan/phpstan": "^1.12.10", "predis/predis": "^2.2.2", "roave/security-advisories": "dev-master", - "symfony/var-dumper": "^v7.1.1", - "symfony/yaml": "^v7.1.1", - "twig/twig": "^3.10.3", + "symfony/var-dumper": "^v7.1.7", + "symfony/yaml": "^v7.1.6", + "twig/twig": "^3.14.2", "yosymfony/toml": "^1.0.4" }, "autoload": { @@ -111,40 +111,17 @@ "Aedart\\Tests\\": "tests/" } }, - "replace": { - "aedart/athenaeum-acl": "8.5.0", - "aedart/athenaeum-antivirus": "8.5.0", - "aedart/athenaeum-audit": "8.5.0", - "aedart/athenaeum-auth": "8.5.0", - "aedart/athenaeum-circuits": "8.5.0", - "aedart/athenaeum-collections": "8.5.0", - "aedart/athenaeum-config": "8.5.0", - "aedart/athenaeum-console": "8.5.0", - "aedart/athenaeum-container": "8.5.0", - "aedart/athenaeum-contracts": "8.5.0", - "aedart/athenaeum-core": "8.5.0", - "aedart/athenaeum-database": "8.5.0", - "aedart/athenaeum-dto": "8.5.0", - "aedart/athenaeum-etags": "8.5.0", - "aedart/athenaeum-events": "8.5.0", - "aedart/athenaeum-filters": "8.5.0", - "aedart/athenaeum-flysystem-db": "8.5.0", - "aedart/athenaeum-http-api": "8.5.0", - "aedart/athenaeum-http-clients": "8.5.0", - "aedart/athenaeum-http-cookies": "8.5.0", - "aedart/athenaeum-http-messages": "8.5.0", - "aedart/athenaeum-maintenance-modes": "8.5.0", - "aedart/athenaeum-mime-types": "8.5.0", - "aedart/athenaeum-pagination": "8.5.0", - "aedart/athenaeum-properties": "8.5.0", - "aedart/athenaeum-redmine": "8.5.0", - "aedart/athenaeum-service": "8.5.0", - "aedart/athenaeum-streams": "8.5.0", - "aedart/athenaeum-support": "8.5.0", - "aedart/athenaeum-testing": "8.5.0", - "aedart/athenaeum-translation": "8.5.0", - "aedart/athenaeum-utils": "8.5.0", - "aedart/athenaeum-validation": "8.5.0" + "extra": { + "branch-alias": { + "dev-master": "8.15.x-dev" + }, + "extra": { + "bamarni-bin": { + "bin-links": false, + "target-directory": "vendor-bin", + "forward-command": false + } + } }, "scripts": { "post-install-cmd": [ @@ -174,17 +151,40 @@ "bamarni/composer-bin-plugin": true } }, - "extra": { - "branch-alias": { - "dev-master": "8.6.x-dev" - }, - "extra": { - "bamarni-bin": { - "bin-links": false, - "target-directory": "vendor-bin", - "forward-command": false - } - } + "replace": { + "aedart/athenaeum-acl": "8.14.0", + "aedart/athenaeum-antivirus": "8.14.0", + "aedart/athenaeum-audit": "8.14.0", + "aedart/athenaeum-auth": "8.14.0", + "aedart/athenaeum-circuits": "8.14.0", + "aedart/athenaeum-collections": "8.14.0", + "aedart/athenaeum-config": "8.14.0", + "aedart/athenaeum-console": "8.14.0", + "aedart/athenaeum-container": "8.14.0", + "aedart/athenaeum-contracts": "8.14.0", + "aedart/athenaeum-core": "8.14.0", + "aedart/athenaeum-database": "8.14.0", + "aedart/athenaeum-dto": "8.14.0", + "aedart/athenaeum-etags": "8.14.0", + "aedart/athenaeum-events": "8.14.0", + "aedart/athenaeum-filters": "8.14.0", + "aedart/athenaeum-flysystem-db": "8.14.0", + "aedart/athenaeum-http-api": "8.14.0", + "aedart/athenaeum-http-clients": "8.14.0", + "aedart/athenaeum-http-cookies": "8.14.0", + "aedart/athenaeum-http-messages": "8.14.0", + "aedart/athenaeum-maintenance-modes": "8.14.0", + "aedart/athenaeum-mime-types": "8.14.0", + "aedart/athenaeum-pagination": "8.14.0", + "aedart/athenaeum-properties": "8.14.0", + "aedart/athenaeum-redmine": "8.14.0", + "aedart/athenaeum-service": "8.14.0", + "aedart/athenaeum-streams": "8.14.0", + "aedart/athenaeum-support": "8.14.0", + "aedart/athenaeum-testing": "8.14.0", + "aedart/athenaeum-translation": "8.14.0", + "aedart/athenaeum-utils": "8.14.0", + "aedart/athenaeum-validation": "8.14.0" }, "minimum-stability": "dev", "prefer-stable": true diff --git a/monorepo-builder.php b/monorepo-builder.php index dea18b43e..83bd893f3 100644 --- a/monorepo-builder.php +++ b/monorepo-builder.php @@ -49,9 +49,9 @@ 'roave/security-advisories' => 'dev-master', 'codeception/codeception' => '^5.1.2', "codeception/module-asserts" => "^3.0.0", - 'orchestra/testbench' => '^v9.1.2', - 'orchestra/testbench-dusk' => '^v9.3.0', - 'illuminate/testing' => '^v11.13.0' + 'orchestra/testbench' => '^v9.5.2', + 'orchestra/testbench-dusk' => '^v9.8.1', + 'illuminate/testing' => '^v11.31.0' ], ComposerJsonSection::AUTOLOAD => [ diff --git a/packages/Acl/composer.json b/packages/Acl/composer.json index 1db726e6b..7d065606b 100644 --- a/packages/Acl/composer.json +++ b/packages/Acl/composer.json @@ -11,35 +11,35 @@ ], "homepage": "https://aedart.github.io/athenaeum/", "license": "BSD-3-Clause", - "type": "library", "authors": [ { "name": "Alin Eugen Deac", "email": "aedart@gmail.com" } ], + "type": "library", "require": { "php": "^8.2", - "aedart/athenaeum-contracts": "^8.6", - "aedart/athenaeum-database": "^8.6", - "aedart/athenaeum-support": "^8.6", - "aedart/athenaeum-utils": "^8.6", - "aedart/athenaeum-validation": "^8.6", - "illuminate/auth": "^v11.13.0" + "aedart/athenaeum-contracts": "^8.15", + "aedart/athenaeum-database": "^8.15", + "aedart/athenaeum-support": "^8.15", + "aedart/athenaeum-utils": "^8.15", + "aedart/athenaeum-validation": "^8.15", + "illuminate/auth": "^v11.31.0" }, "autoload": { "psr-4": { "Aedart\\Acl\\": "src" } }, - "config": { - "sort-packages": true - }, "extra": { "branch-alias": { "dev-master": "7.1.x-dev" } }, + "config": { + "sort-packages": true + }, "minimum-stability": "dev", "prefer-stable": true } diff --git a/packages/Antivirus/composer.json b/packages/Antivirus/composer.json index c8cba82ac..ba01f626e 100644 --- a/packages/Antivirus/composer.json +++ b/packages/Antivirus/composer.json @@ -8,21 +8,21 @@ ], "homepage": "https://aedart.github.io/athenaeum/", "license": "BSD-3-Clause", - "type": "library", "authors": [ { "name": "Alin Eugen Deac", "email": "aedart@gmail.com" } ], + "type": "library", "require": { "php": "^8.2", "ext-sockets": "*", - "aedart/athenaeum-contracts": "^8.6", - "aedart/athenaeum-streams": "^8.6", - "aedart/athenaeum-support": "^8.6", - "aedart/athenaeum-validation": "^8.6", - "illuminate/events": "^v11.13.0", + "aedart/athenaeum-contracts": "^8.15", + "aedart/athenaeum-streams": "^8.15", + "aedart/athenaeum-support": "^8.15", + "aedart/athenaeum-validation": "^8.15", + "illuminate/events": "^v11.31.0", "xenolope/quahog": "^3.0" }, "autoload": { @@ -30,14 +30,14 @@ "Aedart\\Antivirus\\": "src" } }, - "config": { - "sort-packages": true - }, "extra": { "branch-alias": { "dev-master": "7.1.x-dev" } }, + "config": { + "sort-packages": true + }, "minimum-stability": "dev", "prefer-stable": true } diff --git a/packages/Audit/composer.json b/packages/Audit/composer.json index c50ef8064..3b82a54c1 100644 --- a/packages/Audit/composer.json +++ b/packages/Audit/composer.json @@ -19,10 +19,10 @@ ], "require": { "php": "^8.2", - "aedart/athenaeum-contracts": "^8.6", - "aedart/athenaeum-database": "^8.6", - "aedart/athenaeum-support": "^8.6", - "aedart/athenaeum-utils": "^8.6" + "aedart/athenaeum-contracts": "^8.15", + "aedart/athenaeum-database": "^8.15", + "aedart/athenaeum-support": "^8.15", + "aedart/athenaeum-utils": "^8.15" }, "autoload": { "psr-4": { diff --git a/packages/Auth/composer.json b/packages/Auth/composer.json index de5fddd6e..63b85f7db 100644 --- a/packages/Auth/composer.json +++ b/packages/Auth/composer.json @@ -7,34 +7,34 @@ ], "homepage": "https://aedart.github.io/athenaeum/", "license": "BSD-3-Clause", - "type": "library", "authors": [ { "name": "Alin Eugen Deac", "email": "aedart@gmail.com" } ], + "type": "library", "require": { "php": "^8.2", - "aedart/athenaeum-contracts": "^8.6", - "aedart/athenaeum-support": "^8.6" + "aedart/athenaeum-contracts": "^8.15", + "aedart/athenaeum-support": "^8.15" }, "require-dev": { - "laravel/fortify": "^1.21.3" + "laravel/fortify": "^1.24.5" }, "autoload": { "psr-4": { "Aedart\\Auth\\": "src" } }, - "config": { - "sort-packages": true - }, "extra": { "branch-alias": { "dev-master": "7.1.x-dev" } }, + "config": { + "sort-packages": true + }, "minimum-stability": "dev", "prefer-stable": true } diff --git a/packages/Circuits/composer.json b/packages/Circuits/composer.json index cab30e2ed..73437ad41 100644 --- a/packages/Circuits/composer.json +++ b/packages/Circuits/composer.json @@ -7,34 +7,34 @@ ], "homepage": "https://aedart.github.io/athenaeum/", "license": "BSD-3-Clause", - "type": "library", "authors": [ { "name": "Alin Eugen Deac", "email": "aedart@gmail.com" } ], + "type": "library", "require": { "php": "^8.2", - "aedart/athenaeum-contracts": "^8.6", - "aedart/athenaeum-support": "^8.6", - "aedart/athenaeum-utils": "^8.6", - "illuminate/cache": "^v11.13.0", - "illuminate/events": "^v11.13.0" + "aedart/athenaeum-contracts": "^8.15", + "aedart/athenaeum-support": "^8.15", + "aedart/athenaeum-utils": "^8.15", + "illuminate/cache": "^v11.31.0", + "illuminate/events": "^v11.31.0" }, "autoload": { "psr-4": { "Aedart\\Circuits\\": "src" } }, - "config": { - "sort-packages": true - }, "extra": { "branch-alias": { "dev-master": "7.1.x-dev" } }, + "config": { + "sort-packages": true + }, "minimum-stability": "dev", "prefer-stable": true } diff --git a/packages/Collections/composer.json b/packages/Collections/composer.json index 6fdd32bb2..3ea7da200 100644 --- a/packages/Collections/composer.json +++ b/packages/Collections/composer.json @@ -8,37 +8,37 @@ ], "homepage": "https://aedart.github.io/athenaeum/", "license": "BSD-3-Clause", - "type": "library", "authors": [ { "name": "Alin Eugen Deac", "email": "aedart@gmail.com" } ], + "type": "library", "require": { "php": "^8.2", - "aedart/athenaeum-container": "^8.6", - "aedart/athenaeum-contracts": "^8.6", - "aedart/athenaeum-support": "^8.6", - "aedart/athenaeum-utils": "^8.6", - "illuminate/collections": "^v11.13.0" + "aedart/athenaeum-container": "^8.15", + "aedart/athenaeum-contracts": "^8.15", + "aedart/athenaeum-support": "^8.15", + "aedart/athenaeum-utils": "^8.15", + "illuminate/collections": "^v11.31.0" }, "autoload": { "psr-4": { "Aedart\\Collections\\": "src" } }, + "extra": { + "branch-alias": { + "dev-master": "7.1.x-dev" + } + }, "suggest": { "symfony/var-dumper": "symfony/var-dumper: Required to use the dd and dump functions." }, "config": { "sort-packages": true }, - "extra": { - "branch-alias": { - "dev-master": "7.1.x-dev" - } - }, "minimum-stability": "dev", "prefer-stable": true } diff --git a/packages/Config/composer.json b/packages/Config/composer.json index c2d29586b..5803725f8 100644 --- a/packages/Config/composer.json +++ b/packages/Config/composer.json @@ -14,24 +14,24 @@ ], "homepage": "https://aedart.github.io/athenaeum/", "license": "BSD-3-Clause", - "type": "library", "authors": [ { "name": "Alin Eugen Deac", "email": "aedart@gmail.com" } ], + "type": "library", "require": { "php": "^8.2", - "aedart/athenaeum-contracts": "^8.6", - "aedart/athenaeum-support": "^8.6", - "aedart/athenaeum-utils": "^8.6", - "illuminate/config": "^v11.13.0", - "illuminate/filesystem": "^v11.13.0" + "aedart/athenaeum-contracts": "^8.15", + "aedart/athenaeum-support": "^8.15", + "aedart/athenaeum-utils": "^8.15", + "illuminate/config": "^v11.31.0", + "illuminate/filesystem": "^v11.31.0" }, "require-dev": { - "nette/neon": "^3.4.1", - "symfony/yaml": "^v7.1.1", + "nette/neon": "^3.4.4", + "symfony/yaml": "^v7.1.6", "yosymfony/toml": "^1.0.4" }, "autoload": { @@ -39,14 +39,14 @@ "Aedart\\Config\\": "src" } }, - "config": { - "sort-packages": true - }, "extra": { "branch-alias": { "dev-master": "7.1.x-dev" } }, + "config": { + "sort-packages": true + }, "minimum-stability": "dev", "prefer-stable": true } diff --git a/packages/Console/composer.json b/packages/Console/composer.json index 3c2572aa4..3fc582e6e 100644 --- a/packages/Console/composer.json +++ b/packages/Console/composer.json @@ -9,34 +9,34 @@ ], "homepage": "https://aedart.github.io/athenaeum/", "license": "BSD-3-Clause", - "type": "library", "authors": [ { "name": "Alin Eugen Deac", "email": "aedart@gmail.com" } ], + "type": "library", "require": { "php": "^8.2", - "aedart/athenaeum-contracts": "^8.6", - "aedart/athenaeum-support": "^8.6", - "dragonmantank/cron-expression": "^3.3.3", - "illuminate/cache": "^v11.13.0", - "illuminate/console": "^v11.13.0" + "aedart/athenaeum-contracts": "^8.15", + "aedart/athenaeum-support": "^8.15", + "dragonmantank/cron-expression": "^3.4.0", + "illuminate/cache": "^v11.31.0", + "illuminate/console": "^v11.31.0" }, "autoload": { "psr-4": { "Aedart\\Console\\": "src" } }, - "config": { - "sort-packages": true - }, "extra": { "branch-alias": { "dev-master": "7.1.x-dev" } }, + "config": { + "sort-packages": true + }, "minimum-stability": "dev", "prefer-stable": true } diff --git a/packages/Container/composer.json b/packages/Container/composer.json index 06a766932..5d1ac340d 100644 --- a/packages/Container/composer.json +++ b/packages/Container/composer.json @@ -9,32 +9,32 @@ ], "homepage": "https://aedart.github.io/athenaeum/", "license": "BSD-3-Clause", - "type": "library", "authors": [ { "name": "Alin Eugen Deac", "email": "aedart@gmail.com" } ], + "type": "library", "require": { "php": "^8.2", - "aedart/athenaeum-contracts": "^8.6", - "aedart/athenaeum-support": "^8.6", - "illuminate/container": "^v11.13.0" + "aedart/athenaeum-contracts": "^8.15", + "aedart/athenaeum-support": "^8.15", + "illuminate/container": "^v11.31.0" }, "autoload": { "psr-4": { "Aedart\\Container\\": "src" } }, - "config": { - "sort-packages": true - }, "extra": { "branch-alias": { "dev-master": "7.1.x-dev" } }, + "config": { + "sort-packages": true + }, "minimum-stability": "dev", "prefer-stable": true } diff --git a/packages/Contracts/composer.json b/packages/Contracts/composer.json index 912bbe000..1d37bf3df 100644 --- a/packages/Contracts/composer.json +++ b/packages/Contracts/composer.json @@ -8,30 +8,30 @@ ], "homepage": "https://aedart.github.io/athenaeum/", "license": "BSD-3-Clause", - "type": "library", "authors": [ { "name": "Alin Eugen Deac", "email": "aedart@gmail.com" } ], + "type": "library", "require": { "php": "^8.2", - "illuminate/contracts": "^v11.13.0" + "illuminate/contracts": "^v11.31.0" }, "autoload": { "psr-4": { "Aedart\\Contracts\\": "src" } }, - "config": { - "sort-packages": true - }, "extra": { "branch-alias": { "dev-master": "7.1.x-dev" } }, + "config": { + "sort-packages": true + }, "minimum-stability": "dev", "prefer-stable": true } diff --git a/packages/Core/composer.json b/packages/Core/composer.json index 0d55c6ead..85e349acc 100644 --- a/packages/Core/composer.json +++ b/packages/Core/composer.json @@ -8,33 +8,33 @@ ], "homepage": "https://aedart.github.io/athenaeum/", "license": "BSD-3-Clause", - "type": "library", "authors": [ { "name": "Alin Eugen Deac", "email": "aedart@gmail.com" } ], + "type": "library", "require": { "php": "^8.2", - "aedart/athenaeum-config": "^8.6", - "aedart/athenaeum-console": "^8.6", - "aedart/athenaeum-container": "^8.6", - "aedart/athenaeum-contracts": "^8.6", - "aedart/athenaeum-dto": "^8.6", - "aedart/athenaeum-events": "^8.6", - "aedart/athenaeum-maintenance-modes": "^8.6", - "aedart/athenaeum-service": "^8.6", - "aedart/athenaeum-support": "^8.6", - "aedart/athenaeum-utils": "^8.6", - "illuminate/cache": "^v11.13.0", - "illuminate/filesystem": "^v11.13.0", - "psr/log": "^3.0.0", - "symfony/console": "^v7.1.1", - "vlucas/phpdotenv": "^5.6.0" + "aedart/athenaeum-config": "^8.15", + "aedart/athenaeum-console": "^8.15", + "aedart/athenaeum-container": "^8.15", + "aedart/athenaeum-contracts": "^8.15", + "aedart/athenaeum-dto": "^8.15", + "aedart/athenaeum-events": "^8.15", + "aedart/athenaeum-maintenance-modes": "^8.15", + "aedart/athenaeum-service": "^8.15", + "aedart/athenaeum-support": "^8.15", + "aedart/athenaeum-utils": "^8.15", + "illuminate/cache": "^v11.31.0", + "illuminate/filesystem": "^v11.31.0", + "psr/log": "^3.0.2", + "symfony/console": "^v7.1.7", + "vlucas/phpdotenv": "^5.6.1" }, "require-dev": { - "symfony/var-dumper": "^v7.1.1" + "symfony/var-dumper": "^v7.1.7" }, "autoload": { "psr-4": { @@ -44,14 +44,14 @@ "helpers/paths.php" ] }, - "config": { - "sort-packages": true - }, "extra": { "branch-alias": { "dev-master": "7.1.x-dev" } }, + "config": { + "sort-packages": true + }, "minimum-stability": "dev", "prefer-stable": true } diff --git a/packages/Database/composer.json b/packages/Database/composer.json index 2ff58c8fc..1bddd6b74 100644 --- a/packages/Database/composer.json +++ b/packages/Database/composer.json @@ -8,33 +8,33 @@ ], "homepage": "https://aedart.github.io/athenaeum/", "license": "BSD-3-Clause", - "type": "library", "authors": [ { "name": "Alin Eugen Deac", "email": "aedart@gmail.com" } ], + "type": "library", "require": { "php": "^8.2", - "aedart/athenaeum-contracts": "^8.6", - "aedart/athenaeum-support": "^8.6", - "aedart/athenaeum-utils": "^8.6", - "illuminate/database": "^v11.13.0" + "aedart/athenaeum-contracts": "^8.15", + "aedart/athenaeum-support": "^8.15", + "aedart/athenaeum-utils": "^8.15", + "illuminate/database": "^v11.31.0" }, "autoload": { "psr-4": { "Aedart\\Database\\": "src" } }, - "config": { - "sort-packages": true - }, "extra": { "branch-alias": { "dev-master": "7.1.x-dev" } }, + "config": { + "sort-packages": true + }, "minimum-stability": "dev", "prefer-stable": true } diff --git a/packages/Dto/composer.json b/packages/Dto/composer.json index 51f3e12f8..820611da1 100644 --- a/packages/Dto/composer.json +++ b/packages/Dto/composer.json @@ -17,9 +17,9 @@ ], "require": { "php": "^8.2", - "aedart/athenaeum-contracts": "^8.6", - "aedart/athenaeum-properties": "^8.6", - "aedart/athenaeum-utils": "^8.6" + "aedart/athenaeum-contracts": "^8.15", + "aedart/athenaeum-properties": "^8.15", + "aedart/athenaeum-utils": "^8.15" }, "autoload": { "psr-4": { diff --git a/packages/ETags/composer.json b/packages/ETags/composer.json index 62e679d98..7f71b76ce 100644 --- a/packages/ETags/composer.json +++ b/packages/ETags/composer.json @@ -10,20 +10,20 @@ ], "homepage": "https://aedart.github.io/athenaeum/", "license": "BSD-3-Clause", - "type": "library", "authors": [ { "name": "Alin Eugen Deac", "email": "aedart@gmail.com" } ], + "type": "library", "require": { "php": "^8.2", - "aedart/athenaeum-contracts": "^8.6", - "aedart/athenaeum-streams": "^8.6", - "aedart/athenaeum-support": "^8.6", - "aedart/athenaeum-utils": "^8.6", - "illuminate/http": "^v11.13.0", + "aedart/athenaeum-contracts": "^8.15", + "aedart/athenaeum-streams": "^8.15", + "aedart/athenaeum-support": "^8.15", + "aedart/athenaeum-utils": "^8.15", + "illuminate/http": "^v11.31.0", "ramsey/http-range": "^1.1.0" }, "autoload": { @@ -31,14 +31,14 @@ "Aedart\\ETags\\": "src" } }, - "config": { - "sort-packages": true - }, "extra": { "branch-alias": { "dev-master": "7.1.x-dev" } }, + "config": { + "sort-packages": true + }, "minimum-stability": "dev", "prefer-stable": true } diff --git a/packages/Events/composer.json b/packages/Events/composer.json index 6cd724ff5..1a467c3b7 100644 --- a/packages/Events/composer.json +++ b/packages/Events/composer.json @@ -9,31 +9,31 @@ ], "homepage": "https://aedart.github.io/athenaeum/", "license": "BSD-3-Clause", - "type": "library", "authors": [ { "name": "Alin Eugen Deac", "email": "aedart@gmail.com" } ], + "type": "library", "require": { "php": "^8.2", - "aedart/athenaeum-support": "^8.6", - "illuminate/events": "^v11.13.0" + "aedart/athenaeum-support": "^8.15", + "illuminate/events": "^v11.31.0" }, "autoload": { "psr-4": { "Aedart\\Events\\": "src" } }, - "config": { - "sort-packages": true - }, "extra": { "branch-alias": { "dev-master": "7.1.x-dev" } }, + "config": { + "sort-packages": true + }, "minimum-stability": "dev", "prefer-stable": true } diff --git a/packages/Filters/composer.json b/packages/Filters/composer.json index 7792615bf..d5307aef3 100644 --- a/packages/Filters/composer.json +++ b/packages/Filters/composer.json @@ -10,36 +10,36 @@ ], "homepage": "https://aedart.github.io/athenaeum/", "license": "BSD-3-Clause", - "type": "library", "authors": [ { "name": "Alin Eugen Deac", "email": "aedart@gmail.com" } ], + "type": "library", "require": { "php": "^8.2", - "aedart/athenaeum-contracts": "^8.6", - "aedart/athenaeum-database": "^8.6", - "aedart/athenaeum-support": "^8.6", - "aedart/athenaeum-utils": "^8.6", - "aedart/athenaeum-validation": "^8.6", - "illuminate/http": "^v11.13.0", - "illuminate/pipeline": "^v11.13.0" + "aedart/athenaeum-contracts": "^8.15", + "aedart/athenaeum-database": "^8.15", + "aedart/athenaeum-support": "^8.15", + "aedart/athenaeum-utils": "^8.15", + "aedart/athenaeum-validation": "^8.15", + "illuminate/http": "^v11.31.0", + "illuminate/pipeline": "^v11.31.0" }, "autoload": { "psr-4": { "Aedart\\Filters\\": "src" } }, - "config": { - "sort-packages": true - }, "extra": { "branch-alias": { "dev-master": "7.1.x-dev" } }, + "config": { + "sort-packages": true + }, "minimum-stability": "dev", "prefer-stable": true } diff --git a/packages/Flysystem/Db/composer.json b/packages/Flysystem/Db/composer.json index 47da6a0b8..c006aaa71 100644 --- a/packages/Flysystem/Db/composer.json +++ b/packages/Flysystem/Db/composer.json @@ -10,40 +10,40 @@ ], "homepage": "https://aedart.github.io/athenaeum/", "license": "BSD-3-Clause", - "type": "library", "authors": [ { "name": "Alin Eugen Deac", "email": "aedart@gmail.com" } ], + "type": "library", "require": { "php": "^8.2", - "aedart/athenaeum-container": "^8.6", - "aedart/athenaeum-database": "^8.6", - "aedart/athenaeum-streams": "^8.6", - "illuminate/console": "^v11.13.0", - "league/flysystem": "^3.28.0" + "aedart/athenaeum-container": "^8.15", + "aedart/athenaeum-database": "^8.15", + "aedart/athenaeum-streams": "^8.15", + "illuminate/console": "^v11.31.0", + "league/flysystem": "^3.29.1" }, "require-dev": { - "league/flysystem-adapter-test-utilities": "^3.28.0" + "league/flysystem-adapter-test-utilities": "^3.29.0" }, "autoload": { "psr-4": { "Aedart\\Flysystem\\Db\\": "src" } }, + "extra": { + "branch-alias": { + "dev-master": "7.1.x-dev" + } + }, "bin": [ "bin/table_schemas" ], "config": { "sort-packages": true }, - "extra": { - "branch-alias": { - "dev-master": "7.1.x-dev" - } - }, "minimum-stability": "dev", "prefer-stable": true } diff --git a/packages/Flysystem/Db/src/Adapters/DatabaseAdapter.php b/packages/Flysystem/Db/src/Adapters/DatabaseAdapter.php index 97b7569bc..56b4f74e3 100644 --- a/packages/Flysystem/Db/src/Adapters/DatabaseAdapter.php +++ b/packages/Flysystem/Db/src/Adapters/DatabaseAdapter.php @@ -471,6 +471,11 @@ public function listContents(string $path, bool $deep): iterable */ public function move(string $source, string $destination, Config $config): void { + // Skip when source and destination are the same... + if ($source === $destination) { + return; + } + try { // Copy the file $this->performCopy($source, $destination, $config); @@ -487,6 +492,11 @@ public function move(string $source, string $destination, Config $config): void */ public function copy(string $source, string $destination, Config $config): void { + // Skip when source and destination are the same... + if ($source === $destination) { + return; + } + try { $this->performCopy($source, $destination, $config); } catch (Throwable $e) { diff --git a/packages/Http/Api/composer.json b/packages/Http/Api/composer.json index 2d6d025a8..a6d11cc5d 100644 --- a/packages/Http/Api/composer.json +++ b/packages/Http/Api/composer.json @@ -9,20 +9,20 @@ ], "homepage": "https://aedart.github.io/athenaeum/", "license": "BSD-3-Clause", - "type": "library", "authors": [ { "name": "Alin Eugen Deac", "email": "aedart@gmail.com" } ], + "type": "library", "require": { "php": "^8.2", - "aedart/athenaeum-contracts": "^8.6", - "aedart/athenaeum-etags": "^8.6", - "aedart/athenaeum-support": "^8.6", - "aedart/athenaeum-validation": "^8.6", - "illuminate/http": "^v11.13.0", + "aedart/athenaeum-contracts": "^8.15", + "aedart/athenaeum-etags": "^8.15", + "aedart/athenaeum-support": "^8.15", + "aedart/athenaeum-validation": "^8.15", + "illuminate/http": "^v11.31.0", "shrikeh/teapot": "^2.3.1" }, "autoload": { @@ -30,17 +30,17 @@ "Aedart\\Http\\Api\\": "src" } }, + "extra": { + "branch-alias": { + "dev-master": "7.1.x-dev" + } + }, "suggest": { "laravel/framework": "Required if you want to make use of API Request abstractions" }, "config": { "sort-packages": true }, - "extra": { - "branch-alias": { - "dev-master": "7.1.x-dev" - } - }, "minimum-stability": "dev", "prefer-stable": true } diff --git a/packages/Http/Api/src/Middleware/CaptureFieldsToSelect.php b/packages/Http/Api/src/Middleware/CaptureFieldsToSelect.php index a92a3192b..860e53d86 100644 --- a/packages/Http/Api/src/Middleware/CaptureFieldsToSelect.php +++ b/packages/Http/Api/src/Middleware/CaptureFieldsToSelect.php @@ -10,6 +10,7 @@ use Closure; use Illuminate\Http\Request; use Illuminate\Validation\ValidationException; +use Symfony\Component\HttpKernel\Exception\BadRequestHttpException; /** * Capture Fields To Select Middleware @@ -97,17 +98,22 @@ protected function cleanup(): void /** * Prepares the selected fields * - * @param string $input Raw query parameter value + * @param mixed $input Raw query parameter value * - * @return string[] + * @return array * * @throws ValidationException + * @throws BadRequestHttpException */ - protected function prepareSelectedFields(string $input): array + protected function prepareSelectedFields(mixed $input): array { - $fields = $this->validateSelectedFields( - explode(',', $input) - ); + $input = match (true) { + is_string($input) => explode(',', $input), + is_array($input) => $input, + default => throw new BadRequestHttpException(sprintf('Malformed %s query parameter', $this->selectQueryKey)) + }; + + $fields = $this->validateSelectedFields($input); return array_map(function ($field) { return strtolower(trim($field)); diff --git a/packages/Http/Clients/composer.json b/packages/Http/Clients/composer.json index d7777148e..7a85c887d 100644 --- a/packages/Http/Clients/composer.json +++ b/packages/Http/Clients/composer.json @@ -10,22 +10,22 @@ ], "homepage": "https://aedart.github.io/athenaeum/", "license": "BSD-3-Clause", - "type": "library", "authors": [ { "name": "Alin Eugen Deac", "email": "aedart@gmail.com" } ], + "type": "library", "require": { "php": "^8.2", - "aedart/athenaeum-container": "^8.6", - "aedart/athenaeum-contracts": "^8.6", - "aedart/athenaeum-http-cookies": "^8.6", - "aedart/athenaeum-http-messages": "^8.6", - "aedart/athenaeum-support": "^8.6", - "guzzlehttp/guzzle": "^7.8.1", - "illuminate/pipeline": "^v11.13.0", + "aedart/athenaeum-container": "^8.15", + "aedart/athenaeum-contracts": "^8.15", + "aedart/athenaeum-http-cookies": "^8.15", + "aedart/athenaeum-http-messages": "^8.15", + "aedart/athenaeum-support": "^8.15", + "guzzlehttp/guzzle": "^7.9.2", + "illuminate/pipeline": "^v11.31.0", "psr/http-client": "^1.0.3", "psr/http-factory": "^1.1.0", "psr/http-message": "^1.1", @@ -36,6 +36,11 @@ "Aedart\\Http\\Clients\\": "src" } }, + "extra": { + "branch-alias": { + "dev-master": "7.1.x-dev" + } + }, "suggest": { "symfony/var-dumper": "Required for using debugging utilities", "illuminate/log": "Required for logging requests / response" @@ -43,11 +48,6 @@ "config": { "sort-packages": true }, - "extra": { - "branch-alias": { - "dev-master": "7.1.x-dev" - } - }, "minimum-stability": "dev", "prefer-stable": true } diff --git a/packages/Http/Cookies/composer.json b/packages/Http/Cookies/composer.json index 4d1feec25..05b640167 100644 --- a/packages/Http/Cookies/composer.json +++ b/packages/Http/Cookies/composer.json @@ -19,7 +19,7 @@ ], "require": { "php": "^8.2", - "aedart/athenaeum-contracts": "^8.6" + "aedart/athenaeum-contracts": "^8.15" }, "autoload": { "psr-4": { diff --git a/packages/Http/Messages/composer.json b/packages/Http/Messages/composer.json index fd3fb921e..ba132886a 100644 --- a/packages/Http/Messages/composer.json +++ b/packages/Http/Messages/composer.json @@ -20,8 +20,8 @@ ], "require": { "php": "^8.2", - "aedart/athenaeum-contracts": "^8.6", - "aedart/athenaeum-support": "^8.6", + "aedart/athenaeum-contracts": "^8.15", + "aedart/athenaeum-support": "^8.15", "psr/http-message": "^1.1" }, "autoload": { diff --git a/packages/Maintenance/Modes/composer.json b/packages/Maintenance/Modes/composer.json index 4fdb189c0..da11f5d90 100644 --- a/packages/Maintenance/Modes/composer.json +++ b/packages/Maintenance/Modes/composer.json @@ -16,8 +16,8 @@ ], "require": { "php": "^8.2", - "aedart/athenaeum-contracts": "^8.6", - "aedart/athenaeum-support": "^8.6" + "aedart/athenaeum-contracts": "^8.15", + "aedart/athenaeum-support": "^8.15" }, "autoload": { "psr-4": { diff --git a/packages/MimeTypes/composer.json b/packages/MimeTypes/composer.json index 5591395bc..6184c0cc7 100644 --- a/packages/MimeTypes/composer.json +++ b/packages/MimeTypes/composer.json @@ -18,8 +18,8 @@ "require": { "php": "^8.2", "ext-fileinfo": "*", - "aedart/athenaeum-contracts": "^8.6", - "aedart/athenaeum-support": "^8.6" + "aedart/athenaeum-contracts": "^8.15", + "aedart/athenaeum-support": "^8.15" }, "autoload": { "psr-4": { diff --git a/packages/Pagination/composer.json b/packages/Pagination/composer.json index 179fcbbc1..d46f86d54 100644 --- a/packages/Pagination/composer.json +++ b/packages/Pagination/composer.json @@ -16,7 +16,7 @@ ], "require": { "php": "^8.2", - "aedart/athenaeum-contracts": "^8.6" + "aedart/athenaeum-contracts": "^8.15" }, "autoload": { "psr-4": { diff --git a/packages/Properties/composer.json b/packages/Properties/composer.json index 7b55f9ce1..202412995 100644 --- a/packages/Properties/composer.json +++ b/packages/Properties/composer.json @@ -18,8 +18,8 @@ ], "require": { "php": "^8.2", - "aedart/athenaeum-contracts": "^8.6", - "aedart/athenaeum-utils": "^8.6" + "aedart/athenaeum-contracts": "^8.15", + "aedart/athenaeum-utils": "^8.15" }, "autoload": { "psr-4": { diff --git a/packages/Redmine/composer.json b/packages/Redmine/composer.json index 773acdf25..d2559264d 100644 --- a/packages/Redmine/composer.json +++ b/packages/Redmine/composer.json @@ -18,9 +18,9 @@ "require": { "php": "^8.2", "ext-json": "*", - "aedart/athenaeum-dto": "^8.6", - "aedart/athenaeum-http-clients": "^8.6", - "aedart/athenaeum-pagination": "^8.6" + "aedart/athenaeum-dto": "^8.15", + "aedart/athenaeum-http-clients": "^8.15", + "aedart/athenaeum-pagination": "^8.15" }, "autoload": { "psr-4": { diff --git a/packages/Service/composer.json b/packages/Service/composer.json index 94504e263..e54449757 100644 --- a/packages/Service/composer.json +++ b/packages/Service/composer.json @@ -17,8 +17,8 @@ ], "require": { "php": "^8.2", - "aedart/athenaeum-contracts": "^8.6", - "aedart/athenaeum-support": "^8.6" + "aedart/athenaeum-contracts": "^8.15", + "aedart/athenaeum-support": "^8.15" }, "autoload": { "psr-4": { diff --git a/packages/Streams/composer.json b/packages/Streams/composer.json index 10e45013b..b5232af65 100644 --- a/packages/Streams/composer.json +++ b/packages/Streams/composer.json @@ -18,9 +18,9 @@ ], "require": { "php": "^8.2", - "aedart/athenaeum-contracts": "^8.6", - "aedart/athenaeum-mime-types": "^8.6", - "aedart/athenaeum-support": "^8.6", + "aedart/athenaeum-contracts": "^8.15", + "aedart/athenaeum-mime-types": "^8.15", + "aedart/athenaeum-support": "^8.15", "psr/http-message": "^1.1" }, "autoload": { diff --git a/packages/Support/composer.json b/packages/Support/composer.json index b4850e96b..222d14aad 100644 --- a/packages/Support/composer.json +++ b/packages/Support/composer.json @@ -10,24 +10,24 @@ ], "homepage": "https://aedart.github.io/athenaeum/", "license": "BSD-3-Clause", - "type": "library", "authors": [ { "name": "Alin Eugen Deac", "email": "aedart@gmail.com" } ], + "type": "library", "require": { "php": "^8.2", - "aedart/athenaeum-contracts": "^8.6", - "aedart/athenaeum-utils": "^8.6", - "illuminate/config": "^v11.13.0", - "illuminate/support": "^v11.13.0" + "aedart/athenaeum-contracts": "^8.15", + "aedart/athenaeum-utils": "^8.15", + "illuminate/config": "^v11.31.0", + "illuminate/support": "^v11.31.0" }, "require-dev": { "predis/predis": "^2.2.2", - "symfony/console": "^v7.1.1", - "twig/twig": "^3.10.3" + "symfony/console": "^v7.1.7", + "twig/twig": "^3.14.2" }, "autoload": { "psr-4": { @@ -37,6 +37,11 @@ "helpers/properties.php" ] }, + "extra": { + "branch-alias": { + "dev-master": "7.1.x-dev" + } + }, "bin": [ "aware-of" ], @@ -46,11 +51,6 @@ "config": { "sort-packages": true }, - "extra": { - "branch-alias": { - "dev-master": "7.1.x-dev" - } - }, "minimum-stability": "dev", "prefer-stable": true } diff --git a/packages/Testing/composer.json b/packages/Testing/composer.json index b8ce09c65..b5beb95f1 100644 --- a/packages/Testing/composer.json +++ b/packages/Testing/composer.json @@ -7,38 +7,38 @@ ], "homepage": "https://aedart.github.io/athenaeum/", "license": "BSD-3-Clause", - "type": "library", "authors": [ { "name": "Alin Eugen Deac", "email": "aedart@gmail.com" } ], + "type": "library", "require": { "php": "^8.2", - "aedart/athenaeum-container": "^8.6", - "aedart/athenaeum-contracts": "^8.6", + "aedart/athenaeum-container": "^8.15", + "aedart/athenaeum-contracts": "^8.15", "codeception/codeception": "^5.1.2", "codeception/module-asserts": "^3.0.0", - "fakerphp/faker": "^v1.23.1", - "illuminate/testing": "^v11.13.0", + "fakerphp/faker": "^v1.24.0", + "illuminate/testing": "^v11.31.0", "mockery/mockery": "1.6.*", - "orchestra/testbench": "^v9.1.2", - "orchestra/testbench-dusk": "^v9.3.0" + "orchestra/testbench": "^v9.5.2", + "orchestra/testbench-dusk": "^v9.8.1" }, "autoload": { "psr-4": { "Aedart\\Testing\\": "src" } }, - "config": { - "sort-packages": true - }, "extra": { "branch-alias": { "dev-master": "7.1.x-dev" } }, + "config": { + "sort-packages": true + }, "minimum-stability": "dev", "prefer-stable": true } diff --git a/packages/Testing/src/TestCases/BrowserTestCase.php b/packages/Testing/src/TestCases/BrowserTestCase.php index 2b0902741..dc9da9571 100644 --- a/packages/Testing/src/TestCases/BrowserTestCase.php +++ b/packages/Testing/src/TestCases/BrowserTestCase.php @@ -68,7 +68,7 @@ public static function prepare() ConsoleDebugger::output('Starting Chrome Driver'); static::startChromeDriver([ - 'port' => 9515, + '--port' => 9515, // '--verbose' ]); } diff --git a/packages/Translation/composer.json b/packages/Translation/composer.json index 1f48fa6b7..f025ae9a3 100644 --- a/packages/Translation/composer.json +++ b/packages/Translation/composer.json @@ -8,32 +8,32 @@ ], "homepage": "https://aedart.github.io/athenaeum/", "license": "BSD-3-Clause", - "type": "library", "authors": [ { "name": "Alin Eugen Deac", "email": "aedart@gmail.com" } ], + "type": "library", "require": { "php": "^8.2", - "aedart/athenaeum-support": "^8.6", - "illuminate/translation": "^v11.13.0", - "symfony/finder": "^7.1.1" + "aedart/athenaeum-support": "^8.15", + "illuminate/translation": "^v11.31.0", + "symfony/finder": "^7.1.6" }, "autoload": { "psr-4": { "Aedart\\Translation\\": "src" } }, - "config": { - "sort-packages": true - }, "extra": { "branch-alias": { "dev-master": "7.1.x-dev" } }, + "config": { + "sort-packages": true + }, "minimum-stability": "dev", "prefer-stable": true } diff --git a/packages/Utils/composer.json b/packages/Utils/composer.json index 6ab180458..a9593a575 100644 --- a/packages/Utils/composer.json +++ b/packages/Utils/composer.json @@ -12,18 +12,18 @@ ], "homepage": "https://aedart.github.io/athenaeum/", "license": "BSD-3-Clause", - "type": "library", "authors": [ { "name": "Alin Eugen Deac", "email": "aedart@gmail.com" } ], + "type": "library", "require": { "php": "^8.2", "composer-runtime-api": "^2.2.2", - "aedart/athenaeum-contracts": "^8.6", - "illuminate/support": "^v11.13.0", + "aedart/athenaeum-contracts": "^8.15", + "illuminate/support": "^v11.31.0", "mockery/mockery": "1.6.*" }, "autoload": { @@ -31,17 +31,17 @@ "Aedart\\Utils\\": "src" } }, + "extra": { + "branch-alias": { + "dev-master": "7.1.x-dev" + } + }, "bin": [ "bin/build-version" ], "config": { "sort-packages": true }, - "extra": { - "branch-alias": { - "dev-master": "7.1.x-dev" - } - }, "minimum-stability": "dev", "prefer-stable": true } diff --git a/packages/Validation/composer.json b/packages/Validation/composer.json index 6afda9805..2f209335b 100644 --- a/packages/Validation/composer.json +++ b/packages/Validation/composer.json @@ -7,33 +7,33 @@ ], "homepage": "https://aedart.github.io/athenaeum/", "license": "BSD-3-Clause", - "type": "library", "authors": [ { "name": "Alin Eugen Deac", "email": "aedart@gmail.com" } ], + "type": "library", "require": { "php": "^8.2", - "aedart/athenaeum-contracts": "^8.6", - "aedart/athenaeum-support": "^8.6", - "aedart/athenaeum-utils": "^8.6", - "illuminate/validation": "^v11.13.0" + "aedart/athenaeum-contracts": "^8.15", + "aedart/athenaeum-support": "^8.15", + "aedart/athenaeum-utils": "^8.15", + "illuminate/validation": "^v11.31.0" }, "autoload": { "psr-4": { "Aedart\\Validation\\": "src" } }, - "config": { - "sort-packages": true - }, "extra": { "branch-alias": { "dev-master": "7.1.x-dev" } }, + "config": { + "sort-packages": true + }, "minimum-stability": "dev", "prefer-stable": true } diff --git a/tests/Integration/Http/Api/Middleware/CaptureFieldsToSelectMiddlewareTest.php b/tests/Integration/Http/Api/Middleware/CaptureFieldsToSelectMiddlewareTest.php index 8f9413140..902df3c1b 100644 --- a/tests/Integration/Http/Api/Middleware/CaptureFieldsToSelectMiddlewareTest.php +++ b/tests/Integration/Http/Api/Middleware/CaptureFieldsToSelectMiddlewareTest.php @@ -9,7 +9,9 @@ use Aedart\Tests\TestCases\Http\ApiResourcesTestCase; use Illuminate\Http\Request; use Illuminate\Http\Response; +use Illuminate\Support\Facades\Route; use Illuminate\Validation\ValidationException; +use Symfony\Component\HttpKernel\Exception\BadRequestHttpException; /** * CaptureFieldsToSelectMiddlewareTest @@ -158,8 +160,67 @@ public function failsWhenRequestedFieldNamesAreInvalid(): void $request = new Request([ 'select' => implode(',', $requestedFields) ]); - (new CaptureFieldsToSelect())->handle($request, function () use (&$result) { + (new CaptureFieldsToSelect())->handle($request, function () { + $result = IoCFacade::tryMake(SelectedFieldsCollection::class); + return new Response(); + }); + } + + /** + * @test + * + * @return void + */ + public function doesNotFailWhenFieldsRequestedAsAnArray(): void + { + // @see https://github.com/aedart/athenaeum/issues/197 + + /** @var SelectedFieldsCollection|null $result */ + $result = null; + + Route::get('/users', function (Request $request) use (&$result) { $result = IoCFacade::tryMake(SelectedFieldsCollection::class); + + return new Response(); + }) + ->middleware(CaptureFieldsToSelect::class) + ->name('users.index'); + + Route::getRoutes()->refreshNameLookups(); + + // ------------------------------------------------------------------------------------ // + + $url = route('users.index') . '?select[0]=id&select[1]=user&select[2]=details'; + $this + ->getJson($url) + ->assertOk(); + + // ------------------------------------------------------------------------------------ // + + ConsoleDebugger::output($result); + + $this->assertNotNull($result, 'no fields collection registered'); + $this->assertTrue($result->has('id'), '"id" field not available'); + $this->assertTrue($result->has('user'), '"user" field not available'); + $this->assertTrue($result->has('details'), '"details" field not available'); + } + + /** + * @test + * + * @return void + * + * @throws ValidationException + */ + public function failsWhenFieldsRequestedAreMalformed(): void + { + // @see https://github.com/aedart/athenaeum/issues/197 + + $this->expectException(BadRequestHttpException::class); + + $request = new Request([ 'select' => true ]); // NOTE: This should result in a "400 Bad Request" being thrown. + + (new CaptureFieldsToSelect())->handle($request, function () { return new Response(); }); } diff --git a/tests/Integration/Http/Api/Middleware/RequestMustBeJsonMiddlewareTest.php b/tests/Integration/Http/Api/Middleware/RequestMustBeJsonMiddlewareTest.php index 4f001a8d1..c14975da2 100644 --- a/tests/Integration/Http/Api/Middleware/RequestMustBeJsonMiddlewareTest.php +++ b/tests/Integration/Http/Api/Middleware/RequestMustBeJsonMiddlewareTest.php @@ -79,6 +79,26 @@ public function rejectsWhenContentTypeHeaderNotValid(): void }); } + /** + * @test + * + * @return void + */ + public function rejectsWhenContentTypeMissingForContentModificationMethod(): void + { + $this->expectException(BadRequestHttpException::class); + $this->expectExceptionMessage('Invalid content-type header. Request can only process JSON content type, e.g. application/json'); + + $request = new Request(); + $request->setMethod('POST'); + // No Content-Type header here - should be rejected. + + /** @var Response $response */ + (new RequestMustBeJson())->handle($request, function () { + return new Response(); + }); + } + /** * @test * diff --git a/vendor-bin/cs/composer.json b/vendor-bin/cs/composer.json index aa66c5696..e86868281 100644 --- a/vendor-bin/cs/composer.json +++ b/vendor-bin/cs/composer.json @@ -1,7 +1,7 @@ { "require": { - "squizlabs/php_codesniffer": "^3.9.0", - "symplify/easy-coding-standard": "^12.1.14", + "squizlabs/php_codesniffer": "^3.11.0", + "symplify/easy-coding-standard": "^12.3.6", "phpcompatibility/php-compatibility": "^9.3.5", "dealerdirect/phpcodesniffer-composer-installer": "^1.0.0", "symplify/config-transformer": "^12.3.4" diff --git a/vendor-bin/monorepo/composer.json b/vendor-bin/monorepo/composer.json index 2661e2df7..b3028e8f7 100644 --- a/vendor-bin/monorepo/composer.json +++ b/vendor-bin/monorepo/composer.json @@ -1,6 +1,6 @@ { "require": { - "symplify/monorepo-builder": "^11.2.20", - "symfony/console": "^6.2" + "symplify/monorepo-builder": "^11.2.22", + "symfony/console": "^6.4.14" } }