I'm new in sylius development and I'm getting trouble to install some sylius bundles. I want to build a small online store and I pretend to use SyliusProductBundle, SyliusCartBundle and the required SyliusResourcesBundle.
How can I add them to my project?
Just to test, I've downloaded and installed the sylius full stack and I've noticed that the ProductBundle isn't there. I've read the documentation of both ProductBundle and CartBundle. The ProductBundle was replaced?
So, I have 2 problems:
Figure out what bundles should I use (I think Product and Cart but ProcuctBundle is aparently missing)
How to install this standalone bundles via composer.
I'm using symfony 2.3.1
As far as I'm aware the product bundle is still active (last commit was 7 days ago). To install and use the product bundle specifically, follow these steps from the docs:
http://docs.sylius.com/en/latest/bundles/SyliusProductBundle/installation.html
You can install any other bundle stand alone by adding the package, as found on packagist, to your composer.json file and running composer update <packagename>. The sylius bundles are here:
https://packagist.org/packages/sylius/
In terms of the specific bundles you'll need, there are 2 places you'll be able to learn more:
Documentation - covers integrating product, cart and resource bundles pretty well. The remaining bundles are WIP.
Sylius Demo - the features and the last successful travis build will give you the best indication of the functionality supported by Sylius.
Related
I've been trying to create and setup a project under Symfony 4.4 for a few hours now but it seems like i'm getting a problem when i'm downloading bundles or installing things (For example, Doctrine or FOSrest).
Multiple times in tutorials I've seen that all the people seemed to have files such as "Doctrine.yaml" which are supposed to be stored in config/packages. And it seems like these configuration files are automatically created upon downloading the files associated to it.
But in my case there's simply... nothing, I have to create manually all the files, and i'm not sure if that's normal and if not, how can I resolve this problem ?
And it seems like these configuration files are automatically created upon downloading the files associated to it.
You're looking for the Symfony recipes which allow composer packages via Symfony/flex to automate common tasks when you install a new bundle.
A more detailed explanation regarding how does flex work you'll find in the official documentation here when it was first introduced in Symfony 3.4, but note that is not maintained anymore for this version.
I corrected it. I simply was being too dumb. When I created the git repository, I did the installation wrong and I didn't immediatly notice that I was downloading things into the wrong repository.
Thanks for all the answers!
Here is my problem, I am trying to create an e-commerce with the sylius framework which itself is based on symfony.
In the documentation, it says that the best way to download assets and therefore personalize your store is
to use webpack encore. So I followed the steps described in the doc by having composer require symfony / webpack-encore-bundle
then yarn install but unfortunately, when I have to do yarn encore dev, I have a problem. Note that at the time of yarn install, dependencies do not install correctly.
After doing research on the net, I understood that there is a conflict between yarn and gulp which is installed by default in sylius and that to correct the problem,
you must erase all traces of gulp. Personally i think this should not be the responsibility of neophytes. I found on github a branch of sylius without gulp called bye-bye-gulp I tried to clone it but impossible to work with.
If there are people who know how to hack this problem or better, people who have already passed this stage, please come to my aid.
thank you in advance
Welcome to SO Markus,
This is not a proper question for stack overflow, please read the guidelines. You might want to post your different webpack.config.js (the one in your theme folder too) to start with so we at least have some code to look at. It worked pretty easily for me on my current project based on Sylius 1.7, what tutorial are you using ?
I am new to symfony framework so I don't have idea about bundles so I want to use third party bundles.
To get third party bundles as per my functionality I refer this and this links but I can't get full explanation about bundles like how to use , after install third party bundles where I need to change , which and where I need to configuration ?
So can anyone from symfony community guide me to how to use third party bundles ? and how to configure ? and where I need to configure ? configure mean routing.yml , config.yml file changes.
for ex : I need to install page building Bundle (CMS) for static pages (like about us , privacy and policy etc.) I install 3 different bundles using composer from git hub but none of are working. At last I install BeelabSimplePageBundle bundle and it install successfully in my vendor folder but on github there is not so much explanation about routing , configuration. may be some pro symfony developer can understand that explanation but newbie like me can't understand it because there is not step by step explanation.
so if there is any pro symfony developer please explain BeelabSimplePageBundle step by step and full explaination for install and for any third party bundle.so next time when I need to add any third party bundle I can do it myself and if needed I can explain to some newbie developer in future.
Thanks in advance.
Third party bundles usually comes with it's own documentation. If it doesn't you should avoid using it because it is going to make the development process harder and make your code buggy.
Only choose well documented and reputed bundles
Use the original documentation that comes with the bundle
In case you are needing a good place to search for symfony bundles, knpbundles.com has a large collection of symfony bundles
I am starting a new Symfony project. After I type:
symfony new project-name
I see that the new project is created but I don't find the Assetic bundle inside the project. Also if I try:
app/console
I don't find the following commands:
assetic:dump
assetic:watch
Could somebody help me? What am I doing wrong. Is something wrong with the files I download?
The Assetic Bundle isn't included since SF 3.2. I think this is caused by some compatibility issues.
You can add them manually to your composer.json
"symfony/assetic-bundle": "~2",
And add the new Bundle to your Kernel.
new Symfony\Bundle\AsseticBundle\AsseticBundle(),
Then it should work. I use SF 2.8 and its working. There are some deprecation warnings and i don't know if its working under SF3.
AsseticBundle was only removed from the standard distribution in 2.8. This means that if you wish to use Assetic, you may still do so, by including the dependency manually, by running:
composer require symfony/assetic-bundle
And adding the bundle in your AppKernel:
new Symfony\Bundle\AsseticBundle\AsseticBundle(),
One thing to know, though. AsseticBundle has not yet been migrated to 3.0.
Thus, you won't be able to use it (for now) if you wish to start a 3.0 project.
That's also the case for quite a few bundles (and among them the Sonata bundles), and even though some developers have started work on migrating to 3.0 release before the official release, last week, some bundles still need quite a lot work to be made compatible with 3.0.
Hopefully, AsseticBundle (and other) should be migrated over the next months. Or if you're impatient, you can still contribute to Assetic, or AsseticBundle! ;)
Edit: AsseticBundle should be tagged by the end of the month, if not before, as stof said in this issue: https://github.com/symfony/assetic-bundle/issues/401
I have a private bundle that I import in the vendor.
Now, I'm working in my project and want to edit some code in the vendor bundle.
Now I've done that and want to commit to code, so I go the dir of that bundle and say: "git commit -a" so I give a message, save and now I have a commit. Oke, "git push" and give the response "Everything is up-to-date"... So I can't push that but I can commit??
Is this not a way to commit? Should I just clone the repo and work there?
You should never edit the vendor code directly - this is the whole point of dependency management.
Composer basically works by looking at your composer.json file, and fetching the repositories and versions you specify. If you need to make changes to one of your dependencies, you should make the change in the original repository, push the changes up to GitHub (or wherever you're hosting the code) and run composer update.
When Composer installs a vendor, it checks out a particular commit, so you are not on a branch. You need to checkout the master branch — or whichever you're using — and commit to it and push it.
Its a long time ago that I asked this question. Mean while I got the answer but never updated my stackoverflow question, sorry for that!
The answer on my own question is to get the dependency with composer --prefer-source.
https://getcomposer.org/doc/03-cli.md#install
--prefer-source: There are two ways of downloading a package: source and dist. For stable versions composer will use the dist by default. The source is a version control repository. If --prefer-source is enabled, composer will install from source if there is one. This is useful if you want to make a bugfix to a project and get a local git clone of the dependency directly.