Skip to content

Syntax error, unexpected '`' on line 125 #173

@arjendejong12

Description

@arjendejong12

I've been using v0.21.1 for a while now. I wanted to upgrade to the latest version (v0.22.2), but this version is giving me errors I didn't have before:

[notice] Starting... 
[notice] Loading package...
[notice] Loading composer.json config...
[notice] Loading cli config...
[notice] Building dependency list...
[notice] Enumerating files...
[notice] Determining changes...
[notice] Performing replacements...
[error] Syntax error, unexpected '`' on line 125

Since this error doesn't show which file it fails on, I've tried editing the .phar but that's not working since I can't run the phar anymore if I change stuff in it. The new --dry-run doesn't show valuable info as well, just the last file it correctly works on, but since it doesn't handle directories alphabetically, there's no way to know what the next file is.

I guess my question is, is there an easy way to find out on which file it breaks?

My composer file:

{
  "require": {
    "php": "^8.2|^8.3|^8.4",
    "filp/whoops": "^2.15.4",
    "guzzlehttp/guzzle": "^7.9.2",
    "kucrut/vite-for-wp": "^0.10.0",
    "laravel/framework": "^11.38.2",
    "livewire/livewire": "*",
    "spatie/color": "^1.7.0",
    "spatie/invade": "^2.1",
    "spatie/laravel-ignition": "^2.9.0",
    "staudenmeir/eloquent-has-many-deep": "^1.20",
    "vlucas/phpdotenv": "^5.6.1",
    "yahnis-elsts/plugin-update-checker": "^5.5"
  },
  "require-dev": {
    "laravel/pint": "^1.20.0"
  },
  "minimum-stability": "dev",
  "prefer-stable": true,
  "optimize-autoloader": true,
  "autoload": {
    "psr-4": {
      "WPSoup\\": "src/"
    },
    "files": ["src/Core/helpers.php", "src/Support/helpers.php"],
    "classmap": ["vendor"]
  },
  "config": {
    "allow-plugins": {
      "composer/installers": true
    },
    "classmap-authoritative": true,
    "optimize-autoloader": true,
    "sort-packages": true
  },
  "extra": {
    "strauss": {
      "target_directory": "vendor",
      "namespace_prefix": "WPSoup\\Vendor\\",
      "constant_prefix": "WPSV_",
      "packages": ["psr/log"],
      "override_autoload": {
        "nesbot/carbon": {
          "autoload": {
            "psr-4": {
              "Carbon\\": "src/Carbon/"
            }
          },
          "classmap": ["lazy"]
        }
      },
      "exclude_from_prefix": {
        "packages": [],
        "namespaces": [],
        "file_patterns": []
      },
      "update_call_sites": true,
      "include_modified_date": false,
      "include_author": false
    }
  }
}

(Unrelated to this question, there's another issue I have with 0.21.1. On first run (after a new composer install), it correctly replaces the psr/log class with my prefix, but any number of attempts after, it gets removed and won't come back. Is that related to my composer configuration?)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions