No vendor file on Symfony 2 using PhpStorm - symfony

I am using PhpStorm for the Symfony project.
I've created new file in project type. I choose composer project and used symfony/framework to download composer.phar. After creating the project, I didn't find vendor file.
What am I doing wrong? Any tutorial to install Symfony in PhpStorm?

What I usually do is creating the project with the Symfony installer and without PhpStorm (like explained in the symfony doc).
Then, when it is correctly installed, open PhpStorm -> New Project from Existing Files -> locate your project folder.
Hope this helps.

Related

Symfony4 : Where is the assets folder?

I am following a course about Symfony 4
According to the course I should have an assets folder, but I don't have one
image of my project
Install WebpackEncoreBundle. This will trigger Symfony Flex to create the assets folder for you.
composer require symfony/webpack-encore-bundle
See: https://symfony.com/doc/current/frontend/encore/installation.html

How to add Bootstrap to my Symfony 4.1 project?

I tried to find a similar case to mine but didn't succeed.
Here is the issue. I followed Symfony documentation to add Bootstrap to my project.
I indeed get a bootstrap folder in a new folder called "nodes_modules".
The thing is i can't find a global.scss file anywhere (as mentioned in the tutorial) then i don't know where to put the following command:
#import "~bootstrap/scss/bootstrap";
Do i have to create this file or does it exist somewhere in my Symfony project?
Thank you in advance.
Yes, global is your application scss file, it can be named different on you wish. You can refer this documentation in order to see how to configure it (it is app.scss in the example)
I understood what was wrong there! So if you are creating a Symfony 4.1 project on mac and you don't know where to import your bootstrap theme(s) since you don't have any assets folder here is the solution:
To have the assets folder you have to install the webpack "encore".
Please make sure you have node.js and yarn installed before that.
Then just run the following commands inside your root project directory:
composer require symfony/webpack-encore-pack
yarn install
You might have now an "assets" folder inside your project with an assets/css/app.css file and a assets/js/app.js file.
Thank you for your time ScayTrase.

How to use extensions

Could someone please explain how one uses the premake extensions. I added the eclipse extension in a directory under my premake installation. And in the premake script I added recuire "eclipse".
Running the script with premake5 eclipse, I get an error module "eclipse.lua" not found.
I added the path of the modules directory to my environment variables.
I'm using premake (premake5) on Windows 8.
Thanks
addons need to reside in a folder. You need to create a "eclipse" folder, then copy all the files in it, and the "eclipse" folder should be located where premake can load it (either next the executable or some other place handled through environment variables)
I got this working by adding the full path to the require statement.
require "C:/premake/eclipse/eclipse"
and running the command as premake5 eclipse
Note: This plugin does not generate project files that one can import into Eclipse.

Using external libraries in Eclipse plugin

Problem:
I'm making eclipse plugin and need to use external jars.
What I did:
I maked folder lib where I added all needed jar and added them to the build path, but it's probably not enought, I found that I have to added them somehow to the plugin project dependencies, but I couldn't find how to add them in Eclipse. I use Eclipse 4.3.1 Kepler.
So I need use in my plugin something like foo.jar in which is fooClass.class.
Open the plugin.xml editor and select the Runtime tab. Add the jars to the Classpath section (bottom right).
This will add the jars to the Bundle-ClassPath entry in the MANIFEST.MF and will update the build.properties file to ensure the jars are included in the plugin.

Symfony 2.2 Deployment Questions

Because of an other problem on my server, I tried to setup a real new project and did this (localhost with xampp on windows):
installed curl
loader composer like told in docs
loader vendors like told in docs
merged app/config-folder
copied src-folder
copied web/bundles/myBundle-folder
After that, I tried the deployment-steps documentation. I skipped uploading the files and editing parameter.yml (it's already configured for localhost).
Than I am running into trouble doing 'B) Update your vendors':
php composer.phar install --optimize-autoloader
This steps remove all my files from the web\bundles\myBundle-folder.
Do I have to tell composer about my bundle? I first thought, that I have to store them somewhere else, but this thread tells me, that I am right?!
The thread you are mentioning is from symfony 1, but you are installing a symfony 2 application.
In web/bundles are your assets installed (css, javascript and images).
Your bundles which will be installed via composer are in your vendors folder.
And your own bundles should be in the src folder.
I think this is a good start to have a look at where to store your files.
Your css, js and images should be stored in a bundle, e.g.:
src/AcmeDemoBundle/Resources/public/css
src/AcmeDemoBundle/Resources/public/js
src/AcmeDemoBundle/Resources/public/images
And then you can install your assets with php app/console assets:install web and they will be pushed into the web/bundles folder.

Resources