Skip to content

Install StructArmed #22

Description

@gsteel

Add a make target to install StructArmed by @samsonasik

It should:

  • Add StructArmed to composer deps
  • Copy over a templated configuration file
  • export-ignore configuration
  • Add make targets for running it.

Questions for @samsonasik

Can we install it to /tools/structarmed instead of in require-dev of the project?

Activity

  1. samsonasik commented on Oct 7, 2026

    @samsonasik
    Member

    that should work, but will may need to pass update config for "Source" layer, as everything is layer:

    ->layer("Source", [
        __DIR__ . '/../../src',
        __DIR__ . '/../../test',
        __DIR__ . '/../../composer.json'
    ])

    or probably manual via paths:

    vendor/bin/structarmed analyze ../src ../test ../composer.json

    @gsteel Do you have example project directory? I may need to have example structure project directory to test locally tho ...

  2. gsteel commented on Oct 7, 2026

    @gsteel
    MemberAuthor

    Sure - Laminas i18n has a load of tools installed separately:

    https://github.com/laminas/laminas-i18n/tree/3.1.x/tools

    I've used /tools/ as standard location on quite a lot of projects to reduce dependency conflicts. Renovate keeps things up-to-date nicely too.

  3. samsonasik commented on Oct 7, 2026

    @samsonasik
    Member

    @gsteel it seems can't fully working with directory jump parent, as composer.json is not in the root:

    ➜  vendor/bin/structarmed analyze ../../src ../../test ../../composer.json
    Error: path [../../composer.json] is not analysable. Expected a directory, a .php file, or the project composer.json.

    also, the layer definiton can define by relative directory:

    ->layer('Config', 'src/ConfigProvider.php')

    The solution I can think of is add ability to setup base path via command line, eg:

    vendor/bin/structarmed analyze --basepath=../../

    so base path will be new root.

    I can work on feature for 0.19.0 :)

  4. samsonasik commented on Oct 7, 2026

    @samsonasik
    Member

    @gsteel I am working on the new StructArmed feature to allow define --basepath=../../ :

  5. samsonasik commented on Oct 8, 2026

    @samsonasik
    Member

    I've released StructArmed 0.19.0 with add ability to setup basepath via --basepath / -d in CLI https://github.com/boundwize/structarmed/releases/tag/0.19.0

  6. added this to the 1.0.0 milestone on Oct 8, 2026
  7. self-assigned this
    on Oct 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions