Skip to content
This repository has been archived by the owner on Dec 3, 2023. It is now read-only.

EasyCodingStandard - phar file #805

Closed
zener05 opened this issue Apr 30, 2018 · 12 comments
Closed

EasyCodingStandard - phar file #805

zener05 opened this issue Apr 30, 2018 · 12 comments

Comments

@zener05
Copy link

zener05 commented Apr 30, 2018

Hello, I tried to compile EasyCodingStandard as a phar file for using it standalone but it doesn't work.

I opened discussion on StackOverflow. There are also print-screens of my problem. Can you check it please? Thank you.

https://stackoverflow.com/questions/50052815/phar-doesnt-work-after-compiling

@TomasVotruba
Copy link
Member

Hey, what issue do you try to solve?

Building phar is very complicated thing for Symfony-based applications, see very similar architecture at Rector:

@mssimi
Copy link

mssimi commented Apr 30, 2018

@TomasVotruba I think for ECS it might be actually easier, as I think there will be no exceptions with namespace prefixing. Still I think he should think of prefixing only as it is much easier than fixing PHAR incompatibilities.

@TomasVotruba
Copy link
Member

I see no prefixing in original question.

@mssimi
Copy link

mssimi commented Apr 30, 2018

I assume he is creating PHAR coz of dependency conflicts.

@mssimi
Copy link

mssimi commented Apr 30, 2018

I think problem with $skip is caused by incompatibility of glob PHP method.

@zener05
Copy link
Author

zener05 commented Apr 30, 2018

Thank you for replies guys. It seems that the problem is in symfony/dependency-injection. I'm gonna write them to the issues. Maybe they will fix it :-)

@zener05
Copy link
Author

zener05 commented Apr 30, 2018

I found it!

Workaround is quite easy. This commit will fix the problem with PHAR. So you can just download the code via composer, then manually update the file based on that commit and that's all. After building PHAR (I recommend MacFJA/PharBuilder - it's awesome) it will works :-)

@zener05 zener05 closed this as completed Apr 30, 2018
@TomasVotruba
Copy link
Member

@zener05 Wow, that's awesome! 🚀

Thanks for sharing this with use, we got stuck on the very same problem

@TomasVotruba
Copy link
Member

The PR in Symfony for reference: symfony/symfony#26845

@c33s
Copy link
Contributor

c33s commented Jan 2, 2020

@TomasVotruba would it be possible to add a prebuild phar file to the github release page of EasyCodingStandard (like in https://github.com/phpstan/phpstan/releases)?

@TomasVotruba
Copy link
Member

TomasVotruba commented Jan 2, 2020

Hi, why not!

Feel free to send PR. I'd be happy to merge it

@TomasVotruba
Copy link
Member

Good news everyone, the ecs.phar is here:
#1734

@deprecated-packages deprecated-packages locked as resolved and limited conversation to collaborators Nov 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

4 participants