|
| 1 | +name: PHP Installation Detection Issue |
| 2 | +description: Report when Symfony CLI cannot detect your PHP installation |
| 3 | +labels: Bug |
| 4 | +assignees: [tucksaun] |
| 5 | + |
| 6 | +body: |
| 7 | + - type: markdown |
| 8 | + attributes: |
| 9 | + value: | |
| 10 | + ## Before You Start |
| 11 | + |
| 12 | + Please try these steps first - they resolve most issues: |
| 13 | + |
| 14 | + - **Update Symfony CLI**: Ensure you're using the latest version: |
| 15 | + - **Homebrew (macOS)**: `brew upgrade symfony-cli` |
| 16 | + - **APT (Ubuntu/Debian)**: `sudo apt update && sudo apt upgrade symfony-cli` |
| 17 | + - **Scoop (Windows)**: `scoop update symfony-cli` |
| 18 | + - **Other methods**: See [Symfony CLI installation docs](https://symfony.com/doc/current/setup/symfony_cli.html) |
| 19 | + - **Clear cache**: Delete the cache file at `~/.symfony5/php_versions.json` (or `%USERPROFILE%\.symfony5\php_versions.json` on Windows) and try again |
| 20 | + - **Locate your PHP installation**: Find where PHP is installed on your system. If `php` is not in your PATH, use the full path to the PHP binary (e.g., `/usr/local/bin/php`, `/Applications/MAMP/bin/php/php8.2.0/bin/php`, or `C:\xampp\php\php.exe`) |
| 21 | + - **Check custom PHP path**: If PHP is in a non-standard location, try setting the `SYMFONY_CLI_PHP_PATH` environment variable to include the directory containing your PHP installation |
| 22 | + |
| 23 | + If the issue persists after these steps, please continue with the form below. |
| 24 | +
|
| 25 | + - type: checkboxes |
| 26 | + id: self_check |
| 27 | + attributes: |
| 28 | + label: Self-Check Steps |
| 29 | + description: Please confirm you have tried these troubleshooting steps |
| 30 | + options: |
| 31 | + - label: I have updated Symfony CLI to the latest version |
| 32 | + required: true |
| 33 | + - label: I have cleared the PHP versions cache |
| 34 | + required: true |
| 35 | + - label: I have located my PHP installation(s) and know the full path(s) to the PHP binary(ies) |
| 36 | + required: true |
| 37 | + - label: I have checked/configured the `SYMFONY_CLI_PHP_PATH` environment variable if needed |
| 38 | + required: false |
| 39 | + |
| 40 | + - type: markdown |
| 41 | + attributes: |
| 42 | + value: | |
| 43 | + ## Issue Description |
| 44 | +
|
| 45 | + - type: textarea |
| 46 | + id: php_installation |
| 47 | + attributes: |
| 48 | + label: What PHP installation is not being detected? |
| 49 | + description: Describe the PHP installation that should be detected (e.g., "PHP 8.2 installed via Homebrew" or "PHP 7.4 from XAMPP") |
| 50 | + placeholder: e.g., PHP 8.2 installed via Homebrew |
| 51 | + validations: |
| 52 | + required: true |
| 53 | + |
| 54 | + - type: input |
| 55 | + id: command |
| 56 | + attributes: |
| 57 | + label: What command are you running when the issue occurs? |
| 58 | + description: The Symfony CLI command that triggers the detection issue |
| 59 | + placeholder: e.g., symfony local:php:list, symfony server:start |
| 60 | + validations: |
| 61 | + required: false |
| 62 | + |
| 63 | + - type: markdown |
| 64 | + attributes: |
| 65 | + value: | |
| 66 | + ## System Information |
| 67 | +
|
| 68 | + - type: input |
| 69 | + id: operating_system |
| 70 | + attributes: |
| 71 | + label: Operating System |
| 72 | + description: Your operating system and version |
| 73 | + placeholder: e.g., macOS 13.0, Windows 11, Ubuntu 22.04 |
| 74 | + validations: |
| 75 | + required: true |
| 76 | + |
| 77 | + - type: input |
| 78 | + id: symfony_cli_version |
| 79 | + attributes: |
| 80 | + label: Symfony CLI Version |
| 81 | + description: Run `symfony -V` and paste the output here |
| 82 | + placeholder: e.g., Symfony CLI version 5.16.1 |
| 83 | + validations: |
| 84 | + required: true |
| 85 | + |
| 86 | + - type: textarea |
| 87 | + id: php_installations |
| 88 | + attributes: |
| 89 | + label: PHP Installation(s) - Path and Version |
| 90 | + description: | |
| 91 | + Provide the path(s) and version(s) of your PHP installation(s). `php-config` is preferred as it provides both path and version information in one place. |
| 92 | + |
| 93 | + **Using php-config (preferred):** |
| 94 | + - Path to php-config: `/usr/local/bin/php-config` or `C:\xampp\php\php-config.exe` |
| 95 | + - Run: `/usr/local/bin/php-config --version` (outputs version like "8.2.0") |
| 96 | + - PHP binary path: Run `php-config --php-binary` to get the path (e.g., `/usr/local/bin/php` or `C:\xampp\php\php.exe`) |
| 97 | + - PHP SAPIs: Run `php-config --php-sapis` to list the Server APIs supported by this PHP build (e.g., "cli fpm apache2handler") |
| 98 | + |
| 99 | + **Fallback using php -v:** |
| 100 | + - If `php-config` is not available, use the PHP binary directly |
| 101 | + - Path to php: `/usr/local/bin/php` or `C:\xampp\php\php.exe` |
| 102 | + - Run: `/usr/local/bin/php -v` and paste the full output |
| 103 | + |
| 104 | + **Format for each installation:** |
| 105 | + ``` |
| 106 | + php-config path: /usr/local/bin/php-config |
| 107 | + php-config --version: 8.2.0 |
| 108 | + php-config --php-binary: /usr/local/bin/php |
| 109 | + php-config --php-sapis: cli fpm apache2handler |
| 110 | + ``` |
| 111 | + |
| 112 | + If you have multiple PHP versions, list each one separately with all the information above. |
| 113 | + placeholder: | |
| 114 | + #### Installation 1: |
| 115 | + php-config path: /usr/local/bin/php-config |
| 116 | + php-config --version: 8.2.0 |
| 117 | + php-config --php-binary: /usr/local/bin/php |
| 118 | + php-config --php-sapis: cli fpm apache2handler |
| 119 | + |
| 120 | + #### Installation 2 (if php-config not available): |
| 121 | + PHP binary path: /Applications/MAMP/bin/php/php8.1.0/bin/php |
| 122 | + php -v output: |
| 123 | + PHP 8.1.0 (cli) (built: Dec 6 2022 15:31:23) ( NTS ) |
| 124 | + Copyright (c) The PHP Group |
| 125 | + ... |
| 126 | + validations: |
| 127 | + required: true |
| 128 | + |
| 129 | + - type: markdown |
| 130 | + attributes: |
| 131 | + value: | |
| 132 | + ## Debug Information |
| 133 | + |
| 134 | + **Please run the following command and paste the complete output:** |
| 135 | + |
| 136 | + ```bash |
| 137 | + symfony local:php:list -vvv |
| 138 | + ``` |
| 139 | + |
| 140 | + This command provides verbose output including discovery logs that are crucial for troubleshooting. |
| 141 | +
|
| 142 | + - type: textarea |
| 143 | + id: debug_output |
| 144 | + attributes: |
| 145 | + label: Output of `symfony local:php:list -vvv` |
| 146 | + description: Paste the complete output of the command above, including all verbose discovery logs |
| 147 | + render: shell |
| 148 | + placeholder: | |
| 149 | + [Paste the complete output here] |
| 150 | + validations: |
| 151 | + required: true |
| 152 | + |
| 153 | + - type: textarea |
| 154 | + id: additional_diagnostics |
| 155 | + attributes: |
| 156 | + label: Additional Diagnostic Information |
| 157 | + description: | |
| 158 | + Run these commands and paste the output. Note: If `php` is not in your PATH, replace `php` with the full path to your PHP binary. |
| 159 | + |
| 160 | + **On Unix/macOS:** |
| 161 | + ```bash |
| 162 | + echo $PATH |
| 163 | + echo $SYMFONY_CLI_PHP_PATH |
| 164 | + php -v 2>&1 || echo "php command not found - PHP is not in PATH" |
| 165 | + which php 2>&1 || echo "php not found in PATH" |
| 166 | + # If php is not in PATH, try with full path: |
| 167 | + # /path/to/php -v |
| 168 | + ``` |
| 169 | + |
| 170 | + **On Windows (PowerShell):** |
| 171 | + ```powershell |
| 172 | + $env:PATH |
| 173 | + $env:SYMFONY_CLI_PHP_PATH |
| 174 | + php -v 2>&1 |
| 175 | + where.exe php 2>&1 |
| 176 | + # If php is not in PATH, try with full path: |
| 177 | + # C:\path\to\php.exe -v |
| 178 | + ``` |
| 179 | + render: shell |
| 180 | + placeholder: | |
| 181 | + [Paste the output here] |
| 182 | + validations: |
| 183 | + required: false |
| 184 | + |
| 185 | + - type: markdown |
| 186 | + attributes: |
| 187 | + value: | |
| 188 | + ## Additional Context |
| 189 | +
|
| 190 | + - type: textarea |
| 191 | + id: error_messages |
| 192 | + attributes: |
| 193 | + label: Are there any error messages? |
| 194 | + description: If yes, please paste them here |
| 195 | + placeholder: | |
| 196 | + [Paste any error messages here] |
| 197 | + validations: |
| 198 | + required: false |
| 199 | + |
| 200 | + - type: textarea |
| 201 | + id: previous_behavior |
| 202 | + attributes: |
| 203 | + label: Did this work before? |
| 204 | + description: If yes, what changed? (e.g., updated Symfony CLI, updated PHP, changed system configuration) |
| 205 | + placeholder: | |
| 206 | + [Describe if this worked previously and what changed] |
| 207 | + validations: |
| 208 | + required: false |
| 209 | + |
| 210 | + - type: textarea |
| 211 | + id: other_info |
| 212 | + attributes: |
| 213 | + label: Any other relevant information |
| 214 | + description: Add any other context, screenshots, or information that might help |
| 215 | + placeholder: | |
| 216 | + [Any additional information] |
| 217 | + validations: |
| 218 | + required: false |
| 219 | + |
| 220 | + - type: markdown |
| 221 | + attributes: |
| 222 | + value: | |
| 223 | + ## Final Checklist |
| 224 | + |
| 225 | + Please confirm you have provided all the necessary information: |
| 226 | +
|
| 227 | + - type: checkboxes |
| 228 | + id: information_checklist |
| 229 | + attributes: |
| 230 | + label: Information Checklist |
| 231 | + description: Confirm you have provided all required information |
| 232 | + options: |
| 233 | + - label: I have updated Symfony CLI to the latest version |
| 234 | + required: true |
| 235 | + - label: I have cleared the PHP versions cache |
| 236 | + required: true |
| 237 | + - label: I have provided the output of `symfony local:php:list -vvv` |
| 238 | + required: true |
| 239 | + - label: I have provided system information (OS, Symfony CLI version) |
| 240 | + required: true |
| 241 | + - label: I have provided PHP installation path(s) and version(s) (preferably using php-config) |
| 242 | + required: true |
| 243 | + |
| 244 | + - type: markdown |
| 245 | + attributes: |
| 246 | + value: | |
| 247 | + Thank you for taking the time to report this issue! The debug information you provide helps us diagnose and fix detection issues more efficiently. |
0 commit comments