No description
Find a file
Grzegorz Sadowski c49425d086
[API][DOC]Adding a tip about api's preventing methods beside GET to load non cart orders by default (#17256)
| Q               | A
|-----------------|-----
| Branch?           | 1.13
| Bug fix?           | no
| New feature?  | no
| BC breaks?      | no
| Deprecations? | no
| Related tickets | na
| License         | MIT

<!--
 - Bug fixes must be submitted against the 1.13 branch
 - Features and deprecations must be submitted against the 1.14 branch
- Features, removing deprecations and BC breaks must be submitted
against the 2.0 branch
 - Make sure that the correct base branch is set

To be sure you are not breaking any Backward Compatibilities, check the
documentation:

https://docs.sylius.com/en/latest/book/organization/backward-compatibility-promise.html
-->

Hello, 

If we add a custom API endpoint to the Orders using any method besides
GET, we end up with a very unclear 404 error.

Investigating this led us to find this "feature" which prevents us from
loading the order with a given token due to the order not being in the
state `cart`. In our case, we needed to update the customer cart with
information from an older order. So it was logical for us to use `POST`
as we are updating the cart, and it was logical to have the order token
in the URL to specify the order we need to pull the data from.

It was therefore quite frustrating to debug; I thought adding a little
tip about it in the docs wouldn't hurt any future developer coming
across this issue.

Reference to the class where this filtering is done:
https://github.com/Sylius/Sylius/blob/2.0/src/Sylius/Bundle/ApiBundle/Doctrine/ORM/QueryExtension/Shop/Order/StateBasedExtension.php

Hope I contributed as needed, with ❤️ 

Regards
2024-10-29 07:24:18 +01:00
.bunnyshell Merge branch '1.12' into 1.13 2024-05-22 14:54:12 +02:00
.docker Update dev dockerfile 2023-01-19 13:55:43 +01:00
.github [CI] Remove currently unneeded custom build 2024-10-08 14:08:00 +02:00
adr remove dead link to codebetter.com 2023-05-01 11:05:24 +02:00
app [Maintenance] Remove redundant Sylius version information in deprecation messages 2023-09-19 09:03:41 +02:00
bin [maintenance] - Use symfony runtime component 2022-11-02 19:56:55 +01:00
config [Maintenance] Add image firewall 2024-04-08 12:44:29 +02:00
docs [API][DOC]Adding a tip about api's preventing methods beside GET to load non cart orders by default (#17256) 2024-10-29 07:24:18 +01:00
etc [Maintenance] Update .gitattributes 2024-02-02 15:07:36 +01:00
features Revert "[Behat] Temporarily add todo tag to problematic scenarios" 2024-10-17 13:22:14 +02:00
public [maintenance] - Use symfony runtime component 2022-11-02 19:56:55 +01:00
src [API] Apply statistics constraints sequentially to fix 500 error when using an undefined parameter 2024-10-28 12:33:59 +01:00
templates [Swagger] Fix post-token-obtaining dynamic API authorization 2024-03-12 14:43:09 +01:00
tests [API] Apply statistics constraints sequentially to fix 500 error when using an undefined parameter 2024-10-28 12:33:59 +01:00
translations [Maintenance] Update composer, bundles and symfony lock 2020-09-04 14:29:26 +02:00
var Use Symfony 3 directory structure 2016-11-22 19:02:56 +01:00
.babelrc Bump JS dependencies' versions 2022-09-16 16:40:17 +02:00
.dockerignore [Bunnyshell] Adjust the workflows for Fork PRs 2023-07-06 09:19:45 +02:00
.editorconfig Use rollup to bundle JS (ES6 modules) 2018-06-15 19:49:05 +02:00
.env [Messenger] Use parameters in the transport configuration 2023-01-24 15:47:20 +01:00
.env.test [Messenger] Use parameters in the transport configuration 2023-01-24 15:47:20 +01:00
.env.test_cached [Messenger] Use parameters in the transport configuration 2023-01-24 15:47:20 +01:00
.eslintrc.js Use rollup to bundle JS (ES6 modules) 2018-06-15 19:49:05 +02:00
.gitattributes [Maintenance] Update .gitattributes 2024-02-02 15:07:36 +01:00
.gitignore Resolve conflicts between 1.12 and 1.13 2023-12-22 13:53:00 +01:00
.npmignore Prepare for releasing @sylius-ui/frontend npm package 2022-11-10 16:58:57 +01:00
.readthedocs.yaml [Documentation] Add configuration file for Read the Docs 2024-01-26 09:58:59 +01:00
.symfony.insight.yaml Update .symfony.insight.yaml to latest PHP version 2020-07-10 21:46:46 +02:00
behat.yml.dist Bring back the "chrome_headless_second_session" mink session 2023-12-21 14:51:22 +01:00
CHANGELOG-1.0.md Generate changelog for v1.0.18 2018-07-10 13:22:15 +02:00
CHANGELOG-1.1.md Use https instead of http for all (almost) links 2020-05-16 19:59:12 +02:00
CHANGELOG-1.2.md Use https instead of http for all (almost) links 2020-05-16 19:59:12 +02:00
CHANGELOG-1.3.md Prepare v1.3.16 release 2020-01-27 16:11:16 +01:00
CHANGELOG-1.4.md Prepare v1.4.12 release 2020-01-27 16:13:38 +01:00
CHANGELOG-1.5.md Prepare v1.5.9 release 2020-01-27 16:15:47 +01:00
CHANGELOG-1.6.md Generate changelog for v1.6.9 2020-10-19 13:54:01 +02:00
CHANGELOG-1.7.md [Release] Generate changelog for v1.7.11 2020-11-12 16:46:06 +01:00
CHANGELOG-1.8.md Generate changelog for v1.8.12 2021-04-22 16:25:14 +01:00
CHANGELOG-1.9.md Generate changelog for v1.9.10 2022-03-14 15:13:55 +01:00
CHANGELOG-1.10.md Generate changelog for v1.10.14 2022-05-13 13:59:29 +02:00
CHANGELOG-1.11.md Generate changelog for v1.11.15 2023-03-28 12:01:40 +02:00
CHANGELOG-1.12.md Generate changelog for v1.12.19 2024-07-17 10:09:53 +02:00
CHANGELOG-1.13.md Generate changelog for v1.13.7 2024-10-15 11:20:59 +02:00
composer-require-checker.json Update composer-require-checker whitelist 2024-09-20 11:46:03 +02:00
composer.json Change application's version to v1.13.8-dev 2024-10-15 11:21:30 +02:00
CONFLICTS.md [Composer] Remove conflict to doctrine/orm 2024-10-08 10:33:15 +02:00
docker-compose.test.yml [Docker] Update Symfony messenger configuration 2023-01-24 16:53:01 +01:00
docker-compose.yml [Docker] Add env vars to docker-compose.yml 2022-09-13 09:55:54 +02:00
ecs.php [ECS] Add the NullableTypeDeclarationForDefaultNullValueFixer rule 2024-04-16 10:23:35 +02:00
gulpfile.babel.js [frontend]Create gulp watch script 2022-07-19 23:38:22 +02:00
LICENSE New year 2024 2024-01-04 14:21:06 +01:00
Makefile Remove Psalm 2023-12-04 11:10:34 +01:00
monorepo-builder.php Checking package versions 2022-10-05 10:35:26 +02:00
package.json Bump up Node.js only to supported LTS versions (18 and 20) 2024-02-09 13:52:53 +01:00
phparkitect.php [Maintenance] Ignore abstract classes in spec arkitect rule 2024-01-26 14:57:30 +01:00
phpspec.yml.dist Remove custom error level on Phpspec 2022-05-16 10:01:29 +02:00
phpstan-baseline.neon [Review] Change ReviewChangeListener doctrine event from postRemove to preRemove 2024-10-08 10:33:15 +02:00
phpstan.neon.dist Minor improvements in PHPStan configuration 2024-09-02 07:22:25 +02:00
phpunit.xml.dist Refactor checking whether the channel can be deleted 2023-11-06 16:02:12 +01:00
README.md Update README.md 2024-10-09 15:10:00 +02:00
rector.php [Rector] Configure PHP version up to 8.0 2022-06-02 10:20:15 +02:00
RoboFile.php Extract StateMachine abstraction into its own package 2024-01-15 15:40:07 +01:00
SECURITY.md Refer to release process from SECURITY.md 2019-06-12 22:29:14 +08:00
symfony.lock [ApiBundle] Implement Sales Statistics feature 2024-01-17 14:21:49 +01:00
UPGRADE-1.0.md Use https instead of http for all (almost) links 2020-05-16 19:59:12 +02:00
UPGRADE-1.1.md Mention BC breaks caused while fixing security issues 2018-07-10 13:27:39 +02:00
UPGRADE-1.2.md Mention BC breaks caused while fixing security issues 2018-07-10 13:29:42 +02:00
UPGRADE-1.3.md Fix typos 2020-04-27 12:44:17 +02:00
UPGRADE-1.4.md Remove known errors section 2019-06-20 17:27:16 +08:00
UPGRADE-1.5.md [UPGRADE] Mention locale requirement change in UPGRADE-1.5 2019-07-04 13:08:05 +02:00
UPGRADE-1.6.md Adjust link to migration file 2020-11-24 20:55:53 +01:00
UPGRADE-1.7.md Add warning on tax calculation in 1.7's upgrade 2020-08-28 12:44:23 +02:00
UPGRADE-1.8.md [Bug] Fix default sylius config file path in Sylius 1.9 2021-08-27 16:01:17 +02:00
UPGRADE-1.9.md Added promotion form theme override in UPGRADE-1.9.md 2021-09-01 16:45:31 +02:00
UPGRADE-1.10.md [ShippingMethod] Add note about changing shipping rule behaviour to the UPGRADE file 2022-04-14 12:49:43 +02:00
UPGRADE-1.11.md Merge branch '1.11' into 1.12 2023-01-24 07:29:28 +01:00
UPGRADE-1.12.md Note order token length parametrization 2024-06-14 10:04:37 +02:00
UPGRADE-1.13.md [Review] Change ReviewChangeListener doctrine event from postRemove to preRemove 2024-10-08 10:33:15 +02:00
UPGRADE-2.0.md [Upgrade] Note new sylius prefix in serialization groups 2024-02-05 09:28:26 +01:00
UPGRADE-API-1.8.md [Bug] Fix default sylius config file path in Sylius 1.9 2021-08-27 16:01:17 +02:00
UPGRADE-API-1.9.md [Bug] Fix default sylius config file path in Sylius 1.9 2021-08-27 16:01:17 +02:00
UPGRADE-API-1.10.md [Bug] Fix default sylius config file path in Sylius 1.10 2021-08-27 16:02:48 +02:00
UPGRADE-API-1.11.md Move Upgrade API from 1.11.11 to 1.11.12 section to the top of file 2022-12-15 09:58:39 +01:00
UPGRADE-API-1.12.md [API] Add note about disabling adjustment GET endpoint to UPGRADE file 2024-07-17 08:14:09 +02:00
UPGRADE-API-1.13.md [API] Add default sorting order for customers admin GET endpoint 2024-10-08 10:34:53 +02:00
UPGRADE-FROM-1.12-WITH-PRICE-HISTORY-PLUGIN-TO-1.13-LEGACY.md Update upgrade file from 1.12 with PriceHistoryPlugin to Sylius 1.13 2023-06-22 14:40:00 +02:00
UPGRADE-FROM-1.12-WITH-PRICE-HISTORY-PLUGIN-TO-1.13.md Update upgrade file from 1.12 with PriceHistoryPlugin to Sylius 1.13 2023-06-22 14:40:00 +02:00
webpack.config.js Add Webpack Encore 2019-11-06 15:08:34 +01:00
yaml-standards.yaml fixed find files in yaml standards 2021-03-30 22:59:30 +02:00

