Comments (6)
You might be able to just install the pear package for cakephp-codesniffer with composer. I have not done it before, so it might not work. It depends on how phpcs finds other standards. I know that when installed via pear the directory structure has to be correct for everything to work.
from cakephp-codesniffer.
I was able to install the CakePHP sniffs by installing CakePHP_CodeSniffer via composer, and then symlink the sniff folder to CodeSniffer/Standards/CakePHP
.
"require": {
"pear-pear.cakephp.org/CakePHP_CodeSniffer": "*"
},
"repositories": [
{
"type": "pear",
"url": "http://pear.cakephp.org"
}
]
The symlinking can be done via post-install-script
and post-update-script
.
from cakephp-codesniffer.
Would you be able to send us the post-install-script you used? I could add it to the repository and also start publishing a composer package.
from cakephp-codesniffer.
It's a bit long, hopefully you get it all.
"post-install-cmd": [
"if [ ! -h vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/CakePHP ]; then ln -s vendor/pear-pear.cakephp.org/CakePHP_CodeSniffer/PHP/CodeSniffer/Standards/CakePHP/ vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/CakePHP ; fi"
]
from cakephp-codesniffer.
Thanks 👍 We might need to do this in PHP code as bash + windows = nope.
from cakephp-codesniffer.
That's a good point. Perhaps using a custom install path would solve the issue? That way composer
can install the package directly under squizlabs/php_codesniffer/CodeSniffer/Standards/CakePHP
. There would still be some challenges left, however, since the sniffs aren't in the root of the repository.
from cakephp-codesniffer.
Related Issues (20)
- Unable to find LineLengthSniff.php when running unit tests
- False positive in CakePHP.Commenting.FunctionComment.InvalidReturn HOT 2
- Do not allow to use underscore prefixes HOT 1
- Error SlevoodingStandard.Arrays.TrailingAmatCrrayComma HOT 10
- Add an empty line between opening tag and declare HOT 2
- Allow for new major Slevomat v7
- PhpStorm HOT 1
- 5.0: Require static return type hint for chaining methods HOT 1
- Collection generics HOT 2
- Union type render fails in some cases
- Union type require spaces ? HOT 3
- Constructor property promotion HOT 3
- Cake 5 CS HOT 1
- Files are not queued by phpcs when using this standard HOT 3
- update links
- can support for slevomat/coding-standard v6 be removed? HOT 5
- Version 4.7 shows this warning HOT 1
- Compare PHP native param types and phpdoc param types
- ECS Support HOT 4
- Cake5: Dynamic property error with PHP 8.2 due to our ruleset 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 cakephp-codesniffer.