jakzal / toolbox Goto Github PK
View Code? Open in Web Editor NEWHelps to discover and install tools
Home Page: https://jakzal.github.io/toolbox/
License: MIT License
Helps to discover and install tools
Home Page: https://jakzal.github.io/toolbox/
License: MIT License
https://github.com/rectorphp/rector
Instant Upgrades for PHP Applications
https://www.tomasvotruba.cz/blog/2018/02/19/rector-part-1-what-and-how/
Rector is currently locked to a previous version because of a bug.
#309
It looks as though this bug is now sorted. Additionally, I'm getting a weird issue running rector from the latest phpqa
which I'm hoping will be fixed by using the latest rector which is now on version 0.9.x (the bug it was locked against was in 0.8.x).
The error I'm getting is
Fatal error: Uncaught _HumbugBox9a2b3b20a128\Nette\InvalidArgumentException: Service '0190': Class or interface 'PHPStan\Type\Doctrine\DescriptorRegistry' not found. in phar:///tools/.composer/vendor-bin/rector/vendor/rector/rector-prefixed/rector/vendor/nette/di/src/DI/Definitions/Definition.php:52
Stack trace:
#0 phar:///tools/.composer/vendor-bin/rector/vendor/rector/rector-prefixed/rector/vendor/nette/di/src/DI/Definitions/ServiceDefinition.php(46): _HumbugBox9a2b3b20a128\Nette\DI\Definitions\Definition->setType('PHPStan\\Type\\Do...')
#1 phar:///tools/.composer/vendor-bin/rector/vendor/rector/rector-prefixed/rector/vendor/nette/di/src/DI/Extensions/ServicesExtension.php(67): _HumbugBox9a2b3b20a128\Nette\DI\Definitions\ServiceDefinition->setType('PHPStan\\Type\\Do...')
#2 phar:///tools/.composer/vendor-bin/rector/vendor/rector/rector-prefixed/rector/vendor/nette/di/src/DI/Extensions/ServicesExtension.php(51): _HumbugBox9a2b3b20a128\Nette\DI\Extensions\ServicesExtension->updateServiceDefinition(Object(_HumbugBox9a2b3b2 in phar:///tools/.composer/vendor-bin/rector/vendor/rector/rector-prefixed/rector/vendor/nette/di/src/DI/Extensions/ServicesExtension.php on line 54
Thanks
What's with composer-lock-diff, would this be a candidate to add to this project?
@nikic created a fuzzing tool for PHP code: https://github.com/nikic/PHP-Fuzzer
The project is still very young, but maybe it could be added at some time.
Attention: This package is abandoned and no longer maintained. The author suggests using the ergebnis/composer-normalize package instead.
Moved from jakzal/phpqa#92
Since the added value with this image is the selection and discovery of actually valuable PHP related QA and similar tools (which you might not know about), it might make sense to make that more prominent.
$ phpqa churn run
Fatal error: Uncaught TypeError: Argument 1 passed to Symfony\Component\Yaml\Yaml::parse() must be of the type string, boolean given, called in /tools/.composer/vendor-bin/tools/vendor/bmitch/churn-php/src/Commands/ChurnCommand.php on line 81 and defined in /tools/.composer/vendor-bin/tools/vendor/symfony/yaml/Yaml.php:76
phpca
vs. ComposerRequireCheckerWhat I propose is this:
composer
, util
, analysis
, style
, test
, phpstan
, etc).phpqa list style
phpqa info phpstan-doctrine
would explain how to enable it, with even a short exampleIt would probably be best if we separated tools out ftom the JSON into something else to make it more maintainable in te future.
Overall, I think this project might gain some traction as other projects start using it for their CI more so it would benefit from these kind of small tweaks which raise the value quite a bit.
WDYT?
Currently only PHAR downloads are supported, which means regular file downloads won't be automatically updated (like #331).
There are 16 tools with exclude-php:8.0
tag.
Each repo has been checked, to create this plan
Name | Excluded from PHP 8.0 | Comments | Worth a Try? |
---|---|---|---|
analyze | ❌ | Last PR 4 Dec 2019. Forked project also has no recent activity | ❌ |
box | ❌ | Add PHP 8 support (#508) | ✅ |
diffFilter | ❌ | Last PR Oct 2020, composer.json shows "php": ">=7.0", |
❌ |
doctrine-psalm-plugin | ❌ | composer.json showing "php": ".. ^8", |
✅ |
parallel-lint | ❌ | README updated 15 Mar 2020 to advise This repository is abandoned. Suggested alternative: https://github.com/php-parallel-lint/PHP-Parallel-Lint > readme states This works from PHP 5.4 to 7.4 | ❌ |
paratest | ❌ | Last PR 5 days ago, composer.json "php": " .. ^8.0", |
✅ |
php-coupling-detector | ❌ | Last PR 4 Jan 2021 to add PHP 8 #62, composer.json "php": ">=7.2", |
✅ |
php-formatter | ❌ | Last PR 31 Dec 2017. | ❌ |
phpat | ❌ | Last PR 28 Dec 2020. composer.json "php": "^7.2", |
❌ |
phpDocumentor | ❌ | Last PR 22 Feb 2021 (Yesterday). composer.json "php": "... ^8.0", |
✅ |
phpinsights | ❌ | Last PR 9 days ago (14 Feb 2021) composer.json "php": ".. ^8.0", |
✅ |
phpmnd | ❌ | Last PR 27 days ago (25 Jan 2021) composer.json "php": "^7.1", | ❌ |
phpunit-5 | ❌ | Last PR for 5.7.27 was 1 Feb 2018 | ❌ |
phpunit-7 | ❌ | composer.json for 7.5.20 locked at "php": "^7.1", , a fork used by Silverstripe may work: sminnee/phpunit |
❓ |
rector | ❌ | Last PR today 23 Feb 2021. php: .. ^8.0 |
✅ |
roave-backward-compatibility-check | ❌ | Last PR 5 days ago (18 Feb 2021), composer.json "php": "^7.4.7", |
❌ |
Summary
The next step is to remove the tag and see if the build passes.
Edit: php-formatter
should be ❌
re PHP-CS-Fixer/PHP-CS-Fixer#3697
PHP_CS_FIXER_IGNORE_ENV=1
from the Makefileexclude-php:7.3
tag from php-cs-fixer, php-coupling-detector, easycodingstandard, php-formatterhttps://github.com/jakzal/toolbox/runs/2339677014?check_suite_focus=true#step:5:350
Phive 0.14.5 - Copyright (C) 2015-2021 by Arne Blankerts, Sebastian Heuer and Contributors
Downloading https://github.com/phpbench/phpbench/releases/download/1.0.0-beta1/phpbench.phar
Downloading https://github.com/phpbench/phpbench/releases/download/1.0.0-beta1/phpbench.phar.asc
Downloading key 15E1F8E2B149E6F5
Trying to connect to keys.openpgp.org (37.218.245.50)
Downloading https://keys.openpgp.org/pks/lookup?op=get&options=mr&search=0x15E1F8E2B149E6F5
Successfully downloaded key.
Warning: Parsing key data failed with error code 0: No UIDs in key found
Trying to connect to keyserver.ubuntu.com (162.213.33.9)
Trying to connect to keyserver.ubuntu.com (162.213.33.8)
Warning: Failed with error code 404: Key not found on keyserver
Trying to connect to hkps.pool.sks-keyservers.net (209.244.105.201)
Warning: Failed with error code 404: Key not found on keyserver
Error: PublicKey 15E1F8E2B149E6F5 not found on key servers
Is it possible to add this linter?
https://github.com/sserbin/twig-linter
When trying toolbox install
I get the following error:
The command '/bin/sh -c php $TOOLBOX_TARGET_DIR/toolbox install' returned a non-zero code: 6
The problem seems to be related to unavailability of http://psvc.coreteks.org where php-semver-checker.phar is fetched. Trying to get it manually I get the following error:
wget http://psvc.coreteks.org/php-semver-checker.phar -O /dev/null
--2019-05-05 21:46:43-- http://psvc.coreteks.org/php-semver-checker.phar
Resolving psvc.coreteks.org (psvc.coreteks.org)... failed: Name or service not known.
wget: unable to resolve host address ‘psvc.coreteks.org’
It appears that the problem that happened to pdepend also hit php-semver-checker (but this doesn't even dns resolve).
I will mad a pull request soon, but i think we can do this now, in order to get phpcdp on php 7.2 images :
{
"name": "phpcpd",
"summary": "Copy/Paste Detector",
"website": "https://github.com/sebastianbergmann/phpcpd",
"command": {
"phar-download": {
"phar": "https://phar.phpunit.de/phpcpd-4.1.0.phar",
"bin": "%target-dir%/phpcpd"
}
},
"test": "phpcpd -V",
"tags": ["featured", "exclude-php:7.3, "exclude-php:7.4"]
},
For note purpose, this version of phpmetrics doesn't work.
See this :
When pushing into a Docker image, you want the final installed size to be minimal.
We could, for example, add a flag --strip
which would, after finishing installation, remove:
.git
folderstest/
, tests/
etcdoc/
We could even inspect .gitattributes
file and remove files suppressed for addition if we're pulling a git repo.
Phar is no longer published https://github.com/mamuz/PhpDependencyAnalysis
The package has been abandoned.
I have existing symfony project wanted to give it a try with latest composer
image:
docker run -it --rm --name my-running-script -v "$PWD":/usr/src/myapp -w /usr/src/myapp composer:latest bash
bash-5.1# php -v
PHP 8.0.6 (cli) (built: May 7 2021 20:48:50) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.6, Copyright (c) Zend Technologies
bash-5.1# curl -s https://api.github.com/repos/jakzal/toolbox/releases/latest
| grep "browser_download_url.*toolbox.phar"
| cut -d '"' -f 4
| xargs curl -Ls -o toolbox
&& chmod +x toolbox
bash-5.1# ./toolbox install
You are already using the latest available Composer version 2.1.1 (stable channel).
/usr/local/bin/phive
Changed current directory to /tmp
You are using the deprecated option "--no-suggest". It has no effect and will break in Composer 3.
Using version ^1.4 for bamarni/composer-bin-plugin
./composer.json has been updated
Running composer update bamarni/composer-bin-plugin
Loading composer repositories with package information
Updating dependencies
Nothing to modify in lock file
Writing lock file
Installing dependencies from lock file
Nothing to install, update or remove
Generating autoload files
Changed current directory to /tmp
Phive 0.14.5 - Copyright (C) 2015-2021 by Arne Blankerts, Sebastian Heuer and Contributors
[ERROR] No executable gpg binary found.
[ERROR] Either install gpg or enable the gnupg extension in PHP.
The repository has been archived and is no longer maintained:
Archived! This repository is now archived. Consider using PHP CS Fixer (and especially the phpdoc_to_param_type and phpdoc_to_return_type rules) or Rector instead.
In order to make maintenance easier, tools.json
should be split into smaller files according to tools the type. Some tools that we provide plugins for (like phpstan) could possibly get its own file.
Hi,
I was trying to build an image based on yours using docker multi-stage builds. I wanted to move the tools from /tools
to somewhere else but their symlinks are full paths and moving them would break the links.
Did you use a full path approach because various tools aren't giving you enough control over the exact symlink?
See jakzal/phpqa#91.
Re #76.
As soon as the website comes back: mihaeu/dephpend#40
As per the discussion here #338 - having the Larastan PHPStan extension as part of the phpqa package causes PHPStan to report errors that are not part of the codebase being analysed.
Is it possible for me to build a customised phpqa which does not have the larastan extension? I see the instructions on how to make a custom docker build but I guess in this case I need to modify what's coming from the toolbox repo? Or would it just be a case of using the composer-bin-plugin to remove the larastan extension?
Benefits:
Drawbacks:
Docker image: jakzal/phpqa:latest
Cmd line:
docker pull jakzal/phpqa:latest
docker run -v C:\xampp\htdocs\:/project -w /project --rm jakzal/phpqa:latest php-cs-fixer --diff --dry-run -v fix .
Output: /entrypoint.sh: 6: exec: php-cs-fixer: not found
9 november 2020 all work fine
what about adding simple-phpunit
?
Link: https://github.com/nunomaduro/phpinsights
It was released a few hours ago, I just discovered it and it seems really promising, so to ensure easier testing and integration, I think it could be integrated to this phpqa tool 😄
Heya, great work on this one. ❤️
Have you heard of https://github.com/paratestphp/paratest ? Might be a good tool to add to your list.
👍
As part of #157 some packages had to be disabled:
ecs was locked to 7.3.17 to prevent installing broken releases, see #238
I wanted to contribute scoping of one of the tools that toolbox ships because there are scoping issues when running it in one of our projects. To do this, I expected some tools would already be scoped so I can get inspiration what modifications in tools.json file I need to make. But looking into this json file, I don't see any such configuration in existing tools. Does this mean toolbox currently does not do scoping of any of the current tools whatsoever?
Can you update Box to https://github.com/humbug/box. Installer is available at https://github.com/KEINOS/Phar_Box3_installer
Using toolbox 1.39.0 and phpqa 1.49.0 on my Symfony 4.4.19 project.
At the end of every PHPStan analysis I get several errors like this.
Child process error (exit code 255): Warning: Declaration of
Symfony\Component\Translation\DependencyInjection\TranslatorPathsPass::processValue($value, bool $isRoot =
false) should be compatible with
Symfony\Component\DependencyInjection\Compiler\AbstractRecursivePass::processValue($value, $isRoot = false) in
/tools/.composer/vendor-bin/phpstan/vendor/symfony/translation/DependencyInjection/TranslatorPathsPass.php on
line 82
Fatal error: Declaration of Symfony\Bridge\Monolog\Processor\DebugProcessor::getLogs() must be compatible with
Symfony\Component\HttpKernel\Log\DebugLoggerInterface::getLogs(?Symfony\Component\HttpFoundation\Request
$request = NULL) in /project/vendor/symfony/monolog-bridge/Processor/DebugProcessor.php on line 64
It is complaining about a method signature mismatch between (I think!) my Symfony installation which is being analysed, and /tools/.composer/vendor-bin/phpstan/vendor/symfony/translation/DependencyInjection/TranslatorPathsPass.php
which appears to be a Symfony component as part of the PHPStan installation.
I can't find any existing issues here, on phpqa or phpstan repos. Can you shed any light on this?
If it's a PHPStan issue just let me know and I'll submit an issue over there. PHPStan has switched to a PHAR format and I think this means that in its standalone form this kind of issue shouldn't happen - hence me posting here first.
Thanks for any help.
Package halleck45/phpmetrics is abandoned, you should avoid using it.
Use phpmetrics/phpmetrics instead.
Package edsonmedina/php_testability is abandoned, you should avoid using it.
No replacement was suggested.
Spotted in the build 👼
Phar releases are currently broken, so we had to fall back to composer-bin-plugin.
Revert 48bc72a once phar releases are brought back.
In case phar support was removed (see maglnet/ComposerRequireChecker#256), close this issue.
Once this is done, a GitHub page could be set up and automatically published from Travis.
Hi,
I'm trying to build a custom phpqa docker image on a server behind a proxy but the command php toolbox install
(I think but maybe I'm mistaken) fail with the following error :
Error: file_get_contents(https://box-project.github.io/box2/manifest.json): failed to open stream: Connection timed out
I bypassed the error by adding a php script with a stream context, and loaded the script with auto_prepend_file (php.ini) in the Dockerfile, but I don't think this is a long-term solution.
Regards,
Yannick
return \sprintf( 'ln -sf ${COMPOSER_HOME:-"~/.composer"}/vendor-bin/%s/vendor/bin/%s %s', $this->namespace, $this->source, $this->target );
This code results at unusable symlinks.
Please replace "~" with the content of HOME variable.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.