Possibility to remove ServiceProviders in Sage10?

Hello,

we’re currently evaluating Sage10 for a new project. Is it possible to remove Service Providers that have been hardwired into Roots/Acorn?

In our specific case this is to remove the Blade and resources/views logic in favour of the traditional WordPress way.

As I currently understand, this is not possible, since Roots\Acorns\Concerns\Application does not support it.

What is your end goal, exactly?

As of right now, you could simply change the file extensions from .blade.php to .php as well as change the syntax, and it should work as expected. For things such as the search form, comments template, etc. – you can remove_filter() the following filters.

To remove the SageServiceProvider entirely, you can simply remove functions.php#L66.

For this specific project, we’re using a child theme and only overwrite a couple of files. Most aren’t even root level template files (archive.php, single.php) but loaded in the parent via get_template_part().

The problem with having Sage10 in the Child Theme is, that it does not load any of the parent’s template files. I’m assuming this is due to the way it hooks in the parts locating template files and overwriting this by using the rendered Blade templates.

Hence, I thought removing this part would get me back my parent theme’s original template files.

We’ve had very good results on a former project with Sage9, I like the use of Laravel Mix, collect() and such, so I thought it was a good idea to use Sage10 for this child theme project as well.

Is your project updated to the latest Sage 10 commit as well as using the latest Acorn? @QWp6t would have to verify as I am not at my computer to test– but child themes should be working properly as of a few weeks ago.

roots/sage is on 10.0.0-dev, last commit 4 days ago
roots/acorn is required as dev-master in composer.json

These are the latest, right?

Commenting sage/functions.php at 10.0.0-dev · roots/sage · GitHub out throws this fatal error:

Fatal error: Uncaught ReflectionException: Class blade.compiler does not exist in /var/www/html/wp-content/themes/sage/vendor/illuminate/container/Container.php:790 Stack trace: #0 /var/www/html/wp-content/themes/sage/vendor/illuminate/container/Container.php(790): ReflectionClass->__construct(‘blade.compiler’) #1 /var/www/html/wp-content/themes/sage/vendor/illuminate/container/Container.php(667): Illuminate\Container\Container->build(‘blade.compiler’) #2 /var/www/html/wp-content/themes/sage/vendor/illuminate/container/Container.php(615): Illuminate\Container\Container->resolve(‘blade.compiler’, Array) #3 /var/www/html/wp-content/themes/sage/vendor/roots/acorn/src/Acorn/Application.php(278): Illuminate\Container\Container->make(‘blade.compiler’, Array) #4 /var/www/html/wp-content/themes/sage/vendor/illuminate/container/Container.php(1229): Roots\Acorn\Application->make(‘blade.compiler’) #5 /var/www/html/wp-content/themes/sage/vendor/illuminate/support/Facades/Facade.php(175): Illuminate\Container\Container->offsetGet('bla in /var/www/html/wp-content/themes/sage/vendor/illuminate/container/Container.php on line 790

All files in sage/resources/views/* removed.

Will give me these results:

The parent is wordpress-theme-atomion

This topic was automatically closed after 42 days. New replies are no longer allowed.