You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In src/ModelGenerator.php ECS is called like this: shell_exec(__DIR__ . "/../vendor/bin/ecs check $destination --config " . __DIR__ . "/cs.yml --fix $out").
However, resolving this directory will end up in src/vendor/bin/ecs.
It should be called like this: shell_exec(__DIR__ . "/../../../../vendor/bin/ecs check $destination --config " . __DIR__ . "/cs.yml --fix $out");
The text was updated successfully, but these errors were encountered:
thanks for the report. I can reproduce the issue but even with the changed path the execution currently fails as the ECS config format has changed from yml to php files.
Currently the model generator provides a configuration for the ECS which is something I'm not happy with as it's not possible to set a custom ruleset. At the moment I'm in favour of dropping support for the builtin setPrettyPrint option (and the maintenance of working configuration files without a declared dependency) and instead everyone is free to format the code with a tool and a configuration of their choice after the code generation if formatted code is required.
Personally when using the Lib I've always disabled the pretty printing (which is why i wasn't aware of the issue, so thanks again) as ECS slows down the process massively.
Thank you for the quick feedback @wol-soft ! It's understood.
I've tried to send the input to PHPCBF and it indeed takes a long time to run. So I've decided to skip that entirely since the IDE autocompletion works just fine anyway.
Describe the bug
The model generator provides a pretty-print option which uses EasyCodingStandard (ECS) in the background.
Expected behavior
The generated models are pretty-printed after generation.
Actual behavior
sh: 1: /home/username/project/vendor/wol-soft/php-json-schema-model-generator/src/../vendor/bin/ecs: not found
Schema
Not related to a schema.
Config
Version:
0.20.0
Additional context
src/ModelGenerator.php
ECS is called like this:shell_exec(__DIR__ . "/../vendor/bin/ecs check $destination --config " . __DIR__ . "/cs.yml --fix $out")
.src/vendor/bin/ecs
.shell_exec(__DIR__ . "/../../../../vendor/bin/ecs check $destination --config " . __DIR__ . "/cs.yml --fix $out");
The text was updated successfully, but these errors were encountered: