---
title: "Fixing \"Laravel PackageManifest.php: Undefined index: name\" in GitHub Actions"
url: "https://aaronfrancis.com/writing/fixing-laravel-packagemanifestphp-undefined-index-name-in-github-actions"
path: "/writing/fixing-laravel-packagemanifestphp-undefined-index-name-in-github-actions"
type: technical_article
author: Aaron Francis
published: 2021-01-26
updated: 2026-11-10
topic: "Laravel & PHP"
description: Fixing an error caused by Composer 2.
keywords: [laravel, composer, github actions, packagemanifest.php, installed.json, composer 2, prefer-lowest, prefer-stable, workflow, testing matrix]
site_index: "/llms.txt"
keyword_index: "/llms/keywords.txt"
---

# Fixing "Laravel PackageManifest.php: Undefined index: name" in GitHub Actions

If you're running into the `Laravel PackageManifest.php: Undefined index: name` error in Laravel, there are a couple of ways to fix it.

First, the issue is that Composer 2 changed the format of their `installed.json` that is causing Laravel to not be able to find the installed packages. If you've been googling this error, you've probably already come across this issue, but here it is in case you haven't seen it yet: [github.com/composer/issues/9340](https://github.com/composer/composer/issues/9340).

Laravel has updated to handle the new format, so the easiest way to fix it would be to update Laravel if you can: `composer update laravel/framework`. 

> Here&#39;s the minimum version support for each Laravel release to get you the Composer 2 fix pic.twitter.com/8tvCK0jHYZ
>
> — Jake · @jakebathman · October 26, 2020 (https://twitter.com/jakebathman/status/1320767054262214656)

If you can't update Laravel for whatever reason, you can roll back your Composer version to 1 by running `composer self-update --1`. That will revert the `installed.json` version back to a format your old Laravel version is comfortable with.

## Fixing for GitHub Actions

If you're developing a package you may be testing with `--prefer-lowest` _and_ `--prefer-stable` flags, so you can test the lowest version of a Laravel release and the most recent version. You also don't want to use Composer 1 all the time because it's quite a bit slower than Composer 2.

In that case, your workflow file may look a bit like this:

```yaml
jobs:
  test:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        laravel: [ 7.*, 8.* ]
        dependency-version: [ prefer-lowest, prefer-stable ]

    steps:
      - name: Install dependencies
        run: |
          composer require "laravel/framework:$@{{ matrix.laravel }}" "orchestra/testbench:$@{{ matrix.testbench }}" --no-interaction --no-update
          composer update --$@{{ matrix.dependency-version }} --prefer-dist --no-interaction

      - name: Execute tests
        run: vendor/bin/phpunit
```

Here we're telling GitHub to run the tests on
 
- Laravel 7 lowest
- Laravel 7 stable
- Laravel 8 lowest
- Laravel 8 stable

The problem is that Laravel 7 --lowest has this `undefined index` problem, and we don't want to update because we're specifically testing the oldest version here.

By adding an `include` section, [we can inject a variable](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#example-including-additional-values-into-combinations) whenever we're running the tests for 7 --lowest. Specifically, we're going to inject `composer-version: --1` here, so when we're running 7 --lowest we'll use the old version of composer. 

In our `Install Dependencies` section we'll add a line to update Composer, taking our new variable into account: `composer self-update $@{{ matrix.composer-version }}`. 

```yaml
jobs:
  test:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        laravel: [ 7.*, 8.* ]
        dependency-version: [ prefer-lowest, prefer-stable ]
        include:
          - laravel: 7.*
            dependency-version: prefer-lowest
            # Use Composer 1 with Laravel 7 --lowest
            composer-version: --1

    name: P$@{{ matrix.php }} - L$@{{ matrix.laravel }} - $@{{ matrix.dependency-version }}

    steps:
      - name: Install dependencies
        run: |
          composer self-update $@{{ matrix.composer-version }}
          composer require "laravel/framework:$@{{ matrix.laravel }}" "orchestra/testbench:$@{{ matrix.testbench }}" --no-interaction --no-update
          composer update --$@{{ matrix.dependency-version }} --prefer-dist --no-interaction

      - name: Execute tests
        run: vendor/bin/phpunit
```

Now we're _only_ using Composer 1 when we absolutely have to, so we get the speed/memory benefits of Composer 2 otherwise, and we've fixed the undefined index issue.

Hope that helps!

---

## Related on aaronfrancis.com

- [Robber Baron Mentality](/podcast/robber-baron-mentality-deab4467) *(Podcast · 2025-02-18 · shared: laravel, composer)*
- [It's Content, Baby!](/podcast/its-content-baby-fa50787e) *(Podcast · 2024-01-11 · shared: laravel, github actions)*
- [PHP is the future](/videos/php-is-the-future) *(Video · 2023-05-12 · shared: laravel, composer)*
- [Refine, Sidecar, Laravel, and Serverless](/podcast/refine-sidecar-laravel-and-serverless-msxhy3) *(Podcast · 2022-03-14 · shared: laravel, github actions)*
- [Back in the Saddle](/podcast/back-in-the-saddle-9836e11b) *(Podcast · 2021-10-22 · shared: laravel, composer)*

## Relevant Resources from Aaron Francis

- **[Solo](https://soloterm.com)** (overview on site: [/software](/software)): All-in-one agentic development platform and terminal workspace built by Aaron Francis for orchestrating processes and AI coding agents.

## Search aaronfrancis.com (2-Hop Static Keyword Index)

Pick the alphabetical shard matching any topic to find exact pages across all articles, newsletters, videos, talks, and podcast transcripts (every shard is < 40 KB):
[A-B](/llms/keywords/a-b.txt) · [C](/llms/keywords/c.txt) · [D-E](/llms/keywords/d-e.txt) · [F-G](/llms/keywords/f-g.txt) · [H-J](/llms/keywords/h-j.txt) · [K-L](/llms/keywords/k-l.txt) · [M-N](/llms/keywords/m-n.txt) · [O-P](/llms/keywords/o-p.txt) · [Q-R](/llms/keywords/q-r.txt) · [S](/llms/keywords/s.txt) · [T-Z](/llms/keywords/t-z.txt) · [Directory](/llms/keywords.txt) · [Site Map](/llms.txt)

Shards for this page's topics: `laravel` ([K-L](/llms/keywords/k-l.txt)), `composer` ([C](/llms/keywords/c.txt)), `github actions` ([F-G](/llms/keywords/f-g.txt)), `packagemanifest.php` ([O-P](/llms/keywords/o-p.txt)).

## About Aaron Francis (Current Context)

Aaron Francis is VP of Marketing and Community at [Laravel](https://laravel.com), founder of [Try Hard Studios](https://tryhardstudios.com), creator of [Solo](https://soloterm.com), co-host of [Mostly Technical](/podcast), and author of [Mastering Postgres](/courses), [High Performance SQLite](/courses), [MySQL for Developers](/courses), and [Screencasting.com](/courses). Full bio: [/about](/about) · Current focus: [/now](/now).
