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

.. replaced by ./tools in tools bin #302

Closed
wants to merge 2 commits into from
Closed

Conversation

basilelt
Copy link
Contributor

The current workir is /var/www and not /var/www/tools/bin so the .. points to /var and not /var/www/tools

@basilelt
Copy link
Contributor Author

When trying to execute castor qa:phpstan or other qa commands it can't find the path indicated by either tools in '.tools/bin/'

For php stan :
With the old '../phpstan/vendor/bin/phpstan' it can't find its associated binary
image

I tried fixing it by checking on what was the current workdir for the command :
image
It seemed to be '/var/www', so I went and changed '..' to './tools'
On build it's using a different work dir so the checks failed.

As such I put the entire path on both the files in ./tools/bin/ which seemed to have resolved any issues on usage and build

@lyrixx
Copy link
Member

lyrixx commented Apr 22, 2024

Hello. This patch won't work if you mount the project in another directory. It happens when working on project with many application.

Relative symlink is better.

More over, it works perfectly on main branch. We run phpstan in the CI

image


I think you forgot to install phpstan before using it.

castor qa:install

But if you run the following command as stated in the project README

castor install

I'll also install qa tools


Finally, we could check if vendor are installed before executing phpstan, but I don't think your edge case worth this overhead

@lyrixx
Copy link
Member

lyrixx commented Apr 22, 2024

See #303 instead

@pyrech
Copy link
Member

pyrech commented Apr 22, 2024

Thanks @basilelt for reporting the issue and trying to fix it. As explained, the issue was certaintly not due to the simlink but to the fact the QA tools (PHP-CS-Fixer or phpstan) were not installed. The error message have been modified in #303 to make it more explicit.

I'll close this PR but feel free to comment or reopen if there is still an issue. Thanks 🙂

@pyrech pyrech closed this Apr 22, 2024
@basilelt
Copy link
Contributor Author

Thanks a lot for the precision !
I checked and I did install the qa tools with qa:install as well as castor install but I think the issue of paths are due to the fact that I'm running the phar for castor via 'php castor' and it messes with them.
I'm kind of obligated to do it like that as even with castor on the env path the command 'castor' returns nothing

I'll run it via wsl instead of continuing through native windows..

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

Successfully merging this pull request may close these issues.

3 participants