diff --git a/.gitlab-ci-files/package.yml b/.gitlab-ci-files/package.yml index 0d8f2f7..87b5e02 100644 --- a/.gitlab-ci-files/package.yml +++ b/.gitlab-ci-files/package.yml @@ -46,7 +46,8 @@ remi-rocky9-package: variables: ROCKY_RELEASE: 9 before_script: - - dnf -y install redis + - dnf -y module reset redis + - dnf -y install @redis:7 .remi-rocky-package: extends: .package diff --git a/CHANGELOG.md b/CHANGELOG.md index 93ad374..20dac25 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,8 @@ v1.7 - Fix FLEXIAPI-252 Update the hCaptcha Laravel library, use file instead of cookies to store the session to prevent empty errors bags - Fix FLEXIAPI-254 Allow no data on POST requests to not trigger the ValidateJSON middleware - Fix FLEXIAPI-255 Create a INSTALL.md tutorial and log FlexisipPusherConnector errors -* Fix FLEXIAPI-257 Return a more coherent message when search API endpoints returns a 404 +- Fix FLEXIAPI-257 Return a more coherent message when search API endpoints returns a 404 +- Fix FLEXIAPI-260 Return 404 and not 403 if the contact is already in the list or missing when removing it v1.6 ---- diff --git a/flexiapi/app/Http/Controllers/Api/Admin/AccountContactController.php b/flexiapi/app/Http/Controllers/Api/Admin/AccountContactController.php index 9fec022..7217efc 100644 --- a/flexiapi/app/Http/Controllers/Api/Admin/AccountContactController.php +++ b/flexiapi/app/Http/Controllers/Api/Admin/AccountContactController.php @@ -40,21 +40,22 @@ class AccountContactController extends Controller public function add(int $id, int $contactId) { - if (Account::findOrFail($id)->contacts()->pluck('id')->contains($contactId)) { - abort(403); - } + $account = Account::findOrFail($id); + $account->contacts()->detach($contactId); if (Account::findOrFail($contactId)) { - return Account::findOrFail($id)->contacts()->attach($contactId); + return $account->contacts()->attach($contactId); } } public function remove(int $id, int $contactId) { - if (!Account::findOrFail($id)->contacts()->pluck('id')->contains($contactId)) { - abort(403); + $account = Account::findOrFail($id); + + if (!$account->contacts()->pluck('id')->contains($contactId)) { + abort(404); } - return Account::findOrFail($id)->contacts()->detach($contactId); + return $account->contacts()->detach($contactId); } } diff --git a/flexiapi/app/Http/Controllers/Api/Admin/ContactsListController.php b/flexiapi/app/Http/Controllers/Api/Admin/ContactsListController.php index 4d83b9b..5ebef03 100644 --- a/flexiapi/app/Http/Controllers/Api/Admin/ContactsListController.php +++ b/flexiapi/app/Http/Controllers/Api/Admin/ContactsListController.php @@ -74,21 +74,22 @@ class ContactsListController extends Controller public function contactAdd(int $id, int $contactId) { - if (ContactsList::findOrFail($id)->contacts()->pluck('id')->contains($contactId)) { - abort(403); - } + $contactsList = ContactsList::findOrFail($id); + $contactsList->contacts()->detach($contactId); if (Account::findOrFail($contactId)) { - return ContactsList::findOrFail($id)->contacts()->attach($contactId); + return $contactsList->contacts()->attach($contactId); } } public function contactRemove(int $id, int $contactId) { - if (!ContactsList::findOrFail($id)->contacts()->pluck('id')->contains($contactId)) { - abort(403); + $contactsList = ContactsList::findOrFail($id); + + if (!$contactsList->contacts()->pluck('id')->contains($contactId)) { + abort(404); } - return ContactsList::findOrFail($id)->contacts()->detach($contactId); + return $contactsList->contacts()->detach($contactId); } } diff --git a/flexiapi/composer.lock b/flexiapi/composer.lock index 80a8205..82eeff8 100644 --- a/flexiapi/composer.lock +++ b/flexiapi/composer.lock @@ -8,16 +8,16 @@ "packages": [ { "name": "awobaz/compoships", - "version": "2.3.0", + "version": "2.4.0", "source": { "type": "git", "url": "https://github.com/topclaudy/compoships.git", - "reference": "25a4ed2aeeb22033cd951e71e661eed235d58698" + "reference": "63fcb664b8c21d2f98db6a70f7f351b7db77f9f4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/topclaudy/compoships/zipball/25a4ed2aeeb22033cd951e71e661eed235d58698", - "reference": "25a4ed2aeeb22033cd951e71e661eed235d58698", + "url": "https://api.github.com/repos/topclaudy/compoships/zipball/63fcb664b8c21d2f98db6a70f7f351b7db77f9f4", + "reference": "63fcb664b8c21d2f98db6a70f7f351b7db77f9f4", "shasum": "" }, "require": { @@ -58,7 +58,7 @@ ], "support": { "issues": "https://github.com/topclaudy/compoships/issues", - "source": "https://github.com/topclaudy/compoships/tree/2.3.0" + "source": "https://github.com/topclaudy/compoships/tree/2.4.0" }, "funding": [ { @@ -66,7 +66,7 @@ "type": "custom" } ], - "time": "2024-02-28T22:21:15+00:00" + "time": "2025-01-09T12:32:04+00:00" }, { "name": "bacon/bacon-qr-code", @@ -471,16 +471,16 @@ }, { "name": "doctrine/dbal", - "version": "3.9.3", + "version": "3.9.4", "source": { "type": "git", "url": "https://github.com/doctrine/dbal.git", - "reference": "61446f07fcb522414d6cfd8b1c3e5f9e18c579ba" + "reference": "ec16c82f20be1a7224e65ac67144a29199f87959" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/dbal/zipball/61446f07fcb522414d6cfd8b1c3e5f9e18c579ba", - "reference": "61446f07fcb522414d6cfd8b1c3e5f9e18c579ba", + "url": "https://api.github.com/repos/doctrine/dbal/zipball/ec16c82f20be1a7224e65ac67144a29199f87959", + "reference": "ec16c82f20be1a7224e65ac67144a29199f87959", "shasum": "" }, "require": { @@ -496,15 +496,13 @@ "doctrine/coding-standard": "12.0.0", "fig/log-test": "^1", "jetbrains/phpstorm-stubs": "2023.1", - "phpstan/phpstan": "1.12.6", - "phpstan/phpstan-strict-rules": "^1.6", - "phpunit/phpunit": "9.6.20", - "psalm/plugin-phpunit": "0.18.4", + "phpstan/phpstan": "2.1.1", + "phpstan/phpstan-strict-rules": "^2", + "phpunit/phpunit": "9.6.22", "slevomat/coding-standard": "8.13.1", "squizlabs/php_codesniffer": "3.10.2", "symfony/cache": "^5.4|^6.0|^7.0", - "symfony/console": "^4.4|^5.4|^6.0|^7.0", - "vimeo/psalm": "4.30.0" + "symfony/console": "^4.4|^5.4|^6.0|^7.0" }, "suggest": { "symfony/console": "For helpful console commands such as SQL execution and import of files." @@ -564,7 +562,7 @@ ], "support": { "issues": "https://github.com/doctrine/dbal/issues", - "source": "https://github.com/doctrine/dbal/tree/3.9.3" + "source": "https://github.com/doctrine/dbal/tree/3.9.4" }, "funding": [ { @@ -580,7 +578,7 @@ "type": "tidelift" } ], - "time": "2024-10-10T17:56:43+00:00" + "time": "2025-01-16T08:28:55+00:00" }, { "name": "doctrine/deprecations", @@ -953,16 +951,16 @@ }, { "name": "egulias/email-validator", - "version": "4.0.2", + "version": "4.0.3", "source": { "type": "git", "url": "https://github.com/egulias/EmailValidator.git", - "reference": "ebaaf5be6c0286928352e054f2d5125608e5405e" + "reference": "b115554301161fa21467629f1e1391c1936de517" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/ebaaf5be6c0286928352e054f2d5125608e5405e", - "reference": "ebaaf5be6c0286928352e054f2d5125608e5405e", + "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/b115554301161fa21467629f1e1391c1936de517", + "reference": "b115554301161fa21467629f1e1391c1936de517", "shasum": "" }, "require": { @@ -1008,7 +1006,7 @@ ], "support": { "issues": "https://github.com/egulias/EmailValidator/issues", - "source": "https://github.com/egulias/EmailValidator/tree/4.0.2" + "source": "https://github.com/egulias/EmailValidator/tree/4.0.3" }, "funding": [ { @@ -1016,7 +1014,7 @@ "type": "github" } ], - "time": "2023-10-06T06:47:41+00:00" + "time": "2024-12-27T00:36:43+00:00" }, { "name": "endroid/qr-code", @@ -1323,16 +1321,16 @@ }, { "name": "giggsey/libphonenumber-for-php-lite", - "version": "8.13.52", + "version": "8.13.53", "source": { "type": "git", "url": "https://github.com/giggsey/libphonenumber-for-php-lite.git", - "reference": "9d48e4e112d4a24d46a5fb7c65d000ca3d3faac1" + "reference": "ead50d96f01c191f1c8dd504a20f0062dbd9a2ed" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/giggsey/libphonenumber-for-php-lite/zipball/9d48e4e112d4a24d46a5fb7c65d000ca3d3faac1", - "reference": "9d48e4e112d4a24d46a5fb7c65d000ca3d3faac1", + "url": "https://api.github.com/repos/giggsey/libphonenumber-for-php-lite/zipball/ead50d96f01c191f1c8dd504a20f0062dbd9a2ed", + "reference": "ead50d96f01c191f1c8dd504a20f0062dbd9a2ed", "shasum": "" }, "require": { @@ -1402,7 +1400,7 @@ "issues": "https://github.com/giggsey/libphonenumber-for-php-lite/issues", "source": "https://github.com/giggsey/libphonenumber-for-php-lite" }, - "time": "2024-12-13T09:11:09+00:00" + "time": "2025-01-15T17:07:47+00:00" }, { "name": "graham-campbell/result-type", @@ -1879,16 +1877,16 @@ }, { "name": "laravel/framework", - "version": "v10.48.25", + "version": "v10.48.27", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "f132b23b13909cc22c615c01b0c5640541c3da0c" + "reference": "eb0be33e4b806b92f396357b99ffcb2d3ef67957" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/f132b23b13909cc22c615c01b0c5640541c3da0c", - "reference": "f132b23b13909cc22c615c01b0c5640541c3da0c", + "url": "https://api.github.com/repos/laravel/framework/zipball/eb0be33e4b806b92f396357b99ffcb2d3ef67957", + "reference": "eb0be33e4b806b92f396357b99ffcb2d3ef67957", "shasum": "" }, "require": { @@ -2082,7 +2080,7 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2024-11-26T15:32:57+00:00" + "time": "2025-01-24T16:17:36+00:00" }, { "name": "laravel/prompts", @@ -2409,16 +2407,16 @@ }, { "name": "league/commonmark", - "version": "2.6.0", + "version": "2.6.1", "source": { "type": "git", "url": "https://github.com/thephpleague/commonmark.git", - "reference": "d150f911e0079e90ae3c106734c93137c184f932" + "reference": "d990688c91cedfb69753ffc2512727ec646df2ad" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/d150f911e0079e90ae3c106734c93137c184f932", - "reference": "d150f911e0079e90ae3c106734c93137c184f932", + "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/d990688c91cedfb69753ffc2512727ec646df2ad", + "reference": "d990688c91cedfb69753ffc2512727ec646df2ad", "shasum": "" }, "require": { @@ -2512,7 +2510,7 @@ "type": "tidelift" } ], - "time": "2024-12-07T15:34:16+00:00" + "time": "2024-12-29T14:10:59+00:00" }, { "name": "league/config", @@ -3075,16 +3073,16 @@ }, { "name": "nesbot/carbon", - "version": "2.72.5", + "version": "2.72.6", "source": { "type": "git", - "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "afd46589c216118ecd48ff2b95d77596af1e57ed" + "url": "https://github.com/CarbonPHP/carbon.git", + "reference": "1e9d50601e7035a4c61441a208cb5bed73e108c5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/afd46589c216118ecd48ff2b95d77596af1e57ed", - "reference": "afd46589c216118ecd48ff2b95d77596af1e57ed", + "url": "https://api.github.com/repos/CarbonPHP/carbon/zipball/1e9d50601e7035a4c61441a208cb5bed73e108c5", + "reference": "1e9d50601e7035a4c61441a208cb5bed73e108c5", "shasum": "" }, "require": { @@ -3104,7 +3102,7 @@ "doctrine/orm": "^2.7 || ^3.0", "friendsofphp/php-cs-fixer": "^3.0", "kylekatarnls/multi-tester": "^2.0", - "ondrejmirtes/better-reflection": "*", + "ondrejmirtes/better-reflection": "<6", "phpmd/phpmd": "^2.9", "phpstan/extension-installer": "^1.0", "phpstan/phpstan": "^0.12.99 || ^1.7.14", @@ -3117,10 +3115,6 @@ ], "type": "library", "extra": { - "branch-alias": { - "dev-master": "3.x-dev", - "dev-2.x": "2.x-dev" - }, "laravel": { "providers": [ "Carbon\\Laravel\\ServiceProvider" @@ -3130,6 +3124,10 @@ "includes": [ "extension.neon" ] + }, + "branch-alias": { + "dev-2.x": "2.x-dev", + "dev-master": "3.x-dev" } }, "autoload": { @@ -3178,7 +3176,7 @@ "type": "tidelift" } ], - "time": "2024-06-03T19:18:41+00:00" + "time": "2024-12-27T09:28:11+00:00" }, { "name": "nette/schema", @@ -3330,16 +3328,16 @@ }, { "name": "nikic/php-parser", - "version": "v5.3.1", + "version": "v5.4.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "8eea230464783aa9671db8eea6f8c6ac5285794b" + "reference": "447a020a1f875a434d62f2a401f53b82a396e494" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/8eea230464783aa9671db8eea6f8c6ac5285794b", - "reference": "8eea230464783aa9671db8eea6f8c6ac5285794b", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/447a020a1f875a434d62f2a401f53b82a396e494", + "reference": "447a020a1f875a434d62f2a401f53b82a396e494", "shasum": "" }, "require": { @@ -3382,9 +3380,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v5.3.1" + "source": "https://github.com/nikic/PHP-Parser/tree/v5.4.0" }, - "time": "2024-10-08T18:51:32+00:00" + "time": "2024-12-30T11:07:19+00:00" }, { "name": "nunomaduro/termwind", @@ -4100,16 +4098,16 @@ }, { "name": "phpunit/phpunit", - "version": "10.5.39", + "version": "10.5.41", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "4e89eff200b801db58f3d580ad7426431949eaa9" + "reference": "e76586fa3d49714f230221734b44892e384109d7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/4e89eff200b801db58f3d580ad7426431949eaa9", - "reference": "4e89eff200b801db58f3d580ad7426431949eaa9", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/e76586fa3d49714f230221734b44892e384109d7", + "reference": "e76586fa3d49714f230221734b44892e384109d7", "shasum": "" }, "require": { @@ -4181,7 +4179,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.39" + "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.41" }, "funding": [ { @@ -4197,20 +4195,20 @@ "type": "tidelift" } ], - "time": "2024-12-11T10:51:07+00:00" + "time": "2025-01-13T09:33:05+00:00" }, { "name": "propaganistas/laravel-phone", - "version": "5.3.2", + "version": "5.3.3", "source": { "type": "git", "url": "https://github.com/Propaganistas/Laravel-Phone.git", - "reference": "44efd6edc181616c49f895fff97ad1cc0f3fecb2" + "reference": "2172362ae5714ddc397d9df96a44b82bd125631a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Propaganistas/Laravel-Phone/zipball/44efd6edc181616c49f895fff97ad1cc0f3fecb2", - "reference": "44efd6edc181616c49f895fff97ad1cc0f3fecb2", + "url": "https://api.github.com/repos/Propaganistas/Laravel-Phone/zipball/2172362ae5714ddc397d9df96a44b82bd125631a", + "reference": "2172362ae5714ddc397d9df96a44b82bd125631a", "shasum": "" }, "require": { @@ -4221,7 +4219,6 @@ "php": "^8.1" }, "require-dev": { - "larastan/larastan": "^2.9", "laravel/pint": "^1.14", "orchestra/testbench": "*", "phpunit/phpunit": "^10.5" @@ -4261,7 +4258,7 @@ ], "support": { "issues": "https://github.com/Propaganistas/Laravel-Phone/issues", - "source": "https://github.com/Propaganistas/Laravel-Phone/tree/5.3.2" + "source": "https://github.com/Propaganistas/Laravel-Phone/tree/5.3.3" }, "funding": [ { @@ -4269,7 +4266,7 @@ "type": "github" } ], - "time": "2024-04-24T09:18:58+00:00" + "time": "2024-12-27T11:45:47+00:00" }, { "name": "psr/cache", @@ -5543,20 +5540,20 @@ }, { "name": "respect/validation", - "version": "2.3.11", + "version": "2.4.0", "source": { "type": "git", "url": "https://github.com/Respect/Validation.git", - "reference": "294c36ffb7c2b0f3dc23f3847844a61fa0139001" + "reference": "48b38bd91e0badbc2c4381dce726b09fd68850d9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Respect/Validation/zipball/294c36ffb7c2b0f3dc23f3847844a61fa0139001", - "reference": "294c36ffb7c2b0f3dc23f3847844a61fa0139001", + "url": "https://api.github.com/repos/Respect/Validation/zipball/48b38bd91e0badbc2c4381dce726b09fd68850d9", + "reference": "48b38bd91e0badbc2c4381dce726b09fd68850d9", "shasum": "" }, "require": { - "php": "^8.1 || ^8.2", + "php": ">=8.1", "respect/stringifier": "^0.2.0", "symfony/polyfill-mbstring": "^1.2" }, @@ -5605,9 +5602,9 @@ ], "support": { "issues": "https://github.com/Respect/Validation/issues", - "source": "https://github.com/Respect/Validation/tree/2.3.11" + "source": "https://github.com/Respect/Validation/tree/2.4.0" }, - "time": "2024-12-13T00:07:10+00:00" + "time": "2025-01-07T00:34:58+00:00" }, { "name": "rvxlab/hcaptcha", @@ -6836,16 +6833,16 @@ }, { "name": "symfony/console", - "version": "v6.4.15", + "version": "v6.4.17", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "f1fc6f47283e27336e7cebb9e8946c8de7bff9bd" + "reference": "799445db3f15768ecc382ac5699e6da0520a0a04" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/f1fc6f47283e27336e7cebb9e8946c8de7bff9bd", - "reference": "f1fc6f47283e27336e7cebb9e8946c8de7bff9bd", + "url": "https://api.github.com/repos/symfony/console/zipball/799445db3f15768ecc382ac5699e6da0520a0a04", + "reference": "799445db3f15768ecc382ac5699e6da0520a0a04", "shasum": "" }, "require": { @@ -6910,7 +6907,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.4.15" + "source": "https://github.com/symfony/console/tree/v6.4.17" }, "funding": [ { @@ -6926,7 +6923,7 @@ "type": "tidelift" } ], - "time": "2024-11-06T14:19:14+00:00" + "time": "2024-12-07T12:07:30+00:00" }, { "name": "symfony/css-selector", @@ -7012,12 +7009,12 @@ }, "type": "library", "extra": { + "thanks": { + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, "branch-alias": { "dev-main": "3.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" } }, "autoload": { @@ -7062,16 +7059,16 @@ }, { "name": "symfony/error-handler", - "version": "v6.4.14", + "version": "v6.4.17", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "9e024324511eeb00983ee76b9aedc3e6ecd993d9" + "reference": "37ad2380e8c1a8cf62a1200a5c10080b679b446c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/9e024324511eeb00983ee76b9aedc3e6ecd993d9", - "reference": "9e024324511eeb00983ee76b9aedc3e6ecd993d9", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/37ad2380e8c1a8cf62a1200a5c10080b679b446c", + "reference": "37ad2380e8c1a8cf62a1200a5c10080b679b446c", "shasum": "" }, "require": { @@ -7117,7 +7114,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.4.14" + "source": "https://github.com/symfony/error-handler/tree/v6.4.17" }, "funding": [ { @@ -7133,7 +7130,7 @@ "type": "tidelift" } ], - "time": "2024-11-05T15:34:40+00:00" + "time": "2024-12-06T13:30:51+00:00" }, { "name": "symfony/event-dispatcher", @@ -7235,12 +7232,12 @@ }, "type": "library", "extra": { + "thanks": { + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, "branch-alias": { "dev-main": "3.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" } }, "autoload": { @@ -7293,16 +7290,16 @@ }, { "name": "symfony/finder", - "version": "v6.4.13", + "version": "v6.4.17", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "daea9eca0b08d0ed1dc9ab702a46128fd1be4958" + "reference": "1d0e8266248c5d9ab6a87e3789e6dc482af3c9c7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/daea9eca0b08d0ed1dc9ab702a46128fd1be4958", - "reference": "daea9eca0b08d0ed1dc9ab702a46128fd1be4958", + "url": "https://api.github.com/repos/symfony/finder/zipball/1d0e8266248c5d9ab6a87e3789e6dc482af3c9c7", + "reference": "1d0e8266248c5d9ab6a87e3789e6dc482af3c9c7", "shasum": "" }, "require": { @@ -7337,7 +7334,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v6.4.13" + "source": "https://github.com/symfony/finder/tree/v6.4.17" }, "funding": [ { @@ -7353,7 +7350,7 @@ "type": "tidelift" } ], - "time": "2024-10-01T08:30:56+00:00" + "time": "2024-12-29T13:51:37+00:00" }, { "name": "symfony/http-foundation", @@ -7434,16 +7431,16 @@ }, { "name": "symfony/http-kernel", - "version": "v6.4.16", + "version": "v6.4.17", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "8838b5b21d807923b893ccbfc2cbeda0f1bc00f0" + "reference": "c5647393c5ce11833d13e4b70fff4b571d4ac710" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/8838b5b21d807923b893ccbfc2cbeda0f1bc00f0", - "reference": "8838b5b21d807923b893ccbfc2cbeda0f1bc00f0", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/c5647393c5ce11833d13e4b70fff4b571d4ac710", + "reference": "c5647393c5ce11833d13e4b70fff4b571d4ac710", "shasum": "" }, "require": { @@ -7528,7 +7525,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.4.16" + "source": "https://github.com/symfony/http-kernel/tree/v6.4.17" }, "funding": [ { @@ -7544,7 +7541,7 @@ "type": "tidelift" } ], - "time": "2024-11-27T12:49:36+00:00" + "time": "2024-12-31T14:49:31+00:00" }, { "name": "symfony/mailer", @@ -7628,16 +7625,16 @@ }, { "name": "symfony/mime", - "version": "v6.4.13", + "version": "v6.4.17", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "1de1cf14d99b12c7ebbb850491ec6ae3ed468855" + "reference": "ea87c8850a54ff039d3e0ab4ae5586dd4e6c0232" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/1de1cf14d99b12c7ebbb850491ec6ae3ed468855", - "reference": "1de1cf14d99b12c7ebbb850491ec6ae3ed468855", + "url": "https://api.github.com/repos/symfony/mime/zipball/ea87c8850a54ff039d3e0ab4ae5586dd4e6c0232", + "reference": "ea87c8850a54ff039d3e0ab4ae5586dd4e6c0232", "shasum": "" }, "require": { @@ -7693,7 +7690,7 @@ "mime-type" ], "support": { - "source": "https://github.com/symfony/mime/tree/v6.4.13" + "source": "https://github.com/symfony/mime/tree/v6.4.17" }, "funding": [ { @@ -7709,7 +7706,7 @@ "type": "tidelift" } ], - "time": "2024-10-25T15:07:50+00:00" + "time": "2024-12-02T11:09:41+00:00" }, { "name": "symfony/polyfill-ctype", @@ -8515,12 +8512,12 @@ }, "type": "library", "extra": { + "thanks": { + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, "branch-alias": { "dev-main": "3.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" } }, "autoload": { @@ -8774,12 +8771,12 @@ }, "type": "library", "extra": { + "thanks": { + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, "branch-alias": { "dev-main": "3.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" } }, "autoload": { @@ -9044,31 +9041,33 @@ }, { "name": "tijsverkoyen/css-to-inline-styles", - "version": "v2.2.7", + "version": "v2.3.0", "source": { "type": "git", "url": "https://github.com/tijsverkoyen/CssToInlineStyles.git", - "reference": "83ee6f38df0a63106a9e4536e3060458b74ccedb" + "reference": "0d72ac1c00084279c1816675284073c5a337c20d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/tijsverkoyen/CssToInlineStyles/zipball/83ee6f38df0a63106a9e4536e3060458b74ccedb", - "reference": "83ee6f38df0a63106a9e4536e3060458b74ccedb", + "url": "https://api.github.com/repos/tijsverkoyen/CssToInlineStyles/zipball/0d72ac1c00084279c1816675284073c5a337c20d", + "reference": "0d72ac1c00084279c1816675284073c5a337c20d", "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 || ^7.0" + "php": "^7.4 || ^8.0", + "symfony/css-selector": "^5.4 || ^6.0 || ^7.0" }, "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0 || ^7.5 || ^8.5.21 || ^9.5.10" + "phpstan/phpstan": "^2.0", + "phpstan/phpstan-phpunit": "^2.0", + "phpunit/phpunit": "^8.5.21 || ^9.5.10" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.2.x-dev" + "dev-master": "2.x-dev" } }, "autoload": { @@ -9091,9 +9090,9 @@ "homepage": "https://github.com/tijsverkoyen/CssToInlineStyles", "support": { "issues": "https://github.com/tijsverkoyen/CssToInlineStyles/issues", - "source": "https://github.com/tijsverkoyen/CssToInlineStyles/tree/v2.2.7" + "source": "https://github.com/tijsverkoyen/CssToInlineStyles/tree/v2.3.0" }, - "time": "2023-12-08T13:03:43+00:00" + "time": "2024-12-21T16:25:41+00:00" }, { "name": "vlucas/phpdotenv", @@ -9340,13 +9339,13 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "3.x-dev" - }, "phpstan": { "includes": [ "extension.neon" ] + }, + "branch-alias": { + "dev-main": "3.x-dev" } }, "autoload": { @@ -9460,16 +9459,16 @@ }, { "name": "filp/whoops", - "version": "2.16.0", + "version": "2.17.0", "source": { "type": "git", "url": "https://github.com/filp/whoops.git", - "reference": "befcdc0e5dce67252aa6322d82424be928214fa2" + "reference": "075bc0c26631110584175de6523ab3f1652eb28e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filp/whoops/zipball/befcdc0e5dce67252aa6322d82424be928214fa2", - "reference": "befcdc0e5dce67252aa6322d82424be928214fa2", + "url": "https://api.github.com/repos/filp/whoops/zipball/075bc0c26631110584175de6523ab3f1652eb28e", + "reference": "075bc0c26631110584175de6523ab3f1652eb28e", "shasum": "" }, "require": { @@ -9519,7 +9518,7 @@ ], "support": { "issues": "https://github.com/filp/whoops/issues", - "source": "https://github.com/filp/whoops/tree/2.16.0" + "source": "https://github.com/filp/whoops/tree/2.17.0" }, "funding": [ { @@ -9527,7 +9526,7 @@ "type": "github" } ], - "time": "2024-09-25T12:00:00+00:00" + "time": "2025-01-25T12:00:00+00:00" }, { "name": "hamcrest/hamcrest-php", @@ -9907,16 +9906,16 @@ }, { "name": "squizlabs/php_codesniffer", - "version": "3.11.2", + "version": "3.11.3", "source": { "type": "git", "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", - "reference": "1368f4a58c3c52114b86b1abe8f4098869cb0079" + "reference": "ba05f990e79cbe69b9f35c8c1ac8dca7eecc3a10" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/1368f4a58c3c52114b86b1abe8f4098869cb0079", - "reference": "1368f4a58c3c52114b86b1abe8f4098869cb0079", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/ba05f990e79cbe69b9f35c8c1ac8dca7eecc3a10", + "reference": "ba05f990e79cbe69b9f35c8c1ac8dca7eecc3a10", "shasum": "" }, "require": { @@ -9981,9 +9980,13 @@ { "url": "https://opencollective.com/php_codesniffer", "type": "open_collective" + }, + { + "url": "https://thanks.dev/phpcsstandards", + "type": "thanks_dev" } ], - "time": "2024-12-11T16:04:26+00:00" + "time": "2025-01-23T17:04:15+00:00" }, { "name": "symfony/config", diff --git a/flexiapi/tests/Feature/ApiAccountContactsTest.php b/flexiapi/tests/Feature/ApiAccountContactsTest.php index 32ae9a7..a5c4c36 100644 --- a/flexiapi/tests/Feature/ApiAccountContactsTest.php +++ b/flexiapi/tests/Feature/ApiAccountContactsTest.php @@ -48,13 +48,11 @@ class ApiAccountContactsTest extends TestCase $this->keyAuthenticated($admin) ->json($this->method, $this->route . '/' . $password1->account->id . '/contacts/' . $password2->account->id) ->assertStatus(200); - $this->assertEquals(1, DB::table('contacts')->count()); $this->keyAuthenticated($admin) ->json($this->method, $this->route . '/' . $password1->account->id . '/contacts/' . $password3->account->id) ->assertStatus(200); - $this->assertEquals(2, DB::table('contacts')->count()); // Type @@ -80,7 +78,7 @@ class ApiAccountContactsTest extends TestCase // Retry $this->keyAuthenticated($admin) ->json($this->method, $this->route . '/' . $password1->account->id . '/contacts/' . $password2->account->id) - ->assertStatus(403); + ->assertStatus(200); $this->assertEquals(2, DB::table('contacts')->count()); $this->keyAuthenticated($admin) @@ -145,7 +143,7 @@ class ApiAccountContactsTest extends TestCase // Retry $this->keyAuthenticated($admin) ->delete($this->route . '/' . $password1->account->id . '/contacts/' . $password2->account->id) - ->assertStatus(403); + ->assertStatus(404); $this->assertEquals(1, DB::table('contacts')->count()); /** @@ -179,6 +177,11 @@ class ApiAccountContactsTest extends TestCase ->post($this->contactsListsRoute . '/' . $contactsList->id . '/contacts/' . $password2->account->id) ->assertStatus(200); + // Again... + $this->keyAuthenticated($admin) + ->post($this->contactsListsRoute . '/' . $contactsList->id . '/contacts/' . $password2->account->id) + ->assertStatus(200); + $this->keyAuthenticated($admin) ->post($this->contactsListsRoute . '/' . $contactsList->id . '/contacts/' . $password3->account->id) ->assertStatus(200);