Skip to content

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

Open
@anasgets111

Description

@anasgets111

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
                ]);

                }
            });

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions