Skip to content

[Bug]: PHP String Concatenation in Output Panel Interpreted as Shell Commands #271

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

Open
anasgets111 opened this issue Feb 24, 2025 · 1 comment · May be fixed by #326
Open

[Bug]: PHP String Concatenation in Output Panel Interpreted as Shell Commands #271

anasgets111 opened this issue Feb 24, 2025 · 1 comment · May be fixed by #326
Assignees
Labels

Comments

@anasgets111
Copy link

anasgets111 commented Feb 24, 2025

Extension Version

0.1.21

PHP Binary

Local PHP

Operating System

Linux

What happened?

Expected Behavior

The extension should properly escape or handle PHP code in its output panel without trying to execute it as shell commands.

Actual Behavior

The extension is attempting to interpret PHP code as shell commands, leading to syntax errors in the output panel.

Steps to Reproduce

  1. Have a PHP file with string concatenation and namespace definitions
  2. View the file in VS Code with Laravel Extension
  3. Laravel Extension shows an error notification, and in output panel

Mimimal Code Sample

$children->each(function ($relationshipField) use ($model) {
                $className = "App\\DynamicApp\\Models\\" . ucfirst($relationshipField->attribute) . "Model";
                $foreignKey = $relationshipField->foreign_key;

                \logger()->info('Processing relationship', [
                    'model' => get_class($model),
                    'relationship' => $relationshipField->attribute,
                    'cascade_enabled' => $relationshipField->on_delete_cascade,
                    'is_force_deleting' => method_exists($model, 'isForceDeleting') ? $model->isForceDeleting() : false
                ]);

                }
            });
@N1ebieski
Copy link
Contributor

#326

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants