Skip to content
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

Error preg_replace(): Argument #3 ($subject) must be of type array|string, false given #1581

Open
agustinzamar opened this issue Aug 9, 2024 · 0 comments
Labels

Comments

@agustinzamar
Copy link

agustinzamar commented Aug 9, 2024

Versions:

  • ide-helper Version: 3.1.0
  • Laravel Version: 11.20.0
  • PHP Version: 8.3.3

Description:

The command ide-helper:generate throws the error: preg_replace(): Argument #3 ($subject) must be of type array|string, false given

image

Steps To Reproduce:

  1. Run composer require --dev barryvdh/laravel-ide-helper
  2. Run php artisan ide-helper:generate
  3. Same issue when running composer update with the scripts.post-update-cmd configured as the docs recommend

Here is my complete composer.json

{
  "name": "laravel/laravel",
  "type": "project",
  "description": "The skeleton application for the Laravel framework.",
  "keywords": ["laravel", "framework"],
  "license": "MIT",
  "require": {
    "php": "^8.3",
    "inertiajs/inertia-laravel": "v1.3.0",
    "laravel/framework": "v11.20.0",
    "laravel/sanctum": "v4.0.2",
    "laravel/socialite": "v5.15.1",
    "laravel/tinker": "v2.9.0",
    "mercadopago/dx-php": "3.0.7",
    "santigarcor/laratrust": "8.3.1",
    "tightenco/ziggy": "v2.3.0"
  },
  "require-dev": {
    "barryvdh/laravel-ide-helper": "v3.1.0",
    "fakerphp/faker": "v1.23.1",
    "laravel-lang/common": "^6.4.0",
    "laravel/breeze": "v2.1.3",
    "laravel/pint": "v1.17.2",
    "mockery/mockery": "1.6.12",
    "nunomaduro/collision": "v8.4.0",
    "pestphp/pest": "v2.35.0",
    "pestphp/pest-plugin-laravel": "v2.4.0"
  },
  "autoload": {
    "psr-4": {
      "App\\": "app/",
      "Database\\Factories\\": "database/factories/",
      "Database\\Seeders\\": "database/seeders/"
    }
  },
  "autoload-dev": {
    "psr-4": {
      "Tests\\": "tests/"
    }
  },
  "scripts": {
    "post-autoload-dump": [
      "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
      "@php artisan package:discover --ansi"
    ],
    "post-update-cmd": [
      "Illuminate\\Foundation\\ComposerScripts::postUpdate",
      "@php artisan vendor:publish --tag=laravel-assets --ansi --force",
      "@php artisan lang:update",
      "@php artisan ide-helper:generate",
      "@php artisan ide-helper:meta"
    ],
    "post-root-package-install": ["@php -r \"file_exists('.env') || copy('.env.example', '.env');\""],
    "post-create-project-cmd": [
      "@php artisan key:generate --ansi",
      "@php -r \"file_exists('database/database.sqlite') || touch('database/database.sqlite');\"",
      "@php artisan migrate --graceful --ansi"
    ]
  },
  "extra": {
    "laravel": {
      "dont-discover": []
    }
  },
  "config": {
    "optimize-autoloader": true,
    "preferred-install": "dist",
    "sort-packages": true,
    "allow-plugins": {
      "pestphp/pest-plugin": true,
      "php-http/discovery": true
    }
  },
  "minimum-stability": "stable",
  "prefer-stable": true
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant