-
Notifications
You must be signed in to change notification settings - Fork 156
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix #740 [Fix] Update delete path name to avoid route conflicts (loic…
…425) This PR was merged into the 1.11 branch. Discussion ---------- | Q | A | --------------- | ----- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Related tickets | | License | MIT 1/ Delete path name can have some conflicts depending on operation sorting. On previous routing system, these routing sorting system was hard-coded. If we place the Bulk delete operation after the delete operation, the bulk delete is broken due to path conflicts. 2/ On current version of Symfony, http method overrides is not enabled by default and then these paths have another issue with same path for delete and edit operation (with POST method). symfony/recipes#892 Before ``` app_backend_contact_create GET|POST ANY ANY /admin/contacts/new app_backend_contact_update GET|PUT ANY ANY /admin/contacts/{id}/edit app_backend_contact_bulk_delete DELETE ANY ANY /admin/contacts/bulk_delete app_backend_contact_delete DELETE ANY ANY /admin/contacts/{id} app_backend_contact_show GET ANY ANY /admin/contacts/{id} app_backend_contact_index GET ANY ANY /admin/contacts ``` After ``` app_backend_contact_create GET|POST ANY ANY /admin/contacts/new app_backend_contact_update GET|PUT ANY ANY /admin/contacts/{id}/edit app_backend_contact_bulk_delete DELETE ANY ANY /admin/contacts/bulk_delete app_backend_contact_delete DELETE ANY ANY /admin/contacts/{id}/delete app_backend_contact_show GET ANY ANY /admin/contacts/{id} app_backend_contact_index GET ANY ANY /admin/contacts ``` Commits ------- 2222054 Update delete path name to avoid route conflicts c59467d Fix PHPUnit tests
- Loading branch information
Showing
12 changed files
with
44 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the Sylius package. | ||
* | ||
* (c) Sylius Sp. z o.o. | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Sylius\Component\Resource\Metadata\Api; | ||
|
||
/** | ||
* @experimental | ||
*/ | ||
interface ApiOperationInterface | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters