Feat: Acorn 5#47
Open
ictbeheer wants to merge 6 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR upgrades Nutshell to support Roots Acorn v5 (and its newer Illuminate/Laravel stack), replacing the previous “bootloader helper + custom kernel/handler overrides” approach with an Application subclass that configures middleware, routing, paths, and exception handling via Acorn’s newer configuration builder API.
Changes:
- Upgrade runtime/dev dependencies (Acorn v5, PHP >= 8.2, and associated Illuminate/Symfony ecosystem updates).
- Replace the old
bootloader()helper and customHttp\Kernel/ exception handler wiring withYard\Nutshell\Application::configure(...). - Update provider replacement logic and refresh README bootstrapping instructions.
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Http/Kernel.php | Removed old custom HTTP kernel (CSP middleware injection previously lived here). |
| src/helpers.php | Removed old bootloader() helper and container bindings/aliases. |
| src/Exceptions/Handler.php | Removed old Sentry exception reporting hook via custom handler. |
| src/DefaultProviders.php | Switch to using replace(...) for provider substitution after Acorn default provider setup. |
| src/Assets/Vite.php | Removed custom Vite asset path override. |
| src/Application.php | New Acorn Application subclass configuring middleware, WordPress routing, public path, and Sentry integration. |
| README.md | Update bootstrap instructions to use the new Application::configure(...) entry point. |
| composer.json | Bump PHP requirement and Acorn major version; update dev tooling versions. |
| composer.lock | Lockfile refresh for the upgraded dependency graph. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|  | ||
|  | ||
|
|
||
| **Nutshell** is a feature-rich package designed to extend [Acorn](https://roots.io/acorn/) for WordPress themes. It provides a flexible foundation for advanced theme development, including configuration inheritance, Sentry integration, Vite asset support, and more. |
Comment on lines
79
to
90
| ```diff | ||
| -\Roots\bootloader()->boot(); | ||
| +define('ACORN_BASEPATH', __DIR__); | ||
| +\Yard\Nutshell\bootloader()->boot(); | ||
|
|
||
| add_action('after_setup_theme', function () { | ||
| - Application::configure() | ||
| - ->withProviders([ | ||
| - App\Providers\ThemeServiceProvider::class, | ||
| - ]) | ||
| + Yard\Nutshell\Application::configure(__DIR__) | ||
| ->boot(); | ||
| }, 0); | ||
|
|
||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces significant updates to the project to support Acorn v5, modernize dependencies, and simplify the codebase. The most notable changes include upgrading core dependencies, refactoring the application bootstrapping process, and removing custom integrations that are now handled natively or elsewhere.
Dependency and Compatibility Updates:
composer.json.Application Bootstrapping and Structure:
Yard\Nutshell\Applicationclass to encapsulate application configuration and bootstrapping, replacing the previous bootloader-based approach. This includes middleware, Sentry integration, custom providers, and logger setup.README.mdto reflect the new bootstrapping method usingYard\Nutshell\Applicationand removed references to the old bootloader helper.Codebase Simplification and Cleanup:
Yard\Nutshell\Assets\Viteclass and related documentation, as asset management is now handled natively. [1] [2]Yard\Nutshell\Exceptions\Handler) and HTTP kernel (Yard\Nutshell\Http\Kernel), as their functionality is now integrated into the new application structure. [1] [2]Yard\Nutshell\bootloaderhelper and its associated logic, consolidating all bootstrapping into the new application class.Internal Refactoring:
DefaultProvidersby using a dedicatedreplacemethod for provider mapping.