Sylius and Behat - behat

I need to add my own behat tests to a sylius based application. I plan to do this from my own bundle.
Reading doc at http://docs.sylius.org/en/latest/behat/how-to-add-new-context.html is not clear to me how could i add context from my own bundle.
Is this possible? Doc says you need to do this in one of the files at src/Sylius/Behat/Resources/config/services/contexts/
So, do i need to add them there or can i add new ones from my own bundle?
Thank you.

You can do that, by configuring a MultiContainerExtension in your behat.yml file.
Sylius\Behat\Extension\MultiContainerExtension:
imports:
- "src/AppBundle/Resources/config/services.xml"
With this config you can place all of your services in this file or import them. Just like regular symfony services. It is defined similar way here.

It seems to have moved to FriendsOfBehat\ContextServiceExtension in the first beta (1.0.0-beta.1) release.
I guess it's working the same way:
FriendsOfBehat\ContextServiceExtension:
imports:
- "/www/vvc/vendor/sylius/sylius/src/Sylius/Behat/Resources/config/services.xml"
- "/www/vvc/src/AppBundle/Resources/config/behat_services.xml"
And don't forget to rename your contexts_as_services to contexts_services if your are upgrading

Related

TracAccountManager in global plugins [inherit] with acct_mgr.admin.accountmanageradminpanel doesn't show admin panel

I have the following set in trac.ini:
[components]
acct_mgr.admin.accountmanageradminpanel = enabled
[inherit]
plugins_dir = ../../plugins
and in a global plugins folder I have TracAccountManager-0.5.dev0-py2.7.egg.
However, I don't see the account manager admin panel still. Putting it in the project specific plugins folder seems to resolve the issue. I'd rather have it be globally inherited. Any ideas?
EDIT:
Forgot to add the following details:
This is on Windows 7, and trac version is 1.2.2.
Let me know if any other details are needed.
EDIT:
It seems to be picking up the plugin b.c. if I go to the admin tab and then manage plugins, the plugin shows up as tracaccountmanager 0.5.dev0. After seeing this, I've confirmed that I do not have a copy of it in the project specific plugins folder.
I've also characterized the inherited plugins dir to be relative to the project env specific plugins dir.
Non-absolute paths are relative to the Environment conf directory. You probably need to modify your relative path. I will update the Trac documentation to specify this detail.
After messing around with the [components] configuration it seems that the documentation for https://trac-hacks.org/wiki/AccountManagerPlugin/Modules#AccountManagerAdminPanel is not working for me. Instead of using
[components]
acct_mgr.admin.AccountManagerAdminPanel = enabled
as the documentation suggests, I'm finding better success using
[components]
acct_mgr.admin.configurationadminpanel = enabled
acct_mgr.admin.useradminpanel = enabled
acct_mgr.api.accountmanager = enabled
acct_mgr.notification.accountchangenotificationadminpanel = enabled
I concluded this from going to the admin plugins section and expanding the tracaccountmanager 0.5.dev0 section, clicking enable all, then started disabling components in batches or individually. In fact, I don't think acct_mgr.admin.AccountManagerAdminPanel does anything from what I've observed.

Is theme validation required for Bigcommerce's Stencil theme development

When using "stencil bundle" is it required to have validated code? It seems it wont export unless the errors are fixed.
It is, yes. But as a temporary solution while in development you can always add some entries to the .eslintignore file (as specified here) present in your root folder. You will have some already there for reference. That will be useful for plugins and modules not written by you that ESLint might not let pass. ;)

Sitefinity CSS combining in MVC Layouts

In Sitefinity WebForms you have a ResourceLinks control allowing you to combine multiple, but what do you use in MVC layouts?
I'm not sure if the razor helper #Html.StyleSheet will do the job?
Adding all the CSS files to the Global folder in App_Data\Sitefinity\WebsiteTemplates[template_folder]\App_Themes[theme] will automatically add them to the site, but won't combine them.
We're working with Sitefinity 8.x and looking for a definitive way to compress and combine JS and CSS, but the pickings seem slim.
With the move from webforms to mvc, Sitefinity didn't include specifically introduce a new bundler or something so you're left with essentially 2 default options, but they've seemed to have opted for approach #3.
1) Use .less and .sass to pre-process as part of your build process.
So in your theme folder you would have a global.less (or scss or sass) that essentially combines them using the #import directive.
Install a VisualStudio extension like Mad's Kristensen Bundler and Minification VS Extension (previously part of WebEssentials) and then define in the VS settings that it should compile and minify on build.
Then every time you build or publish, your one bundled-and-compressed .min.css will be available for Sitefinity.
2) Second option would be to use default ASP.NET Web Optimization.
Where you define static bundles in VisualStudio and then use these bundles by means of #Styles.Render or #Scripts.Render to output them.
3) Lastly a new way has been added with the new Feather approach, which uses the current fashionable approach of Grunt to bundle and optimize your styles and scripts.
In the /ResourcePackages folder you'll already see a gruntfile.js file which has a task you can run which can then compile (and can be extended to prefix, bundle, minify, etc) your .sass into a .min.css which you can then add to your solution.
A sample can be seen here (https://github.com/Sitefinity/feather-packages/blob/master/Bootstrap/gruntfile.js)
I'd use a combination of the above approach to receive the maximum result with Sitefinity where you use option 1 to have VS build out your core/base CSS and JS and then include them using Web.Optimization.
Any additional page or widget related styles or JS can then be included afterwards manually through the css widget which gets compiled through option number 3.
Once you get more familiar with this new approach you can create and load optimized .css and .js on demand - even using a RequireJS approach to load them depended on the widget dragged and dropped on the page. RequireJS might seem out-dated given the latest gadgets and gizmo's but with v9.0 its still being used by Sitefinity itself to add inline-editing functionality.
Let me know if you need more info on option 3, I'm happy to extend my answer with some code snippets, or sample scripts on how I've tailored them.

symfony1.4-like symfony2 installation

symfony1.x followed a good standart that the whole framework lies somewhere outside and is available to any project. Today I started to read symfony2 documentation and actually downloaded the 'with vendors' 2.0.1 package which is presented on download page. After opening the package I was a bit surprised of what I've seen. But after looking around the package I found that the only folder I need is 'vendors' one - so I copied its content to my '...\lib\vendor\symfony2' folder (near '...\lib\vendor\symfony' and '...\lib\vendor\ext'). I added it to include path and proceed reading documentation. And then I found a problem - a command listed 'php app/console generate:bundle --namespace=Acme/HelloBundle --format=yml' produced simple questions. Did they miss to explain how to generate a project (structure, preconfiguration, command-line files, etc)? And what about '.bat' and '.sh' files?
Symfony2 is very, very different than symfony 1 - especially when it comes to the directory structure. You can't simply drop in the vendors dir and expect it to work. This page explains how to setup a new Symfony2 project.
I recommend you to forget Symfony... and to think with Symfony2 about another think completely different than S1.
Installation is really simple and you will need some advanced PHP knowledge just to understand how it works... But if you have worked with S1, I expect you will have not much problems :)

Create class diagram from already existent iphone code

does anybody know, how i could create automatically a UML class diagram from an already existent iphone project. Is it possible?
Thanks in advance.
Yes, you can use Doxygen:
Install Doxygen (with MacPorts: sudo port install doxygen).
Get a script like this and change the first lines to match your configuration.
Download these files and edit the Doxygen file so it says HAVE_DOT=YES and UML_LOOK=YES.
It will then generate and install a docset that you can read from the documentation browser, or just right click and show contents from Finder.
Or, if you want a graph of dependencies check: https://github.com/nst/objc_dep It uses graphviz.
See also OmniGraffle of all things. If you open an Xcode project with it, it will generate a full class diagram. It can be fairly overwhelming for a large project.