Comments (6)
I don't remember why ecs is currently installed with composer-install
:
Lines 116 to 127 in 93b5b64
We could migrate it to composer-bin-plugin
, where a namespace can be specified, like here:
Lines 103 to 115 in 93b5b64
This is the only "scoping" we have, but it doesn't really help when your project depends on the same packages as the tool.
In your ticket, @TomasVotruba said:
ECS is only designed as composer dependency or prefixed phar. Global won't work.
If there is a prefixed phar or at least a box config available, we should use it.
from toolbox.
I see they build the phar: https://github.com/symplify/symplify/blob/953e3f49e8679f92fdfbf266d4a7a9ebd0601712/.travis.yml#L20-L45
For some reason, it's not published in github releases or anything like that, but commited to the repository instead: https://github.com/symplify/easy-coding-standard-prefixed
Edit: I understand now. It's so the phar could be installed with composer.
from toolbox.
Indeed, we should just use https://github.com/symplify/easy-coding-standard-prefixed. However, this will definitely break some people's CI, as everything is prefixed there, including sniffs/fixers that are installed as dependencies. So references to those in ecs config file will break. But yeah we should still do that and ask to stop prefixing these on their side. I don't have computer with me next couple of days, so can't contribute this now. But if you don't get around to do it and I forget, please remind me in a week or so.
edit: For the reason I mentioned, following is worth checking out first
We could migrate it to composer-bin-plugin, where a namespace can be specified, like here:
from toolbox.
@ostrolucky just sent a PR: #223
Before merging I'd love you to test it if possible. Phars can be downloaded from the build page: https://github.com/jakzal/toolbox/actions/runs/95209465
edit: For the reason I mentioned, following is worth checking out first
We could migrate it to composer-bin-plugin, where a namespace can be specified, like here:
This is really not going to work as all it does it puts the tool into its own global namespace, so it doesn't conflict with other tools. It might conflict with your project though.
PHARs are the best installation format for toolbox. If it's available we should use it really.
Are you sure sniffs/fixers are prefixed? That doesn't sound right.
from toolbox.
This is really not going to work as all it does it puts the tool into its own global namespace, so it doesn't conflict with other tools.
Ah so it's not a composer thing, it doesn't change actual PSR-(0|4) namespaces? Then indeed, that's not going to cut it.
Are you sure sniffs/fixers are prefixed? That doesn't sound right.
I didn't really take a peek inside it's code, but according to errors I got when I tried that package couple days ago in my existing project, that's my explanation. Feedback in comments at https://www.tomasvotruba.com/blog/2020/01/20/introducing-phar-for-easy-coding-standard/#comment-4764517749 also confirm this.
from toolbox.
Alright checked again and I was wrong, it doesn't prefix sniffs. My error was because config simply needs to be changed for newer sniffs.
from toolbox.
Related Issues (20)
- Please update PHP-CS-Fixer to version 3 HOT 1
- Cannot run with composer docker image HOT 1
- Install composer-require-checker from phar when it's released again
- Drop dunglas/phpdoc-to-typehint
- New twig (3.x) linter HOT 3
- Declare allow-plugins for each composer plugin installed with toolbox HOT 1
- Unlock larastan version as soon as stable lar***l release is made (revert #418)
- phpstan/extension-installer missing ? HOT 3
- Updates to Phive-managed tools HOT 4
- impossible to install the phpstan/extension-installer and other plugins HOT 5
- Generate $PATH HOT 1
- Support phive auth file
- Add gherkin-lint-php HOT 2
- Unlock psalm v5 as soon as plugins have caught up
- Update infection tool HOT 3
- PHPUnit 9 support HOT 1
- Add PHPArkitect tool HOT 2
- Add pest Tool HOT 1
- Add lines in replacement of phploc
- Support for twig-cs-fixer HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from toolbox.