PhpStorm not recognizing file paths - namespaces

I just picked up a project from another developer, and I don't know why, maybe this is because it's my first time remotely connecting to an EC2 instance, but PhpStorm isn't recognizing parts of the file paths in the "use" namespace section.
However, the code runs very well with no errors on the EC2 instance.
Here is what it looks like:
Why are "Common", "ORM", "Validator", "Constraints", "User", and "Collections" in red?
Is there any extra configuring I need to do in PhpStorm?
I know that these directories are there, for example the "use App\Entity\User" namespace is accounted for in the "User" entity file:

You need to install PHP Annotations plugin. Plus it looks like you haven't run composer install against the project's composer.json

Related

How do I install a driver in Erlang? (Specifically MySQL-otp driver)

From the documentation this driver looks great. I don't know how to install it so that I can use it though. I read somewhere that I should maybe use rebar? I looked at that documentation though and it appears to have the opposite problem. It says how to install it, but not how to use it.
Update
So it looks like after installing rebar, I can add the lines
{deps, [
{mysql, ".*", {git, "https://github.com/mysql-otp/mysql-otp",
{tag, "1.3.3"}}}
]}.
to my file rebar.config. I don't know what this does though. Do I have to compile or make this file now? Does rebar.config have to be in the same directory as my project? Right not the path to rebar.config is ~/rebar/rebar.config
Is it all correct to place my project so that it is a sibling to rebar in the file hierarchy?
Update
I ran ./rebar get-deps with the rebar folder and got
Pulling mysql from {git,"https://github.com/mysql-otp/mysql-otp",
{tag,"1.3.3"}}
Cloning into 'mysql'...
==> mysql (get-deps)
I still don't really know what this means though, and when I try compiling my erlang file I receive the result.
c(erlangFile.erl).
{error,non_existing}
rebar is a build tool for erlang.Please go through https://github.com/rebar/rebar/wiki/Rebar-commands for the commands.
After getting dependency, "rebar compile" is required to compile it.
For using the beam files, you have to give output beam path using Add Path to Erlang Search Path?
these methods.
Then you will be able to use it in your code.
Download your package, in this case
git clone https://github.com/mysql-otp/mysql-otp.git
Download a tool called rebar
git clone git://github.com/rebar/rebar.git
cd rebar
./bootstrap
Add the following to rebar/rebar.config
{deps, [
{mysql, ".*", {git, "https://github.com/mysql-otp/mysql-otp",
{tag, "1.3.3"}}}
]}.
Within the rebar/mysql-otp directory run
./rebar get-deps
Then within the same directory, run
./rebar compile
This will put a bunch of .beam files and .app file into the ebin/ directory
Next add the ebin/ directory to your path. You can update your $ERL_LIBS environment variable, run an include command within the erlang console like
1> code:add_pathz("~/rebar/mysql-otp/ebin").
or
1> code:add_pathz("rebar/mysql-otp/ebin")
And theres a few other ways to add it to your Erlang path.
Also, make sure mysql is also installed
Heres a few links with mysql installation instructions that worked for me
https://www.digitalocean.com/community/tutorials/how-to-install-mysql-on-centos-7
No package msyql-server available

How to set tool path relative to current project in PhpStorm's Command Line Tool Support

I'm using PhpStorm's Command Line Tool Support for using Laravel's artisan as a "Tool based on Symfony console" as shown below:
Problem is I want to share this across all my projects (global scope). But if I hard code the path to /home/user/project/artisan in Tool path then it runs the that project's directory (not my currently open one). If I just put artisan it doesn't run.
Is there a template variable like $ProjectDir$ or something I can add in the Tool path?

Service Fabric Legacy Settings

I have a 3rd party library which loads configuration from app.config
Now I want to configure it via Azure Service Fabric
Using the standard settings.xml will require a lot of work.
Instead I'm hoping to simply copy the old app.config into the SF Config folder and load configuration from there.
Basically the only thing I could not figure out is how to know the path of where the Config/* contents will be while running in SF.
I can get Context.CodePackageActivationContext.WorkDirectory
However, then the path from that is
..\MyClass.ServicePkg.Config.1.0.0\app.config
Is there a path I can query on the Context somehow to get full path to config folder?
Yeah you can get the absolute path to your Code and Config packages, substituting the names of your packages ("Code" and "Config" are the default names in the Visual Studio project templates):
string codePackagePath = this.Context.CodePackageActivationContext.GetCodePackageObject("Code").Path;
string configPackagePath = this.Context.CodePackageActivationContext.GetConfigurationPackageObject("Config").Path;
Some background info on service packaging here.
tl;dr:
Services are composed of "code" packages (your executables and DLLs) and "config" packages (any arbitrary configuration file or the built-in Settings.xml). Packages can be versioned and upgraded independently of each other. You can see this in Service Fabric Explorer under the "Details" tab of an application type (note the "Name" field - you can use any name you want and that's the name you put in GetCodePackageObject()).

PhpStorm namespace to Laravel's app directory

I seem to be having an issue with PhpStorm and Laravel, where for some strange reason, every time that I manually create a new class file it uses the app for the beginning of the namespace - even though I've set the app name with artisan. When generating files via artisan - namespace is correct - it's just when I create files manually from within the PhpStorm.
I'm sure it's an easy fix - I just don't quite know where in the settings is the option to update it.
Right click on directory -> Mark directory As -> Sources Root

What is the method or class or whatever that show me the configurations files of JRuby?

I'm new to JRuby, I installed it on windows 8, and I'm following it's wiki. When the wiki said to change a configuration option, it dose not say exactally where I can find the file where the option resides, it gives only its name but not the full path.
So is their a method that I can run on jirb to find the path to any configuration path.
thanks.
The .jrubyrc file is searched in your current directory (user.dir Java property), your home directory (user.home), and since you're on Windows, also in HOMEDRIVE\HOMEPATH, in this order (and the first one wins).