Documentation has been merged into our main repository. Please contribute there. Thank you!
sylius / sylius-docs Goto Github PK
View Code? Open in Web Editor NEWDEPRACATED. See Sylius/Sylius repository.
Home Page: http://sylius.org
DEPRACATED. See Sylius/Sylius repository.
Home Page: http://sylius.org
Documentation has been merged into our main repository. Please contribute there. Thank you!
As we can't let Pawel make some charm to devs during Symfony's camp without having some contributing guides, I wanted to share ideas.
3 guides :
How ?
Sylius/Sylius
easy pick
issueìmprovement
ticketCoding standards and quality
Before submitting a PR :
When submitting a PR :
How ?
Sylius/Sylius-Docs
What ?
How ?
Of course we will not be able to write something similar to Symfony in the time we have. But I do think that we can begin to have something useful for new arrivals. If you like these ideas, I can start writing these guides, even if my English is far from perfect.
To finish, this could be cool to find nice names for these contribution guides. I don't really know what Sylius means, neither exactly what represents the logo, but something related to this would be interesting IMO.
This was my 2 cents, hope you like it and it will lead to an open discussion, good night :)
Is there a way to do sorting from routing by joined value without having to write a custom method? For example to sort by price (variant.price) ?
I am on Symfony v2.8.0
app/AppKernel.php
new FOS\RestBundle\FOSRestBundle(),
new JMS\SerializerBundle\JMSSerializerBundle($this),
new Sylius\Bundle\ResourceBundle\SyliusResourceBundle(),
new WhiteOctober\PagerfantaBundle\WhiteOctoberPagerfantaBundle(),
new Bazinga\Bundle\HateoasBundle\BazingaHateoasBundle(),
app/config/config.yml
sylius_resource:
resources:
app.book:
classes:
model: AppBundle\Entity\Book
app/config/routing.yml
app_book:
resource: |
alias: app.book
type: sylius.resource_api
And then when I do
./bin/console debug:router
I get
[Symfony\Component\Config\Exception\FileLoaderLoadException]
Cannot load resource "alias: app.book
".
Please note that the exception is a FileLoaderLoadException
I'd assume that it hasn't even reached Sylus yet.
Would love to provide a PR if somebody gives me a direction.
All in the title.
While implementing the PromotionBundle
separately we encounter a couple of problems of which it is unclear how to solve them
PromotionType.actions
field does result in an error about the fixed_discount
service being missing. Uncommenting the actions field does allow the form to render. Do I first need to implement some actions myself before the form will render? Do we need to override the base Actions
in the config?Rule
and Action
collections work the PromotionType
? The resource bundle has form-collection.js
and the promotion bundle has sylius-promotion.js
but that does not seems to work. Should an extra data
attribute be added to the type?->add('rules', 'sylius_promotion_rule_collection', array(
'label' => 'sylius.form.promotion.rules',
'button_add_label' => 'sylius.promotion.add_rule',
'attr' => array(
'data-form-type' => 'collection',
)
))
Hi,
I would like to generate a custom menu without KnpMenuBundle.
I have all taxonomies
$repository = $this->container->get('sylius.repository.taxonomy');
$taxonomies = $repository->findAll(); // Load all the taxonomies!
But I'm dealing with an issue : don't know how to get url of each taxon and parent url in order to do something like this :
-Parent 1
---- Child 1
---- Child 2
-Parent 2
---- Child 1
---- Child 2
can you help me ?
Explain in the documentation that the "paginator" object is, in fact, the collection of object returned by the bundle (or the custom) repository method, and that it's not really named "paginator".
Hi.
In the install instruction for your bundles you suggest something like this.
composer require sylius/order-bundle:*
I think that you should suggest something like this.
composer require sylius/order-bundle: "~0.9"
what do you think? do you want to i send the pull request?
Hi,
When I perform CRUD operations, flashbags are generated with the template "%resource% has been...". How can I configure the resource translated name ? I saw nothing concerning that in bundles/SyliusResourceBundle/configuration.rst
Hello,
I need to use mathamatics in my documentation, therefore i want to use the extension sphinx.ext.imgmath. With sphinx version 1.4.1 it does not work. Same error
https://github.com/Sylius/Sylius-Docs/issues/420
then i decided to downgrade my sphinx version now im using 1.3.6 and sphinx.ext.png
extensions = ['sphinx.ext.autodoc','sphinx.ext.pngmath','rst2pdf.pdfbuilder']
now i can build my project without any errors or warnings, however it still dont work -.-
i try to put in this in my rst-file
`.. math::
1/u + 1/v = 1/F_a`
Is there any other syntax for math in sphinx version 1.3.6 ?
thanks for your help
It seems that the documentation for Sales is not up to date.
@pjedrzejewski Do you know when it will be ?
Hi, I'm not sure which bundle to ask this, so I'll ask here. Is there a recommended way to add keyword search of products in? or is this a feature that will be added soon please? Where is the best place to ask generic questions?
Thanks
~/repositories/Sylius-Docs$ sphinx-build -b html . build
Running Sphinx v1.4a1
making output directory...
WARNING: sphinx.ext.pngmath has been deprecated. Please use sphinx.ext.imgmath instead.
Extension error:
Config value 'math_number_all' already present
Running on ubuntu wily
As I have discussed with @pjedrzejewski in this PR #340, there is no current docs for overriding models in Sylius main.
Let's discuss how we can do that here :)
Sadly my configuration block from #135 doesn't get rendered.
i use a local server 192.168.1.168 and i generate secret and client id from git bash and i generate a token and when i try to get the users list o add product from the api i get {"code":403,"message":"Access Denied"}
$ curl --include --request GET 'http://192.168.1.168/app_dev.php/api/users/' --
header 'Authorization: Bearer ZjRjNjFlZjQ0ZWIxODY1OTc1ZDUzYTFkNGE0ZTY5OGZmM2U4Z
WI2ODIzNTIyNWU0NzAyNjMzM2Y2MzI5OTBhYQ'
HTTP/1.1 403 Forbidden
Date: Sun, 07 Jun 2015 01:24:55 GMT
Server: Apache/2.4.7 (Win32) PHP/5.4.24
X-Powered-By: PHP/5.4.24
Set-Cookie: PHPSESSID=k5jr84alke288fnjh2ig878s61; path=/
Cache-Control: no-cache
X-Debug-Token: 10da68
X-Debug-Token-Link: /app_dev.php/_profiler/10da68
Content-Length: 38
Content-Type: application/json
{"code":403,"message":"Access Denied"}
any idea how fix it?
perhubs i made error in the commande line?
What's the preferred way to document object properties?
I see lots of different examples:
http://docs.sylius.org/en/latest/book/channels.html Does it by a list. Name of property is in bold followed by an indented description.
http://docs.sylius.org/en/latest/book/products.html does it by a list but with property names in italics and their descriptions on the same line
http://docs.sylius.org/en/latest/book/addresses.html Does it by a bulleted list with no description
http://docs.sylius.org/en/latest/book/orders.html Does it by a table with Attribute and Description columns.
Or is there another way that it could be done. Perhaps automatically by a third party application.
Hi there. I'm reading the docs and following for my project. For creating my custom CartItem entity doc suggest to extend from
use Sylius\Component\Cart\Model\CartItem as BaseCartItem;
After that, in the ItemResolver it calls a setVariant function
$item->setVariant($product);
but there's no setVariant in the CartItem i'm extending.
What i see is i have that function defined at https://github.com/Sylius/Core/blob/master/Model/OrderItem.php#L75, in a model extending the same CartItem i'm trying to extend.
so, to use this setVariant, shouldn't we extend from Sylius\Core\Model\OrderItem? or am i understanding it totally wrong?
Thanks
*excuse my english . I have created a new entity and i want to add it's adminisrator to admin panel in admin dashboard i've followed the steps in the sylius docs but no changes :
AppBundle/Resources/config.services.yml:
services: app.admin.menu_builder_listener: class: AppBundle\EventListener\MenuBuilderListener tags: - { name: kernel.event_listener, event: sylius.menu_builder.backend.main, method: addBackendMenuItems } - { name: kernel.event_listener, event: sylius.menu_builder.backend.sidebar, method: addBackendMenuItems }
AppBundle\EventListener\MenuBuilderListener.php :
`<?php
namespace AppBundle\EventListener;
use Sylius\Bundle\UiBundle\Menu\Event\MenuBuilderEvent;
use Sylius\Bundle\WebBundle\Event\MenuBuilderEvent as FrontendMenuBuilderEvent;
class MenuBuilderListener
{
/**
* @param MenuBuilderEvent $event
*/
public function addBackendMenuItems(MenuBuilderEvent $event)
{
$menu = $event->getMenu();
$menu->addChild('backend_main')
->setLabel('Test Backend Main');
}
/**
@param FrontendMenuBuilderEvent $event
*/
public function addFrontendMenuItems(FrontendMenuBuilderEvent $event)
{
$menu = $event->getMenu();
$menu->addChild('frontend')
->setLabel('Frontend Menu Item');
}
}`
its actually not loading the config.services.yml ! why ?! what can be the problem ! plz help
In http://sylius.readthedocs.org/en/latest/bundles/SyliusResourceBundle/index_resources.html#using-a-custom-repository-method, it would be nice to explain how to create a custom repo method that is compatible with the pagination.
I think that you should rename the section PHP Ecommerce Components
in PHP Components
because there is the component Registry witch is not related to ecommerce. You should add locale component too. It is the same the bundle. I will add some label too.
@Sylius/core-team What do you think?
Hi,
Could you fill in the architecture page at http://docs.sylius.org/en/latest/book/architecture.html?
I'm interested in the project but it's quite difficult to dig in as, as far as I know, there is no global documentation.
Thanks a lot!
Hello, im trying to contribute to this documentation. So my first step was to build it. The readme says, just execute
$ bin/build
but this file doesn't exists. Maybe it was removed before? If yes, then why?
I instead use the sphinx-build
command.
$ sphinx-build -b html . build
So the readme should be updated or the bin/build
should be created.
When I try to update schema then I got this error. When I look inside my vendors Sylius folder I did not find any component folder there. It seem that composer did not download this because I searched about this and found that
"This package is abandoned and no longer maintained. No replacement package was suggested"
So how can I use Promotion bundle?
PATCH /api/v1/carts/{id}
id - url attribute - id of the cart
Example
$ curl http://demo.sylius.org/api/v1/carts/21 \
-H "Authorization: Bearer SampleToken" \
-H "Content-Type: application/json" \
-X PATCH \
--data '
{
"promotionCoupon": "BANANA"
}
'
Exemplary Response
STATUS: 204 No Content
Important note: To be performed after the Addressing step!
Hi,
I would like to translate sylius doc to french.
Are you ok ?
How and where ?
Expression Language capabilities in routes in ResourceBundle are not documented.
Please see this issue Sylius/Sylius#1827
I was initially going to propose docs for each version of Sylius, like Symfony and Doctrine have.
Instead while Sylius is still in development, adding version note blocks before certain descriptions maybe more clearer.
Examples:
These docs have been written for Version 0.13.
and
In versions before 0.10, The
Sylius\Component\Cart\Model\CartItem
was previously namespaced asSylius\Bundle\CartBundle\Model\CartItem
.
The benefit of this would be that the breaking changes between development versions would be noted.
Fortunately it's through my understand of the codebase that I've been able to make fixes myself where the docs are out of date.
The disadvantage of this would be that this may cause more confusion rather than less.
I have Symfony 2.2.* installed
I am running composer require sylius/resource-bundle:0.2.*
I get the following error
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for sylius/resource-bundle 0.2.* -> satisfiable by sylius/resource-bundle[0.2.x-dev].
- jms/serializer-bundle 0.11.0 requires jms/serializer 0.11.* -> satisfiable by jms/serializer[0.11.0].
- sylius/resource-bundle 0.2.x-dev requires jms/serializer-bundle 0.11.* -> satisfiable by jms/serializer-bundle[0.11.0].
- Conclusion: remove jms/metadata 1.3.0
- jms/serializer 0.11.0 requires jms/metadata >=1.1.0,<1.3-dev -> satisfiable by jms/metadata[1.1.1, 1.2.0-RC].
- Can only install one of: jms/metadata[1.3.0, 1.1.1].
- Can only install one of: jms/metadata[1.3.0, 1.2.0-RC].
- Installation request for jms/metadata == 1.3.0.0 -> satisfiable by jms/metadata[1.3.0].
I want to demonstrate your platform to my management for future usage on big projects, and your website is down... for a week at least since I found this platform. Too bad. You're losing big name clients. :(
On http://sylius.readthedocs.org/en/latest/bundles/SyliusCartBundle/installation.html#templates there is 404 link in note "You can use the templates from our Sandbox app as inspiration.".
Seems like it is a bit confusing when you should extend Core model vs. Component model. We should clarify that in Bundles General Guide and also add overriding guide for the full platform.
the form type service can't be defined !!!
AppBundle/Resources/config/routing.yml:
app_slider_create: path: /sliders/slider/new methods: [GET, POST] defaults: _controller: app.controller.slider:createAction _sylius: form: app.form.type.slider
AppBundle/Resources/config/services.yml:
app.form.type.slider: class: AppBundle\Form\Type\add_img_sliderType tags: - { name: form.type, alias: app_slider } arguments: [@doctrine, @sylius.context.locale]
I cann't import the routing.yml because file doesnt exist.
sylius_product:
resource: @SyliusProductBundle/Resources/config/routing.yml
repository doesnt containt this file:
https://github.com/Sylius/Sylius/tree/master/src/Sylius/Bundle/ProductBundle/Resources/config
I've followed those instructions: http://docs.sylius.org/en/latest/bundles/SyliusAddressingBundle/installation.html
And I get an error
PHP Fatal error: Class 'Sylius\Component\Translation\Model\AbstractTranslatable' not found in /var/www/foo/vendor/sylius/addressing/Model/Country.php on line 24
Perhaps this Bundle/Component has some other dependencies that should have been mentioned?
Full output
# composer install --optimize-autoloader --prefer-dist -vvv
Reading ./composer.json
Loading config file ./composer.json
Executing command (CWD): git describe --exact-match --tags
Executing command (CWD): git branch --no-color --no-abbrev -v
Executing command (CWD): hg branch
Executing command (CWD): svn info --xml
Failed to initialize global composer: Composer could not find the config file: /root/.composer/composer.json
To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section
Reading ./composer.lock
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Reading ./composer.lock
Analyzed 271 packages to resolve dependencies
Analyzed 819 rules to resolve dependencies
Nothing to install or update
Generating optimized autoload files
> post-install-cmd: Incenteev\ParameterHandler\ScriptHandler::buildParameters
Updating the "app/config/parameters.yml" file
> post-install-cmd: Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::buildBootstrap
> post-install-cmd: Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache
PHP Fatal error: Class 'Sylius\Component\Translation\Model\AbstractTranslatable' not found in /var/www/foo/vendor/sylius/addressing/Model/Country.php on line 24
PHP Stack trace:
PHP 1. {main}() /var/www/foo/app/console:0
PHP 2. Symfony\Component\Console\Application->run() /var/www/foo/app/console:27
PHP 3. Symfony\Bundle\FrameworkBundle\Console\Application->doRun() /var/www/foo/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:126
PHP 4. Symfony\Component\HttpKernel\Kernel->boot() /var/www/foo/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:70
PHP 5. Symfony\Component\HttpKernel\Kernel->initializeContainer() /var/www/foo/app/bootstrap.php.cache:2396
PHP 6. Symfony\Component\DependencyInjection\ContainerBuilder->compile() /var/www/foo/app/bootstrap.php.cache:2618
PHP 7. Symfony\Component\DependencyInjection\Compiler\Compiler->compile() /var/www/foo/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ContainerBuilder.php:614
PHP 8. Symfony\Component\HttpKernel\DependencyInjection\MergeExtensionConfigurationPass->process() /var/www/foo/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/Compiler.php:117
PHP 9. Symfony\Component\DependencyInjection\Compiler\MergeExtensionConfigurationPass->process() /var/www/foo/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/MergeExtensionConfigurationPass.php:39
PHP 10. Sylius\Bundle\AddressingBundle\DependencyInjection\SyliusAddressingExtension->load() /var/www/foo/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/MergeExtensionConfigurationPass.php:55
PHP 11. Sylius\Bundle\ResourceBundle\DependencyInjection\AbstractResourceExtension->configure() /var/www/foo/vendor/sylius/addressing-bundle/DependencyInjection/SyliusAddressingExtension.php:36
PHP 12. Sylius\Bundle\ResourceBundle\DependencyInjection\AbstractResourceExtension->loadDatabaseDriver() /var/www/foo/vendor/sylius/resource-bundle/DependencyInjection/AbstractResourceExtension.php:102
PHP 13. Sylius\Bundle\ResourceBundle\DependencyInjection\Driver\AbstractDatabaseDriver->load() /var/www/foo/vendor/sylius/resource-bundle/DependencyInjection/AbstractResourceExtension.php:272
PHP 14. Sylius\Bundle\ResourceBundle\DependencyInjection\Driver\DoctrineORMDriver->getRepositoryDefinition() /var/www/foo/vendor/sylius/resource-bundle/DependencyInjection/Driver/AbstractDatabaseDriver.php:68
PHP 15. ReflectionClass->__construct() /var/www/foo/vendor/sylius/resource-bundle/DependencyInjection/Driver/DoctrineORMDriver.php:38
PHP 16. spl_autoload_call() /var/www/foo/vendor/sylius/resource-bundle/DependencyInjection/Driver/DoctrineORMDriver.php:38
PHP 17. Hoa\Core\Consistency\Consistency::autoload() /var/www/foo/vendor/sylius/resource-bundle/DependencyInjection/Driver/DoctrineORMDriver.php:0
PHP 18. Hoa\Core\Consistency\Consistency->_import() /var/www/foo/vendor/hoa/core/Consistency.php:329
PHP 19. spl_autoload_call() /var/www/foo/vendor/hoa/core/Consistency.php:285
PHP 20. Symfony\Component\Debug\DebugClassLoader->loadClass() /var/www/foo/vendor/hoa/core/Consistency.php:285
PHP 21. require() /var/www/foo/vendor/symfony/symfony/src/Symfony/Component/Debug/DebugClassLoader.php:153
Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache handling the post-install-cmd event terminated with an exception
[RuntimeException]
An error occurred when executing the "'cache:clear --no-warmup'" command.
Exception trace:
() at /var/www/foo/vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Composer/ScriptHandler.php:327
Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::executeCommand() at /var/www/foo/vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Composer/ScriptHandler.php:138
Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache() at phar:///usr/local/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php:211
Composer\EventDispatcher\EventDispatcher->executeEventPhpScript() at phar:///usr/local/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php:167
Composer\EventDispatcher\EventDispatcher->doDispatch() at phar:///usr/local/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php:92
Composer\EventDispatcher\EventDispatcher->dispatchScript() at phar:///usr/local/bin/composer/src/Composer/Installer.php:342
Composer\Installer->run() at phar:///usr/local/bin/composer/src/Composer/Command/InstallCommand.php:131
Composer\Command\InstallCommand->execute() at phar:///usr/local/bin/composer/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:257
Symfony\Component\Console\Command\Command->run() at phar:///usr/local/bin/composer/vendor/symfony/console/Symfony/Component/Console/Application.php:874
Symfony\Component\Console\Application->doRunCommand() at phar:///usr/local/bin/composer/vendor/symfony/console/Symfony/Component/Console/Application.php:195
Symfony\Component\Console\Application->doRun() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:146
Composer\Console\Application->doRun() at phar:///usr/local/bin/composer/vendor/symfony/console/Symfony/Component/Console/Application.php:126
Symfony\Component\Console\Application->run() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:82
Composer\Console\Application->run() at phar:///usr/local/bin/composer/bin/composer:43
require() at /usr/local/bin/composer:25
install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-plugins] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [--ignore-platform-reqs] [packages1] ... [packagesN]
Obviously there are a lot of pages and parts of the Sylius system that needs to be documented. One of the things that catches me is that something may not be current anymore - this would be handy if I knew when that page was last updated.
Is this possible to add, and what can I do to make this happen?
Related to Sylius/Sylius#1935
After merge item resolvers would be chainable that would allow much easier adding additional resolvers into that process.
documentation is still referring to SellableInterface
even though this was obviously removed.
https://github.com/Sylius/Sylius-Docs/blob/master/bundles/SyliusOrderBundle/installation.rst
im still new to this bundle so im not confident enough to fix this by myself
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.