hoaproject / devtools Goto Github PK
View Code? Open in Web Editor NEWThe Hoa\Devtools library.
Home Page: https://hoa-project.net/
The Hoa\Devtools library.
Home Page: https://hoa-project.net/
when I install php-cs-fixer globaly, I go errors
php-cs-fixer --version
PHP CS Fixer 2.3.1 by Fabien Potencier and Dariusz Ruminski (d5257f7)
$ vendor/bin/hoa devtools:cs --dry-run --diff .
PHP Fatal error: Cannot override final method PhpCsFixer\AbstractFixer::fix() in /home/jvb/workspace/_perso/hoa/File/vendor/hoa/devtools/Resource/PHPCSFixer/Fixer/Author.php on line 92
PHP Stack trace:
PHP 1. {main}() /home/jvb/bin/bin/php-cs-fixer:0
PHP 2. Symfony\Component\Console\Application->run() /home/jvb/bin/bin/php-cs-fixer:47
PHP 3. Symfony\Component\Console\Application->doRun() phar:///home/jvb/bin/bin/php-cs-fixer/vendor/symfony/console/Application.php:121
PHP 4. Symfony\Component\Console\Application->doRunCommand() phar:///home/jvb/bin/bin/php-cs-fixer/vendor/symfony/console/Application.php:190
PHP 5. Symfony\Component\Console\Command\Command->run() phar:///home/jvb/bin/bin/php-cs-fixer/vendor/symfony/console/Application.php:826
PHP 6. PhpCsFixer\Console\Command\FixCommand->execute() phar:///home/jvb/bin/bin/php-cs-fixer/vendor/symfony/console/Command/Command.php:262
PHP 7. PhpCsFixer\Console\ConfigurationResolver->getReporter() phar:///home/jvb/bin/bin/php-cs-fixer/src/Console/Command/FixCommand.php:144
PHP 8. PhpCsFixer\Console\ConfigurationResolver->getFormat() phar:///home/jvb/bin/bin/php-cs-fixer/src/Console/ConfigurationResolver.php:405
PHP 9. PhpCsFixer\Console\ConfigurationResolver->getConfig() phar:///home/jvb/bin/bin/php-cs-fixer/src/Console/ConfigurationResolver.php:560
PHP 10. include() phar:///home/jvb/bin/bin/php-cs-fixer/src/Console/ConfigurationResolver.php:215
Steps to reproduce:
hoa devtools:documentation
./cc @osaris
Related to hoaproject/Central#19.
Currently, the default value for --directories
is nothing. So if one would like to generate the documentation for the current library, we need to specify --directories .
which is annoying and it does not help when writing documentation.
The default behavior must be smarter by having the current directory by default, so that we no longer need to write --directories .
. Any new value could be added or overwrite the default value. I don't have any opinion about it, expect it would be better to overwrite the default value to prevent future BC breaks.
When you run the command without arguments, you get an error
$ vendor/bin/hoa
Hoa\Dispatcher\ClassMethod::resolve(): (0) Class Hoa\Cli\Bin\Welcome is not found (method: GET, asynchronous: false).
in /home/jvb/workspace/_perso/hoa/Compiler/vendor/hoa/dispatcher/ClassMethod.php at line 101.โฌ
Nested exception (ReflectionException):
Class Hoa\Cli\Bin\Welcome does not exist
I'm running PHP 7.0.18-0ubuntu0.17.04.1
Address hoaproject/Central#19.
This would be awesome for the new contributor or user. Also, it eases the README.md
.
Hello ๐,
I was thinking about simplifying the contribution process and thought: What about merging the the Hoathis\Documentation
tool into this library. For me it makes sense:
hoa/test
which install hoa/devtools
and here you go, or you install hoa/devtools
and here you go).Thoughts @hoaproject/hoackers?
Hello ๐,
What about creating a .gitignore
file when installed through Composer?
Before composer install
:
Foo/
.git/
composer.json
Awesomeness.php
After composer install
:
Foo/
.git/
.gitignore
composer.json
Awesomeness.php
vendor/
hoa/
devtools/
test/
Allows people to not commit useless stuff. However, .gitignore
is still prompted in git status
:-/. Is it just a stupid idea? Should we commit all the .gitignore
file?
/cc @hoaproject/hoackers and @shulard
When we try to generate documentation on library without documentation (example https://github.com/hoaproject/Stream), we raise an error like
vendor/bin/hoa devtools:documentation --open
Selected language: En.
Hoa\Devtools\Bin\Documentation::main(): (1) Directory /tmp/Stream does not contain documentation.
in /tmp/Stream/vendor/hoa/devtools/Bin/Documentation.php at line 166.
We need to handle the error to display a better message like
There is no documentation yet, sorry.
Hello,
I wanted to run the devtools:cs
CS command when working on the #49 PR and got the following error :
$ vendor/bin/hoa devtools:cs Bin/Snapshot.php
Loaded config default from "/Users/shulard/Sites/Forks/Hoa/Devtools/Resource/PHPCSFixer/ConfigurationFile.php".
Fixed all files in 0.127 seconds, 10.000 MB memory used
Files that were not fixed due to errors reported during fixing:
1) /Users/shulard/Sites/Forks/Hoa/Devtools/Bin/Snapshot.php
I searched around the errors reported during fixing and got the following details when running php-cs-fixer directly :
$ php-cs-fixer fix --config Resource/PHPCSFixer/ConfigurationFile.php --allow-risky yes Bin/Snapshot.php -vvv
Loaded config default from "Resource/PHPCSFixer/ConfigurationFile.php".
E
Legend: ?-unknown, I-invalid file syntax, file ignored, S-Skipped, .-no changes, F-fixed, E-error
Fixed all files in 0.123 seconds, 10.000 MB memory used
Files that were not fixed due to errors reported during fixing:
1) /Users/shulard/Sites/Forks/Hoa/Devtools/Bin/Snapshot.php
[ArgumentCountError]
Too few arguments to function PhpCsFixer\AbstractLinesBeforeNamespaceFixer::fixLinesBeforeNamespace(), 3 passed in /Users/shulard/Sites/Forks/Hoa/Devtools/Resource/PHPCSFixer/Fixer/NoBlankLinesBeforeEntity.php on line 67 and exactly 4 expected
PhpCsFixer\AbstractLinesBeforeNamespaceFixer->fixLinesBeforeNamespace()
in /Users/shulard/Sites/Forks/Hoa/Devtools/Resource/PHPCSFixer/Fixer/NoBlankLinesBeforeEntity.php at line 67
Hoa\Devtools\Resource\PHPCSFixer\Fixer\NoBlankLinesBeforeEntity->applyfix()
in /usr/local/Cellar/php-cs-fixer/2.10.0/src/AbstractFixer.php at line 73
PhpCsFixer\AbstractFixer->fix()
in /usr/local/Cellar/php-cs-fixer/2.10.0/src/Runner/Runner.php at line 190
PhpCsFixer\Runner\Runner->fixFile()
in /usr/local/Cellar/php-cs-fixer/2.10.0/src/Runner/Runner.php at line 132
PhpCsFixer\Runner\Runner->fix()
in /usr/local/Cellar/php-cs-fixer/2.10.0/src/Console/Command/FixCommand.php at line 219
PhpCsFixer\Console\Command\FixCommand->execute()
in /usr/local/Cellar/php-cs-fixer/2.10.0/vendor/symfony/console/Command/Command.php at line 252
[ ... ]
The PhpCsFixer\AbstractLinesBeforeNamespaceFixer::fixLinesBeforeNamespace
signature as changed in PHP-CS-Fixer v2.8.1 :
Since Hoa rely on the host installed php-cs-fixer binary, we have an edge case to check here...
Since PHP-CS-Fixer use the Symfony/Console
component, we can check the PhpCsFixer\Console\Application::VERSION
constant to check how much parameters we need to use...
php-cs-fixer version 1.xx.xx works with this current configuration file Devtools/Resource/PHPCSFixer/ConfigurationFile.php
but for the version 2 everything have changed.
Now we need to use --config
instead of --config-file
to specify the configuration file
All classes have been moved into another namespace and the api is completely changed. @see https://github.com/FriendsOfPHP/PHP-CS-Fixer/blob/19f3e46b09e0de24efa0aea6c2beb42410e37cc8/.php_cs.dist
As you can see also the definition of all rules to check have been change from string to an array.
I propose to add a cs-fixer which remove the PHPDoc @return
tag of constructors.
Since they are optional and current @return void
is invalid, it can be a good thing :)
Maybe we should name this command differently, like hoa devtools:configure
, I don't know, or maybe hoa devtools:caniuse
or devtools:iscompatible
.
hoa test:run
should also run this command before running tests.
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.