Skip to content

Commit

Permalink
Acorn v2.0.0 (Laravel 8.x) (#84)
Browse files Browse the repository at this point in the history
* feat(deps): Update to Laravel 8.x
* fix(container): Properly configure path bindings on container (Fixes #82, Supersedes #83)
* refactor(acorn): Add required bindings from `Illuminate\Foundation` to codebase
* refactor(acorn): Remove hardcoded Foundation logic from Acorn's codebase
* refactor(acorn): Reimplement various classes to properly extend Foundation bindings as-needed
* feat(acorn): Add lazy-loading support for services
* enhance(exceptions): Improve Whoops/Exceptions implementation
* enhance(console): Improve WP_CLI implementation
* chore(console): Remove unnecessary console helper traits
  • Loading branch information
Log1x authored Feb 3, 2021
1 parent 8053a45 commit d942dd9
Show file tree
Hide file tree
Showing 41 changed files with 1,318 additions and 1,127 deletions.
46 changes: 0 additions & 46 deletions .circleci/config.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
/.circleci export-ignore
/.github export-ignore
/.gitattributes export-ignore
49 changes: 49 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Main

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
php:
name: PHP ${{ matrix.php }}
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[ci skip]')"
strategy:
matrix:
php: ["7.3", "7.4", "8.0"]

steps:
- name: Checkout the project
uses: actions/checkout@v2

- name: Setup the PHP ${{ matrix.php }} environment on ${{ runner.os }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: xdebug
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Restore the Composer cache directory
id: composercache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- uses: actions/cache@v2
with:
path: ${{ steps.composercache.outputs.dir }}
key: ${{ runner.os }}-${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-${{ matrix.php }}-composer-

- name: Install Composer dependencies
run: composer install --no-progress --prefer-dist --optimize-autoloader --no-suggest

- name: Execute the Composer lint script
run: composer run-script lint

- name: Execute the Composer test script
run: composer run-script lint
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# [Acorn](https://roots.io/acorn/)

[![Packagist](https://img.shields.io/packagist/vpre/roots/acorn.svg?style=flat-square)](https://packagist.org/packages/roots/acorn)
[![Build Status](https://img.shields.io/circleci/build/gh/roots/acorn?style=flat-square)](https://circleci.com/gh/roots/acorn)
![Build Status](https://img.shields.io/github/workflow/status/roots/acorn/Main)
[![Follow Roots](https://img.shields.io/twitter/follow/rootswp.svg?style=flat-square&color=1da1f2)](https://twitter.com/rootswp)

Acorn is a lazy-loaded framework for building WordPress plugins.
Expand All @@ -14,8 +14,8 @@ Contributions are welcome from everyone. We have [contributing guidelines](https

Keep track of development and community news.

* Participate on the [Roots Discourse](https://discourse.roots.io/)
* Follow [@rootswp on Twitter](https://twitter.com/rootswp)
* Read and subscribe to the [Roots Blog](https://roots.io/blog/)
* Subscribe to the [Roots Newsletter](https://roots.io/subscribe/)
* Listen to the [Roots Radio podcast](https://roots.io/podcast/)
- Participate on the [Roots Discourse](https://discourse.roots.io/)
- Follow [@rootswp on Twitter](https://twitter.com/rootswp)
- Read and subscribe to the [Roots Blog](https://roots.io/blog/)
- Subscribe to the [Roots Newsletter](https://roots.io/subscribe/)
- Listen to the [Roots Radio podcast](https://roots.io/podcast/)
2 changes: 1 addition & 1 deletion acorn.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Plugin Name: Acorn
* Plugin URI: https://roots.io/acorn
* Description: Lazy-loaded framework for WordPress themes and plugins
* Version: 1.0.0
* Version: 2.0.0
* Author: Roots
* Author URI: https://roots.io
* License: MIT
Expand Down
20 changes: 10 additions & 10 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@
}
},
"require": {
"php": "^7.2.5",
"php": "^7.3|^8.0",
"ext-json": "*",
"ext-mbstring": "*",
"illuminate/cache": "^8.0",
"illuminate/config": "^8.0",
"illuminate/console": "^8.0",
Expand All @@ -50,26 +51,25 @@
"illuminate/support": "^8.0",
"illuminate/view": "^8.0",
"league/flysystem": "^1.0",
"ramsey/uuid": "^4.0",
"roots/support": "dev-master",
"symfony/error-handler": "^5.0",
"symfony/var-dumper": "^5.1"
"ramsey/uuid": "^4.1",
"roots/support": "^1.0",
"symfony/error-handler": "^5.2",
"symfony/var-dumper": "^5.2",
"vlucas/phpdotenv": "^5.2"
},
"require-dev": {
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",
"filp/whoops": "^2.7",
"filp/whoops": "^2.9",
"mikey179/vfsstream": "^1.6",
"phpcompatibility/php-compatibility": "^9.3",
"phpunit/phpunit": "^8.4|^9.0",
"phpunit/phpunit": "^8.5.8|^9.3.3",
"roave/security-advisories": "dev-master",
"squizlabs/php_codesniffer": "^3.5"
},
"suggest": {
"filp/whoops": "Required for friendly error pages in development (^2.0)."
"filp/whoops": "Required for friendly error pages in development (^2.9)."
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
},
"minimum-stability": "dev",
Expand Down
118 changes: 75 additions & 43 deletions config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
|
*/

'name' => env('APP_NAME', get_bloginfo('name')),
'name' => env('APP_NAME', 'Acorn'),

/*
|--------------------------------------------------------------------------
Expand All @@ -24,7 +24,7 @@
|
| This value determines the "environment" your application is currently
| running in. This may determine how you prefer to configure various
| services your application utilizes. Set this in your ".env" file.
| services the application utilizes. Set this in your ".env" file.
|
*/

Expand Down Expand Up @@ -56,19 +56,6 @@

'timezone' => get_option('timezone_string', 'UTC'),

/*
|--------------------------------------------------------------------------
| Preflight Checks
|--------------------------------------------------------------------------
|
| This value allows service providers to execute preflight tasks after
| booting. These tasks include creating directories, databases, and files,
| or doing any other checks to ensure the service is functional.
|
*/

'preflight' => env('WP_ENV', 'production') !== 'production',

/*
|--------------------------------------------------------------------------
| Global Helpers
Expand Down Expand Up @@ -108,6 +95,21 @@

'fallback_locale' => 'en',

/*
|--------------------------------------------------------------------------
| Encryption Key
|--------------------------------------------------------------------------
|
| This key is used by the Illuminate encrypter service and should be set
| to a random, 32 character string, otherwise these encrypted strings
| will not be safe. Please do this before deploying an application!
|
*/

'key' => env('APP_KEY'),

'cipher' => 'AES-256-CBC',

/*
|--------------------------------------------------------------------------
| Autoloaded Service Providers
Expand All @@ -120,15 +122,42 @@
*/

'providers' => [

/*
* Laravel Framework Service Providers...
*/
// Illuminate\Auth\AuthServiceProvider::class,
// Illuminate\Broadcasting\BroadcastServiceProvider::class,
Illuminate\Bus\BusServiceProvider::class,
Illuminate\Cache\CacheServiceProvider::class,
// Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class,
// Illuminate\Cookie\CookieServiceProvider::class,
// Illuminate\Database\DatabaseServiceProvider::class,
// Illuminate\Encryption\EncryptionServiceProvider::class,
Illuminate\Filesystem\FilesystemServiceProvider::class,
// Illuminate\Foundation\Providers\FoundationServiceProvider::class,
// Illuminate\Hashing\HashServiceProvider::class,
// Illuminate\Mail\MailServiceProvider::class,
// Illuminate\Notifications\NotificationServiceProvider::class,
// Illuminate\Pagination\PaginationServiceProvider::class,
// Illuminate\Pipeline\PipelineServiceProvider::class,
// Illuminate\Queue\QueueServiceProvider::class,
// Illuminate\Redis\RedisServiceProvider::class,
// Illuminate\Auth\Passwords\PasswordResetServiceProvider::class,
// Illuminate\Session\SessionServiceProvider::class,
// Illuminate\Translation\TranslationServiceProvider::class,
// Illuminate\Validation\ValidationServiceProvider::class,
Illuminate\View\ViewServiceProvider::class,

/*
* Package Service Providers
* Package Service Providers...
*/
// ExamplePackage\Providers\ExamplePackageServiceProvider::class,

/*
* Application Service Providers
* Application Service Providers...
*/
// App\Providers\AppServiceProvider::class,
App\Providers\ThemeServiceProvider::class,

],

/*
Expand All @@ -143,41 +172,44 @@
*/

'aliases' => [

'App' => Illuminate\Support\Facades\App::class,
'Arr' => Illuminate\Support\Arr::class,
'Artisan' => Illuminate\Support\Facades\Artisan::class,
'Auth' => Illuminate\Support\Facades\Auth::class,
// 'Artisan' => Illuminate\Support\Facades\Artisan::class,
// 'Auth' => Illuminate\Support\Facades\Auth::class,
'Blade' => Illuminate\Support\Facades\Blade::class,
'Broadcast' => Illuminate\Support\Facades\Broadcast::class,
// 'Broadcast' => Illuminate\Support\Facades\Broadcast::class,
'Bus' => Illuminate\Support\Facades\Bus::class,
'Cache' => Illuminate\Support\Facades\Cache::class,
'Config' => Illuminate\Support\Facades\Config::class,
'Cookie' => Illuminate\Support\Facades\Cookie::class,
'Crypt' => Illuminate\Support\Facades\Crypt::class,
'DB' => Illuminate\Support\Facades\DB::class,
'Eloquent' => Illuminate\Database\Eloquent\Model::class,
// 'Cookie' => Illuminate\Support\Facades\Cookie::class,
// 'Crypt' => Illuminate\Support\Facades\Crypt::class,
// 'DB' => Illuminate\Support\Facades\DB::class,
// 'Eloquent' => Illuminate\Database\Eloquent\Model::class,
'Event' => Illuminate\Support\Facades\Event::class,
'File' => Illuminate\Support\Facades\File::class,
'Gate' => Illuminate\Support\Facades\Gate::class,
'Hash' => Illuminate\Support\Facades\Hash::class,
'Http' => Illuminate\Support\Facades\Http::class,
'Lang' => Illuminate\Support\Facades\Lang::class,
// 'Gate' => Illuminate\Support\Facades\Gate::class,
// 'Hash' => Illuminate\Support\Facades\Hash::class,
// 'Http' => Illuminate\Support\Facades\Http::class,
// 'Lang' => Illuminate\Support\Facades\Lang::class,
'Log' => Illuminate\Support\Facades\Log::class,
'Mail' => Illuminate\Support\Facades\Mail::class,
'Notification' => Illuminate\Support\Facades\Notification::class,
'Password' => Illuminate\Support\Facades\Password::class,
'Queue' => Illuminate\Support\Facades\Queue::class,
'Redirect' => Illuminate\Support\Facades\Redirect::class,
'Redis' => Illuminate\Support\Facades\Redis::class,
'Request' => Illuminate\Support\Facades\Request::class,
'Response' => Illuminate\Support\Facades\Response::class,
'Route' => Illuminate\Support\Facades\Route::class,
'Schema' => Illuminate\Support\Facades\Schema::class,
'Session' => Illuminate\Support\Facades\Session::class,
// 'Mail' => Illuminate\Support\Facades\Mail::class,
// 'Notification' => Illuminate\Support\Facades\Notification::class,
// 'Password' => Illuminate\Support\Facades\Password::class,
// 'Queue' => Illuminate\Support\Facades\Queue::class,
// 'Redirect' => Illuminate\Support\Facades\Redirect::class,
// 'Redis' => Illuminate\Support\Facades\Redis::class,
// 'Request' => Illuminate\Support\Facades\Request::class,
// 'Response' => Illuminate\Support\Facades\Response::class,
// 'Route' => Illuminate\Support\Facades\Route::class,
// 'Schema' => Illuminate\Support\Facades\Schema::class,
// 'Session' => Illuminate\Support\Facades\Session::class,
'Storage' => Illuminate\Support\Facades\Storage::class,
'Str' => Illuminate\Support\Str::class,
'URL' => Illuminate\Support\Facades\URL::class,
'Validator' => Illuminate\Support\Facades\Validator::class,
// 'URL' => Illuminate\Support\Facades\URL::class,
// 'Validator' => Illuminate\Support\Facades\Validator::class,
'View' => Illuminate\Support\Facades\View::class,

],

];
6 changes: 3 additions & 3 deletions config/assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@
'manifests' => [
'theme' => [
'strategy' => 'relative',
'path' => get_theme_file_path('/dist'),
'uri' => get_theme_file_uri('/dist'),
'manifest' => get_theme_file_path('/dist/mix-manifest.json'),
'path' => get_theme_file_path('/public'),
'uri' => get_theme_file_uri('/public'),
'manifest' => get_theme_file_path('/public/mix-manifest.json'),
]
]
];
Loading

0 comments on commit d942dd9

Please sign in to comment.