Sylius is an Open Source eCommerce framework on top of Symfony.

The highest quality of code, strong testing culture, built-in Agile (BDD) workflow and exceptional flexibility make it the best solution for applications tailored to your business requirements. Powerful REST API allows for easy integrations and creating unique customer experience on any device.

We're using full-stack Behavior-Driven-Development, with phpspec and Behat.

Enjoy being an eCommerce Developer again!

⚙️ Installation

Install Sylius with Composer (see requirements details).

Follow the Getting started with Sylius tutorial!

📖 Documentation

Documentation is available at docs.sylius.com.

Sylius Plus

Sylius Plus offers modular features like OnePageCheckout and a B2B suite, alongside advanced capabilities such as multi-store management, partial order fulfillment, smooth returns handling, a loyalty system and multi-source inventory. Pick and choose the modules you need to supercharge your eCommerce projects effortlessly.

🤝 Community

Get Sylius support on Slack or Stack Overflow or get professional SLA-backed support and Project Success Assistance with Sylius Plus license! Learn more.

Stay updated by following our Twitter and Facebook.

Would like to help us and build the most developer-friendly eCommerce framework? Start from reading our Contributing Guide!

👮 Security issues

If you think that you have found a security issue in Sylius, please do not use the issue tracker and do not post it publicly. Instead, all security issues must be sent to security@sylius.com.

📦 Plugins and Extensions: Sylius Store

You can find Sylius plugins on our Sylius Store which is a Marketplace with Sylius extensions.

Or search for packages marked as sylius-plugin on Packagist.

📃 License

Sylius is completely free and released under the MIT License.

✍️ Authors

Sylius was originally created by Paweł Jędrzejewski.

Kudos to all Sylius contributors 🙏

... and others!

See the full list of contributors from our awesome community.