Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v9.4.0] PHAR manifest is broken #210

Closed
llaville opened this issue Jul 5, 2024 · 1 comment
Closed

[v9.4.0] PHAR manifest is broken #210

llaville opened this issue Jul 5, 2024 · 1 comment
Assignees
Labels

Comments

@llaville
Copy link
Collaborator

llaville commented Jul 5, 2024

Diagnose

When I removed the --manifest option from Application, I did not realized that the release.yml GitHub Workflow was not ready to build manifest on BOX compilation.

As I did it on all my projects, I'll fix it on this project too !

Goal

Keep a manifest (dependencies used and embedded into a PHAR distribution) up-to-date each time we compile the PHAR version with BOX project

As this feature is not part of this project, I've created my spin-off project https://github.com/llaville/box-manifest that is compatible with BOX v4.

Summary

When I ask for manifest content of PHAR distribution by following command :

php phplint.phar --manifest

I got no valid contents, except an error.

Expected behaviour

Should print the manifest contents (dependencies list embedded with constraints and versions used)

Here is a preview of what we can get

  • with default console format

manifest-console

  • with SBOM JSON format
SBOM JSON format manifest
bin/phplint.phar --manifest sbom.json
{
    "$schema": "http://cyclonedx.org/schema/bom-1.5.schema.json",
    "bomFormat": "CycloneDX",
    "specVersion": "1.5",
    "serialNumber": "urn:uuid:2a276cd9-61b5-4c5a-b6d1-d5b052083613",
    "version": 1,
    "metadata": {
        "timestamp": "2024-07-05T13:40:07Z",
        "tools": [
            {
                "vendor": "box-project",
                "name": "box",
                "version": "4.3.8@5534406"
            },
            {
                "vendor": "bartlett",
                "name": "box-manifest",
                "version": "3.5.1"
            }
        ],
        "properties": [
            {
                "name": "specVersion",
                "value": "1.5"
            },
            {
                "name": "bomFormat",
                "value": "CycloneDX"
            }
        ]
    },
    "components": [
        {
            "bom-ref": "pkg:composer/bamarni/composer-bin-plugin@1.8.2",
            "type": "application",
            "name": "composer-bin-plugin",
            "version": "1.8.2",
            "group": "bamarni",
            "purl": "pkg:composer/bamarni/composer-bin-plugin@1.8.2"
        },
        {
            "bom-ref": "pkg:composer/brainmaestro/composer-git-hooks@v3.0.0",
            "type": "library",
            "name": "composer-git-hooks",
            "version": "v3.0.0",
            "group": "brainmaestro",
            "purl": "pkg:composer/brainmaestro/composer-git-hooks@v3.0.0"
        },
        {
            "bom-ref": "pkg:composer/jetbrains/phpstorm-stubs@v2024.1",
            "type": "library",
            "name": "phpstorm-stubs",
            "version": "v2024.1",
            "group": "jetbrains",
            "purl": "pkg:composer/jetbrains/phpstorm-stubs@v2024.1"
        },
        {
            "bom-ref": "pkg:composer/php-parallel-lint/php-console-color@v1.0.1",
            "type": "library",
            "name": "php-console-color",
            "version": "v1.0.1",
            "group": "php-parallel-lint",
            "purl": "pkg:composer/php-parallel-lint/php-console-color@v1.0.1"
        },
        {
            "bom-ref": "pkg:composer/php-parallel-lint/php-console-highlighter@v1.0.0",
            "type": "library",
            "name": "php-console-highlighter",
            "version": "v1.0.0",
            "group": "php-parallel-lint",
            "purl": "pkg:composer/php-parallel-lint/php-console-highlighter@v1.0.0"
        },
        {
            "bom-ref": "pkg:composer/psr/cache@3.0.0",
            "type": "library",
            "name": "cache",
            "version": "3.0.0",
            "group": "psr",
            "purl": "pkg:composer/psr/cache@3.0.0"
        },
        {
            "bom-ref": "pkg:composer/psr/container@2.0.2",
            "type": "library",
            "name": "container",
            "version": "2.0.2",
            "group": "psr",
            "purl": "pkg:composer/psr/container@2.0.2"
        },
        {
            "bom-ref": "pkg:composer/psr/event-dispatcher@1.0.0",
            "type": "library",
            "name": "event-dispatcher",
            "version": "1.0.0",
            "group": "psr",
            "purl": "pkg:composer/psr/event-dispatcher@1.0.0"
        },
        {
            "bom-ref": "pkg:composer/psr/log@3.0.0",
            "type": "library",
            "name": "log",
            "version": "3.0.0",
            "group": "psr",
            "purl": "pkg:composer/psr/log@3.0.0"
        },
        {
            "bom-ref": "pkg:composer/symfony/cache@v6.4.8",
            "type": "library",
            "name": "cache",
            "version": "v6.4.8",
            "group": "symfony",
            "purl": "pkg:composer/symfony/cache@v6.4.8"
        },
        {
            "bom-ref": "pkg:composer/symfony/cache-contracts@v3.5.0",
            "type": "library",
            "name": "cache-contracts",
            "version": "v3.5.0",
            "group": "symfony",
            "purl": "pkg:composer/symfony/cache-contracts@v3.5.0"
        },
        {
            "bom-ref": "pkg:composer/symfony/console@v6.4.9",
            "type": "library",
            "name": "console",
            "version": "v6.4.9",
            "group": "symfony",
            "purl": "pkg:composer/symfony/console@v6.4.9"
        },
        {
            "bom-ref": "pkg:composer/symfony/deprecation-contracts@v3.5.0",
            "type": "library",
            "name": "deprecation-contracts",
            "version": "v3.5.0",
            "group": "symfony",
            "purl": "pkg:composer/symfony/deprecation-contracts@v3.5.0"
        },
        {
            "bom-ref": "pkg:composer/symfony/event-dispatcher@v6.4.8",
            "type": "library",
            "name": "event-dispatcher",
            "version": "v6.4.8",
            "group": "symfony",
            "purl": "pkg:composer/symfony/event-dispatcher@v6.4.8"
        },
        {
            "bom-ref": "pkg:composer/symfony/event-dispatcher-contracts@v3.5.0",
            "type": "library",
            "name": "event-dispatcher-contracts",
            "version": "v3.5.0",
            "group": "symfony",
            "purl": "pkg:composer/symfony/event-dispatcher-contracts@v3.5.0"
        },
        {
            "bom-ref": "pkg:composer/symfony/finder@v6.4.8",
            "type": "library",
            "name": "finder",
            "version": "v6.4.8",
            "group": "symfony",
            "purl": "pkg:composer/symfony/finder@v6.4.8"
        },
        {
            "bom-ref": "pkg:composer/symfony/options-resolver@v6.4.8",
            "type": "library",
            "name": "options-resolver",
            "version": "v6.4.8",
            "group": "symfony",
            "purl": "pkg:composer/symfony/options-resolver@v6.4.8"
        },
        {
            "bom-ref": "pkg:composer/symfony/polyfill-ctype@v1.30.0",
            "type": "library",
            "name": "polyfill-ctype",
            "version": "v1.30.0",
            "group": "symfony",
            "purl": "pkg:composer/symfony/polyfill-ctype@v1.30.0"
        },
        {
            "bom-ref": "pkg:composer/symfony/polyfill-intl-grapheme@v1.30.0",
            "type": "library",
            "name": "polyfill-intl-grapheme",
            "version": "v1.30.0",
            "group": "symfony",
            "purl": "pkg:composer/symfony/polyfill-intl-grapheme@v1.30.0"
        },
        {
            "bom-ref": "pkg:composer/symfony/polyfill-intl-normalizer@v1.30.0",
            "type": "library",
            "name": "polyfill-intl-normalizer",
            "version": "v1.30.0",
            "group": "symfony",
            "purl": "pkg:composer/symfony/polyfill-intl-normalizer@v1.30.0"
        },
        {
            "bom-ref": "pkg:composer/symfony/polyfill-mbstring@v1.30.0",
            "type": "library",
            "name": "polyfill-mbstring",
            "version": "v1.30.0",
            "group": "symfony",
            "purl": "pkg:composer/symfony/polyfill-mbstring@v1.30.0"
        },
        {
            "bom-ref": "pkg:composer/symfony/process@v6.4.8",
            "type": "library",
            "name": "process",
            "version": "v6.4.8",
            "group": "symfony",
            "purl": "pkg:composer/symfony/process@v6.4.8"
        },
        {
            "bom-ref": "pkg:composer/symfony/service-contracts@v3.5.0",
            "type": "library",
            "name": "service-contracts",
            "version": "v3.5.0",
            "group": "symfony",
            "purl": "pkg:composer/symfony/service-contracts@v3.5.0"
        },
        {
            "bom-ref": "pkg:composer/symfony/string@v6.4.9",
            "type": "library",
            "name": "string",
            "version": "v6.4.9",
            "group": "symfony",
            "purl": "pkg:composer/symfony/string@v6.4.9"
        },
        {
            "bom-ref": "pkg:composer/symfony/var-exporter@v6.4.9",
            "type": "library",
            "name": "var-exporter",
            "version": "v6.4.9",
            "group": "symfony",
            "purl": "pkg:composer/symfony/var-exporter@v6.4.9"
        },
        {
            "bom-ref": "pkg:composer/symfony/yaml@v6.4.8",
            "type": "library",
            "name": "yaml",
            "version": "v6.4.8",
            "group": "symfony",
            "purl": "pkg:composer/symfony/yaml@v6.4.8"
        }
    ],
    "dependencies": [
        {
            "ref": "pkg:composer/bamarni/composer-bin-plugin@1.8.2"
        },
        {
            "ref": "pkg:composer/brainmaestro/composer-git-hooks@v3.0.0"
        },
        {
            "ref": "pkg:composer/jetbrains/phpstorm-stubs@v2024.1"
        },
        {
            "ref": "pkg:composer/php-parallel-lint/php-console-color@v1.0.1"
        },
        {
            "ref": "pkg:composer/php-parallel-lint/php-console-highlighter@v1.0.0"
        },
        {
            "ref": "pkg:composer/psr/cache@3.0.0"
        },
        {
            "ref": "pkg:composer/psr/container@2.0.2"
        },
        {
            "ref": "pkg:composer/psr/event-dispatcher@1.0.0"
        },
        {
            "ref": "pkg:composer/psr/log@3.0.0"
        },
        {
            "ref": "pkg:composer/symfony/cache@v6.4.8"
        },
        {
            "ref": "pkg:composer/symfony/cache-contracts@v3.5.0"
        },
        {
            "ref": "pkg:composer/symfony/console@v6.4.9"
        },
        {
            "ref": "pkg:composer/symfony/deprecation-contracts@v3.5.0"
        },
        {
            "ref": "pkg:composer/symfony/event-dispatcher@v6.4.8"
        },
        {
            "ref": "pkg:composer/symfony/event-dispatcher-contracts@v3.5.0"
        },
        {
            "ref": "pkg:composer/symfony/finder@v6.4.8"
        },
        {
            "ref": "pkg:composer/symfony/options-resolver@v6.4.8"
        },
        {
            "ref": "pkg:composer/symfony/polyfill-ctype@v1.30.0"
        },
        {
            "ref": "pkg:composer/symfony/polyfill-intl-grapheme@v1.30.0"
        },
        {
            "ref": "pkg:composer/symfony/polyfill-intl-normalizer@v1.30.0"
        },
        {
            "ref": "pkg:composer/symfony/polyfill-mbstring@v1.30.0"
        },
        {
            "ref": "pkg:composer/symfony/process@v6.4.8"
        },
        {
            "ref": "pkg:composer/symfony/service-contracts@v3.5.0"
        },
        {
            "ref": "pkg:composer/symfony/string@v6.4.9"
        },
        {
            "ref": "pkg:composer/symfony/var-exporter@v6.4.9"
        },
        {
            "ref": "pkg:composer/symfony/yaml@v6.4.8"
        }
    ]
}

Actual behaviour


  The "--manifest" option does not exist.


lint [--exclude EXCLUDE] [--extensions EXTENSIONS] [-j|--jobs JOBS] [-c|--configuration CONFIGURATION] [--no-configuration] [--cache CACHE] [--no-cache] [-p|--progress PROGRESS] [--no-progress] [-o|--output OUTPUT] [--format FORMAT] [-w|--warning] [--memory-limit MEMORY-LIMIT] [--ignore-exit-code] [--bootstrap BOOTSTRAP] [--] [<path>...]
@llaville llaville self-assigned this Jul 5, 2024
@llaville llaville added the bug label Jul 5, 2024
llaville added a commit that referenced this issue Jul 5, 2024
@llaville
Copy link
Collaborator Author

llaville commented Jul 5, 2024

Fixed with release 9.4.1

@llaville llaville closed this as completed Jul 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant