Atlas significantly streamlines the process of upgrading a dependency and fixing any resulting breakage in Laravel applications. By integrating directly with your Laravel toolchain, including Composer for package management, Pest for testing, and Laravel Pint for formatting, Atlas provides a terminal-native AI agent that understands and interacts with your codebase to resolve issues efficiently.
How Atlas upgrades Composer dependencies in Laravel projects
In 2026, Atlas uses its powerful `bash` tool to manage Composer dependencies within your Laravel project, ensuring a precise upgrade process. This approach allows Atlas to execute `composer update` or `composer require` commands directly, just as a developer would, capturing all output for analysis.
Atlas initiates the dependency upgrade by invoking the `bash` tool to run standard Composer commands. For instance, to upgrade a specific package to a new major version, Atlas might execute `composer require vendor/package:^2.0 --with-all-dependencies`. This command updates your `composer.json` and `composer.lock` files, pulling in the new package version. A key capability of Atlas is its ability to capture the full output of these Composer operations. If the output exceeds typical terminal buffer limits, Atlas automatically saves it to a file, which you can then read using the `read` tool. This ensures that no critical information, such as deprecation warnings or installation errors, is missed during the initial upgrade phase, providing a comprehensive record for subsequent debugging and resolution within your Laravel application.
Accessing Laravel package changelogs with Atlas webfetch
To accurately address breaking changes in 2026, Atlas employs its `webfetch` tool to retrieve the official release notes or changelogs for upgraded Laravel packages. This crucial step ensures that any code modifications align precisely with the package maintainers' documented changes, preventing guesswork.
After a dependency has been upgraded via Composer, understanding the breaking changes introduced in the new major version is paramount for a Laravel developer. Atlas addresses this by using its `webfetch` tool to programmatically access the package's release notes, changelog, or migration guide from its official repository or documentation site. For example, if `vendor/package` was upgraded, Atlas would fetch `https://github.com/vendor/package/releases` or a similar URL. This direct access to authoritative information means that when Atlas proceeds to fix compile or test failures, its proposed solutions are grounded in the actual changes and requirements of the new package version. This eliminates the need for manual web searches and ensures that fixes are targeted and correct, rather than speculative, saving significant development time in your Laravel project.
Fixing Laravel compile and test failures with Atlas edit and LSP
Atlas systematically resolves compile and test failures in Laravel applications using its `edit` tool, enhanced by the `lsp` tool's `goToDefinition` operation. This iterative process, common in 2026, involves running `Pest` tests and inspecting new package signatures to precisely repair code across your Laravel project.
Once a dependency is upgraded, Atlas uses its `bash` tool to run `php artisan test`, executing your Laravel application's `Pest` test suite. It then meticulously reads the output to identify specific test failures or compilation errors. For each identified error, Atlas switches to its `edit` tool to modify the problematic code. A powerful feature here is the integration with the `lsp` (Language Server Protocol) tool, specifically its `goToDefinition` operation. This allows Atlas to jump directly to the definition of a changed method or class within the upgraded `vendor/package` source code, such as `vendor/package/src/NewFeature.php`. By inspecting the new signatures and expected parameters, Atlas can accurately refactor callsites in your Laravel controllers (`app/Http/Controllers/ExampleController.php`), models (`app/Models/User.php`), or service providers (`app/Providers/AppServiceProvider.php`). This cycle of running `Pest` tests, identifying errors, inspecting new APIs with `lsp`, and applying fixes with `edit` continues until all tests pass and the Laravel application compiles cleanly.
Reviewing and committing Laravel dependency upgrades with Atlas
Atlas prioritizes safety and transparency in 2026 by providing a comprehensive review process for all changes made during a Laravel dependency upgrade. Before any modifications are permanently written, Atlas presents a unified diff and offers robust git integration for staging and committing.
After Atlas has successfully resolved all compile and test failures in your Laravel project, it moves to the crucial review phase. For every file edit made, Atlas computes a unified diff, clearly highlighting all additions, deletions, and modifications. This diff is surfaced for your explicit approval, ensuring you have full oversight and control over the changes. Atlas also deeply integrates with git, allowing it to read your current branch, status, and existing diffs. You can instruct Atlas to stage specific changes or create a new commit on your behalf, complete with a descriptive message. Furthermore, Atlas enhances safety by snapshotting file changes as git patches. This capability means that even after approval and writing, any edits can be easily diffed against previous states and rolled back if necessary, providing an additional layer of security and confidence when performing significant dependency upgrades in your Laravel codebase.
Step by step
- 01Initiate the dependency upgrade in your Laravel project by running `composer require vendor/package:^2.0 --with-all-dependencies` using Atlas's `bash` tool.
- 02Use Atlas's `webfetch` tool to retrieve the official release notes or changelog for the newly upgraded `vendor/package` to understand breaking changes.
- 03Execute your Laravel application's `Pest` test suite by running `php artisan test` with Atlas's `bash` tool to identify initial test failures.
- 04For each identified test failure or compilation error, use Atlas's `edit` tool, leveraging `lsp`'s `goToDefinition` to inspect new method signatures in the upgraded package's source, such as `vendor/package/src/NewClass.php`.
- 05Iteratively apply code fixes in your Laravel files (e.g., `app/Http/Controllers/MyController.php`, `app/Models/MyModel.php`) using Atlas's `edit` tool, then re-run `php artisan test` until all `Pest` tests pass.
- 06Ensure code style consistency across your Laravel project by running `php artisan pint` with Atlas's `bash` tool.
- 07Review the comprehensive unified diff of all changes presented by Atlas, ensuring every modification aligns with your expectations for the Laravel codebase.
- 08Approve the changes and instruct Atlas to stage and create a new git commit for the dependency upgrade in your Laravel repository.
Frequently asked questions
- How does Atlas handle `composer.json` updates in Laravel?
- Atlas uses its `bash` tool to directly execute `composer require` or `composer update` commands, modifying your `composer.json` and `composer.lock` files just as you would manually. It captures all output for review, ensuring transparency in your Laravel project's dependency management.
- Can Atlas fix breaking changes in Laravel Eloquent models?
- Yes, Atlas can identify and fix breaking changes in Laravel Eloquent models by reading compiler output and using its `edit` tool. It often leverages `lsp`'s `goToDefinition` to inspect new method signatures in `app/Models/User.php` or similar files, ensuring your models adapt correctly to upgraded packages.
- How does Atlas ensure my Laravel tests pass after an upgrade?
- Atlas repeatedly runs `php artisan test` (Pest) via its `bash` tool, analyzing the output to pinpoint failures. It then iteratively applies fixes using `edit` until all tests in your `tests/Feature` and `tests/Unit` directories pass, ensuring the stability of your Laravel application.
- What if a Laravel package upgrade requires a new migration?
- While Atlas focuses on code fixes, it can identify migration-related errors from `php artisan migrate` output. It can then use `edit` to help adjust existing migrations or create new ones in `database/migrations` based on the package's changelog, guiding you through schema updates in Laravel.
- How does Atlas integrate with `Laravel Pint` for code formatting?
- After applying code fixes, Atlas can execute `php artisan pint` using its `bash` tool to automatically format your Laravel codebase according to your `pint.json` configuration. This ensures consistent style and adherence to your project's coding standards after any dependency upgrade.
- Is it safe to let Atlas modify my Laravel codebase?
- Yes, Atlas prioritizes safety. It drafts a plan, asks for approval, computes a unified diff for every file edit, and requires your explicit approval before writing any changes to your Laravel project files. It also snapshots changes as git patches for easy rollback, providing robust safeguards.
- Can Atlas help with upgrading Laravel itself to a new major version?
- While this page focuses on individual package upgrades, Atlas's core workflow of running `Composer`, fetching changelogs with `webfetch`, fixing compile/test errors with `edit` and `lsp`, and iterative testing with `Pest` is highly applicable and beneficial for a full Laravel framework upgrade.
Try Atlas in your terminal
The terminal-native AI coding agent. Free core, single binary.
Install AtlasRelated guides
Upgrade a Dependency and Fix the Breakage with Atlas (2026 Workflow)
How to upgrade a dependency and fix the breakage with Atlas in 2026: bash drives the package manager, webfetch pulls the release notes, edit fixes each compiler error.
Atlas for Laravel in 2026
Atlas is a terminal-native AI coding agent for Laravel in 2026. Run it in a Laravel app with an artisan file, add a controller or Pest test, and review the diff.
Trace a Runtime Bug from a Stack Trace in Laravel with Atlas in 2026
Pinpoint and fix Laravel runtime bugs directly from production stack traces using Atlas, the terminal-native AI coding agent. Leverage Composer, Pest, and Laravel Pint for a streamlined workflow.
Diagnose a Hanging or Long-Running Laravel Command in 2026 with Atlas
Laravel developers in 2026 can use Atlas to diagnose hanging `artisan` commands, `Composer` installs, or `Pest` tests. Quickly identify if a script is blocked on input or genuinely slow, and get it unstuck.
Run Atlas Headless in CI with Laravel in 2026
Run Atlas non-interactively in your Laravel CI pipeline in 2026. Get machine-readable output, integrate with Pest and Composer, and ensure safety with pre-approved tools.
Locate Laravel Behavior Implementations with Atlas in 2026
In 2026, Laravel developers use Atlas to quickly locate behavior implementations, pinpointing exact files and symbols across Eloquent models, routes, and Artisan commands. Find code by describing its function.
Document a Module with a README in Laravel with Atlas in 2026
In 2026, Laravel developers use Atlas to generate accurate READMEs for modules, ensuring documentation reflects current code. Atlas leverages Pest and Composer to verify code samples and integrates with Laravel Pint for
Automate GitHub Issue and Pull Request Triage in Laravel with Atlas in 2026
Streamline GitHub issue and pull request triage for your Laravel projects in 2026 using Atlas. Automate responses safely, ensuring only trusted users trigger actions within your familiar Laravel toolchain.