ampproject / ampproject/amp-toolbox-php

CLI options parsing is order-dependent

Open
#407 0 comments 0 reactions 0 assignees View on GitHub
Bug CLI
Dominant language
PHP
Stars
74
Forks
25
Avg merge
1d 15h
Merged PRs (30d)
3

Description

The parsing of the CLI options is dependent on an arbitrary ordering where associative arguments (flags like `--json`) need to come first before positional arguments. If these associative arguments are provided after a positional argument, they are currently being silently ignored.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the CLI options parsing entry point and reproduce the issue with a positional argument before and after --json. Done means associative options are recognized and preserved regardless of whether they appear before or after positional arguments, with coverage for both orderings.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.