-
Notifications
You must be signed in to change notification settings - Fork 27
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
App doesn't work outside Docker if plugin is installed inside it and vice versa #5
Comments
I think that things like Docker and global installation are exactly the argument why you want to use absolute paths. It's hard to determine what actually project root is. |
We could maybe use |
That would be also really non-deterministic and WTF in some cases. I think
that users of non-conventioná installation ways like Docker need to be more
careful about what they’re doing, and always run the tools in the same
context. This issue is the equivalent of “I moved this file to another
computer and it doesn’t work there”, although we’re talking about virtual
ones...
On Fri, 24 May 2019 at 09:57, Lukáš Unger ***@***.***> wrote:
We could maybe use currentWorkingDirectory and call it a day..
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#5?email_source=notifications&email_token=AAAZTOHSW6J3LLUYL7IRRETPW6NYDA5CNFSM4HO64BKKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWEOSPA#issuecomment-495511868>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAAZTOGPHAX3IETVEKHJRZLPW6NYDANCNFSM4HO64BKA>
.
--
Ondřej Mirtes
|
You can always run composer install which fixes this issue.
On Fri, 24 May 2019 at 10:00, Ondřej Mirtes ***@***.***> wrote:
That would be also really non-deterministic and WTF in some cases. I think
that users of non-conventioná installation ways like Docker need to be more
careful about what they’re doing, and always run the tools in the same
context. This issue is the equivalent of “I moved this file to another
computer and it doesn’t work there”, although we’re talking about virtual
ones...
On Fri, 24 May 2019 at 09:57, Lukáš Unger ***@***.***>
wrote:
> We could maybe use currentWorkingDirectory and call it a day..
>
> —
> You are receiving this because you commented.
>
>
> Reply to this email directly, view it on GitHub
> <#5?email_source=notifications&email_token=AAAZTOHSW6J3LLUYL7IRRETPW6NYDA5CNFSM4HO64BKKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWEOSPA#issuecomment-495511868>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AAAZTOGPHAX3IETVEKHJRZLPW6NYDANCNFSM4HO64BKA>
> .
>
--
Ondřej Mirtes
--
Ondřej Mirtes
|
Yea, I agree with you, that was just a suggestion what could be done if we decided to do something.. |
Also, this whole thing is optional and pretty experimental still. If it starts to cause problems, just don't use it. No functionality is lost, just convenience. |
Yes, exactly why I want to keep it simple 😊
On Fri, 24 May 2019 at 10:24, Lukáš Unger ***@***.***> wrote:
Also, this whole thing is optional and pretty experimental still. If it
starts to cause problems, just don't use it. No functionality is lost, just
convenience.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#5?email_source=notifications&email_token=AAAZTOAHPESBWO7O3NY4SXTPW6Q3BA5CNFSM4HO64BKKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWEQQ5Q#issuecomment-495519862>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAAZTOF25LQRYS3D7UIN6NDPW6Q3BANCNFSM4HO64BKA>
.
--
Ondřej Mirtes
|
Another example where this fails is a deploy process. You build an app on the build machine and then deploy code to a completely different machine, where the path to the application is probably different than on the build machine. And now your application is broken. I strongly disagree that tools should persist absolute paths during build time (if the paths are relative to the project). |
You shouldn’t deploy dev dependencies into production.
On Fri, 24 May 2019 at 12:43, Jakub Chábek ***@***.***> wrote:
Another example where this fails is a deploy process.
You build an app on the build machine and then deploy code to a completely
different machine, where the path to the application is probably different
than on the build machine. And now your application is broken.
I strongly disagree that tools should persist absolute paths during build
time (if the paths are relative to the project).
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#5?email_source=notifications&email_token=AAAZTOEKDN6HRMDF5OJWKGDPW7BGBA5CNFSM4HO64BKKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWE4RSA#issuecomment-495569096>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAAZTOCHC6HLXILYC6IWXQDPW7BGBANCNFSM4HO64BKA>
.
--
Ondřej Mirtes
|
Yeah, I didn't think this one through ... we don't do that 😂 Anyway, do as you think is best...I just won't be able to use this feature if you use absolute paths :( |
This is just a weird use case. Your build environment should match the runtime environment. You'd have the same problems for example with compiling a DI container that bakes in absolute paths - I think Nette does it. You should both install and run PHPStan in Docker or outside Docker. |
I have the same problem. I use captain-hook to execute phpstan and It is fired on git precommit hook from my host, that does not have access to the path it was concatenated during the vendor installation inside docker. |
This is solved as of extension-installer 1.1.0 and phpstan/phpstan 0.12.62. #17 (comment) |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
During plugin installation, there are some absolute paths being stored inside configuration/autoloader. This causes errors if you install a plugin inside Docker but then later want to use your app outside Docker.
Or if you rename the project folder, or your home folder, whatever. I think you shouldn't be using absolute paths at all - they all should be relative to the project root.
The text was updated successfully, but these errors were encountered: