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 Outdated
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);

```
@ictbeheer ictbeheer linked an issue Jun 15, 2026 that may be closed by this pull request
SimonvanWijhe
SimonvanWijhe previously approved these changes Jun 18, 2026
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Composer package changes
Prod Packages Operation Base Target Link License
brick/math Upgraded 0.12.3 0.14.8 Compare MIT
carbonphp/carbon-doctrine-types Upgraded 2.1.0 3.2.0 Compare MIT
guzzlehttp/guzzle Upgraded 7.15.2 7.15.3 Compare MIT
guzzlehttp/promises Upgraded 2.5.1 2.5.2 Compare MIT
guzzlehttp/uri-template Upgraded v1.0.5 v1.0.10 Compare MIT
laravel/framework Upgraded 10.50.2 v12.65.0 Compare MIT
laravel/prompts Upgraded v0.1.25 v0.3.22 Compare MIT
laravel/serializable-closure Upgraded v1.3.7 v2.0.15 Compare MIT
league/commonmark Upgraded 2.8.2 2.9.0 Compare BSD-3-Clause
league/flysystem Upgraded 3.33.0 3.35.2 Compare MIT
league/mime-type-detection Upgraded 1.16.0 1.17.0 Compare MIT
league/uri New - 7.8.1 Compare MIT
league/uri-interfaces New - 7.8.1 Compare MIT
nesbot/carbon Upgraded 2.73.0 3.13.1 Compare MIT
nette/utils Upgraded v4.1.4 v4.1.5 Compare BSD-3-Clause, GPL-2.0-only, GPL-3.0-only
nunomaduro/termwind Upgraded v1.17.0 v2.4.0 Compare MIT
ramsey/uuid Upgraded 4.9.2 4.9.3 Compare MIT
roots/acorn Upgraded v4.3.1 v5.1.1 Compare MIT
sentry/sentry Upgraded 4.27.0 4.30.0 Compare MIT
sentry/sentry-laravel Upgraded 4.25.1 4.27.0 Compare MIT
spatie/laravel-package-tools Upgraded 1.93.0 1.93.1 Compare MIT
symfony/clock New - v7.4.8 Compare MIT
symfony/console Upgraded v6.4.37 v7.4.15 Compare MIT
symfony/error-handler Upgraded v6.4.36 v7.4.15 Compare MIT
symfony/event-dispatcher Upgraded v7.4.9 v7.4.15 Compare MIT
symfony/event-dispatcher-contracts Upgraded v3.7.0 v3.7.1 Compare MIT
symfony/finder Upgraded v6.4.34 v7.4.14 Compare MIT
symfony/http-foundation Upgraded v6.4.41 v7.4.15 Compare MIT
symfony/http-kernel Upgraded v6.4.38 v7.4.15 Compare MIT
symfony/mailer Upgraded v6.4.40 v7.4.15 Compare MIT
symfony/mime Upgraded v6.4.41 v7.4.15 Compare MIT
symfony/polyfill-intl-grapheme Upgraded v1.37.0 v1.41.0 Compare MIT
symfony/polyfill-php83 Upgraded v1.38.2 v1.41.0 Compare MIT
symfony/polyfill-php84 New - v1.38.1 Compare MIT
symfony/polyfill-php85 New - v1.41.0 Compare MIT
symfony/process Upgraded v6.4.33 v7.4.13 Compare MIT
symfony/routing Upgraded v6.4.41 v7.4.15 Compare MIT
symfony/service-contracts Upgraded v3.7.0 v3.7.1 Compare MIT
symfony/string Upgraded v7.4.8 v7.4.15 Compare MIT
symfony/translation Upgraded v6.4.38 v7.4.14 Compare MIT
symfony/translation-contracts Upgraded v3.7.0 v3.7.1 Compare MIT
symfony/uid Upgraded v6.4.32 v7.4.9 Compare MIT
symfony/var-dumper Upgraded v6.4.36 v7.4.15 Compare MIT
vlucas/phpdotenv Upgraded v5.6.3 v5.6.4 Compare BSD-3-Clause
Dev Packages Operation Base Target Link License
composer/pcre Upgraded 3.3.2 3.4.0 Compare MIT
ergebnis/agent-detector New - 1.2.0 Compare MIT
friendsofphp/php-cs-fixer Upgraded v3.94.2 v3.95.18 Compare MIT
iamcal/sql-parser Upgraded v0.5 v0.7 Compare MIT
larastan/larastan Upgraded v2.11.2 v3.10.0 Compare MIT
laravel/pail New - v1.2.7 Compare MIT
nikic/php-parser Upgraded v5.7.0 v5.8.0 Compare BSD-3-Clause
nunomaduro/collision Upgraded v7.12.0 v8.9.5 Compare MIT
orchestra/canvas Upgraded v8.12.0 v10.2.1 Compare MIT
orchestra/canvas-core Upgraded v8.11.0 v10.2.0 Compare MIT
orchestra/sidekick Upgraded v1.2.20 v1.2.21 Compare MIT
orchestra/testbench Upgraded v8.37.0 v10.11.0 Compare MIT
orchestra/testbench-core Upgraded v8.42.1 v10.14.1 Compare MIT
orchestra/workbench Upgraded v8.19.0 v10.2.0 Compare MIT
php-stubs/wordpress-stubs Upgraded v6.9.1 v6.9.4 Compare MIT
phpstan/phpstan Upgraded 1.12.33 2.2.8 MIT
phpunit/php-code-coverage Upgraded 10.1.16 11.0.12 Compare BSD-3-Clause
phpunit/php-file-iterator Upgraded 4.1.0 5.1.1 Compare BSD-3-Clause
phpunit/php-invoker Upgraded 4.0.0 5.0.1 Compare BSD-3-Clause
phpunit/php-text-template Upgraded 3.0.1 4.0.1 Compare BSD-3-Clause
phpunit/php-timer Upgraded 6.0.0 7.0.1 Compare BSD-3-Clause
phpunit/phpunit Upgraded 10.5.63 11.5.56 Compare BSD-3-Clause
psy/psysh Upgraded v0.12.22 v0.12.24 Compare MIT
sebastian/cli-parser Upgraded 2.0.1 3.0.2 Compare BSD-3-Clause
sebastian/code-unit Upgraded 2.0.0 3.0.3 Compare BSD-3-Clause
sebastian/code-unit-reverse-lookup Upgraded 3.0.0 4.0.1 Compare BSD-3-Clause
sebastian/comparator Upgraded 5.0.5 6.3.3 Compare BSD-3-Clause
sebastian/complexity Upgraded 3.2.0 4.0.1 Compare BSD-3-Clause
sebastian/diff Upgraded 5.1.1 6.0.2 Compare BSD-3-Clause
sebastian/environment Upgraded 6.1.0 7.2.1 Compare BSD-3-Clause
sebastian/exporter Upgraded 5.1.4 6.3.2 Compare BSD-3-Clause
sebastian/global-state Upgraded 6.0.2 7.0.2 Compare BSD-3-Clause
sebastian/lines-of-code Upgraded 2.0.2 3.0.1 Compare BSD-3-Clause
sebastian/object-enumerator Upgraded 5.0.0 6.0.1 Compare BSD-3-Clause
sebastian/object-reflector Upgraded 3.0.0 4.0.1 Compare BSD-3-Clause
sebastian/recursion-context Upgraded 5.0.1 6.0.3 Compare BSD-3-Clause
sebastian/type Upgraded 4.0.0 5.1.3 Compare BSD-3-Clause
sebastian/version Upgraded 4.0.1 5.0.2 Compare BSD-3-Clause
staabm/side-effects-detector New - 1.0.5 Compare MIT
symfony/filesystem Upgraded v7.4.8 v7.4.15 Compare MIT
symfony/polyfill-php81 Upgraded v1.37.0 v1.38.1 Compare MIT
symfony/yaml Upgraded v6.4.41 v7.4.15 Compare MIT
szepeviktor/phpstan-wordpress Upgraded v1.3.5 v2.0.3 Compare MIT
symfony/polyfill-php73 Removed v1.37.0 - Compare MIT
symfony/polyfill-php84 Removed v1.37.0 - Compare MIT

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 no new comments.

Suppressed comments (3)

src/Application.php:45

  • In a namespaced file, call WordPress global functions with a leading backslash to avoid namespace shadowing and improve lookup performance.
				do_action(Log::WP_ACTION_SET_LOGGER, $application->make('log'));

src/Application.php:37

  • In a namespaced file, unqualified WordPress global function calls rely on fallback resolution at runtime. Prefixing with a leading backslash avoids any accidental namespace shadowing and is slightly faster for function lookup.

This issue also appears on line 45 of the same file.

			->withPaths(public: get_theme_file_path('public'))

README.md:75

  • This section heading still refers to the Acorn "Bootloader", but the PR removes the bootloader helper and switches the documented approach to Yard\Nutshell\Application::configure(). Renaming the heading will keep the docs consistent with the new bootstrapping mechanism.
2. **Update Acorn Bootloader**

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.

Acorn 5 support

3 participants