Please sign in to comment.
Work in progress - resolve directories from config file location (#1904)
* Add resolveFromConfigFile config option Treats all paths as relative to the location of the config file, not the current working directory of the process. This commit just changes psalm, further commits will be needed to apply the change to psalter and the LSP server. * Copy asset xml files into project root for testing, delete during teardown Needed since paths are now resolved relative to the position of the file. Not sure why I only saw a test failre for 1.xml - would have expected it for all eight files. * Fix following rebase * Move psalm --init handly code above working directory setting code If there's no psalm.xml yet we can't use the location of psalm.xml to set our working directory * Move Psalm version output code above working directory resolution Working directory doesn't need to be known to output version constant * Rely on new config file based working directory in end to end test * Dont use rely on config dir for --alter - not currently working * Fix code style error * Add failing test for supporting config without `resolveFromConfigFile="true"` * Don't treat config directory as a path to check * Document resolveFromConfigFile setting
- Loading branch information...
Showing with 221 additions and 100 deletions.
- +1 −0 assets/config_levels/1.xml
- +1 −0 assets/config_levels/2.xml
- +1 −0 assets/config_levels/3.xml
- +1 −0 assets/config_levels/4.xml
- +1 −0 assets/config_levels/5.xml
- +1 −0 assets/config_levels/6.xml
- +1 −0 assets/config_levels/7.xml
- +1 −0 assets/config_levels/8.xml
- +1 −0 config.xsd
- +12 −0 docs/running_psalm/configuration.md
- +1 −0 psalm.xml.dist
- +38 −11 src/Psalm/Config.php
- +5 −0 src/command_functions.php
- +94 −79 src/psalm.php
- +18 −2 tests/Config/ConfigTest.php
- +1 −0 tests/Config/CreatorTest.php
- +43 −8 tests/EndToEnd/PsalmEndToEndTest.php
Oops, something went wrong.