Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added skip-phpstorm-config option to the start command #103

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MagicLegend
Copy link

Prevent magento-scripts from constantly overwriting the PHPStorm configurations at every start

Prevent magento-scripts from constantly overwriting the PHPStorm configurations at every start
@ejnshtein
Copy link
Collaborator

This change will not solve the problem as you will need to run start command with it every time.
But don't worry, a new version is coming and it will fix this issue. Currently, it can be tested in the alpha release: npm i @scandipwa/magento-scripts@1.14.1-alpha.2.

@MagicLegend
Copy link
Author

What do you mean by that? I've copied the changes to one of my locals and it does solve the problem for me (being that every time I start / restart the local it overwrites my PHPStorm config).

@ejnshtein
Copy link
Collaborator

"That" will skip file generating entirely, while we want some settings to change (like xdebug and MySQL connection location).
Also, you could've just added the skip property to the whole task, instead of making a subtask, just saying.

@MagicLegend
Copy link
Author

MagicLegend commented May 20, 2022

while we want some settings to change (like xdebug and MySQL connection location).

No, that is what I wanted to skip :) Because I don't want it to touch my xDebug configs every time, I want to use my own settings.

Also, you could've just added the skip property to the whole task, instead of making a subtask, just saying.

No, because I only wanted to impact the PHPStorm configs, not the others. And I figured that defining the skip with the function would be neater than defining it in lib/tasks/file-system/index.js.

@ejnshtein
Copy link
Collaborator

ejnshtein commented May 20, 2022

No, that is what I wanted to skip :) Because I don't want it to touch my xDebug configs every time, I want to use my own settings.

so you want to manually adjust ports every time?

No, because I only wanted to impact the PHPStorm configs, not the others. And I figured that defining the skip with the function would be neater than defining it in lib/tasks/file-system/index.js.

I mean, createPhpStormConfig is a function that returns the task, but task itself has skip property that you couldn've used.

@MagicLegend
Copy link
Author

MagicLegend commented May 23, 2022

so you want to manually adjust ports every time?

Well, no, I adjust it once and then never touch it again. But mostly I don't want it to touch the Ignore external connections through unregistered server configurations setting, since I usually leave that disabled so it'll catch automagically when I listen. I'm just lazy like that.

I mean, createPhpStormConfig is a function that returns the task, but task itself has skip property that you couldn've used.

Right, but it didn't get the ctx property passed on I thought, the framework confused me a little bit on where that property would be accessible and where it wouldn't 😄 And since this worked... 🤷

@ejnshtein
Copy link
Collaborator

Well, no, I adjust it once and then never touch it again. But mostly I don't want it to touch the Ignore external connections through unregistered server configurations setting, since I usually leave that disabled so it'll catch automagically when I listen. I'm just lazy like that.

We likely won't touch other settings, except ports, as they can change.

Right, but it didn't get the ctx property passed on I thought, the framework confused me a little bit on where that property would be accessible and where it wouldn't 😄 And since this worked... 🤷

skip has ctx argument in it, when it is a function.

@MagicLegend
Copy link
Author

We likely won't touch other settings, except ports, as they can change.

In my experience at every start it overwrites all PHPStorm configs, including debug settings and configured servers. But maybe I'm missing some setting to prevent that behaviour?

@ejnshtein
Copy link
Collaborator

Your experience is valid as for everyone else, as now it does work like that.
But when the phpstorm config setup is out it won't do it.

Currently, this setup is undergoing testing by seniors so it will be out soon.

@ejnshtein
Copy link
Collaborator

You can try 1.15.0 version which includes the changes I talked about.
But better to install 1.15.1 version then, as fixes, fixes, fixes...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants