Skip to content

Feat: Acorn 5#47

Open
ictbeheer wants to merge 6 commits into
mainfrom
feat/acorn5
Open

Feat: Acorn 5#47
ictbeheer wants to merge 6 commits into
mainfrom
feat/acorn5

Conversation

@ictbeheer

@ictbeheer ictbeheer commented Jun 9, 2026

Copy link
Copy Markdown
Member

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:

  • Upgraded the minimum PHP version requirement to 8.2 and updated key dependencies to support Acorn v5 and the latest versions of development tools in composer.json.

Application Bootstrapping and Structure:

  • Introduced a new Yard\Nutshell\Application class to encapsulate application configuration and bootstrapping, replacing the previous bootloader-based approach. This includes middleware, Sentry integration, custom providers, and logger setup.
  • Updated the documentation in README.md to reflect the new bootstrapping method using Yard\Nutshell\Application and removed references to the old bootloader helper.

Codebase Simplification and Cleanup:

  • Removed the custom Yard\Nutshell\Assets\Vite class and related documentation, as asset management is now handled natively. [1] [2]
  • Removed the custom exception handler (Yard\Nutshell\Exceptions\Handler) and HTTP kernel (Yard\Nutshell\Http\Kernel), as their functionality is now integrated into the new application structure. [1] [2]
  • Deleted the Yard\Nutshell\bootloader helper and its associated logic, consolidating all bootstrapping into the new application class.

Internal Refactoring:

  • Simplified provider replacement logic in DefaultProviders by using a dedicated replace method for provider mapping.

Copilot AI review requested due to automatic review settings June 9, 2026 12:42
@ictbeheer ictbeheer requested a review from a team as a code owner June 9, 2026 12:42

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 custom Http\Kernel / exception handler wiring with Yard\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.

Comment thread composer.json
Comment thread README.md Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 9 changed files in this pull request and generated 2 comments.

Comment thread README.md
![Packagist Dependency Version](https://img.shields.io/packagist/dependency-v/yard/nutshell/php)
![Packagist Dependency Version](https://img.shields.io/packagist/dependency-v/yard/nutshell/roots%2Facorn)

**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 thread README.md
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);

```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants