Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Blade implementation #894

Closed
innocenzi opened this issue Feb 21, 2025 · 2 comments · Fixed by #899
Closed

Update Blade implementation #894

innocenzi opened this issue Feb 21, 2025 · 2 comments · Fixed by #899
Labels

Comments

@innocenzi
Copy link
Member

Description

For months, https://github.com/jenssegers/blade has been abandoned. Issues and PRs are not being taken care of, so we should get rid of that dependency.

There are a few options:

  • Fork the package with the required changes
  • Use illuminate/view with a custom bridge
  • Find another Blade package

Benefits

Every time we run some Tempest code that boots that package up, we get deprecation warnings:

Deprecated: Jenssegers\Blade\Blade::__construct(): Implicitly marking parameter $container as nullable is deprecated, the explicit nullable type must be used instead in /Users/enzoinnocenzi/Code/forks/tempest-framework/vendor/jenssegers/blade/src/Blade.php on line 34

This is particularly annoying in tests:

1 test triggered 1 PHP deprecation:

1) /Users/enzoinnocenzi/Code/forks/tempest-framework/vendor/jenssegers/blade/src/Blade.php:34
Jenssegers\Blade\Blade::__construct(): Implicitly marking parameter $container as nullable is deprecated, the explicit nullable type must be used instead

Triggered by:

* Tests\Tempest\Integration\Console\Components\TaskComponentTest::test_no_task
  /Users/enzoinnocenzi/Code/forks/tempest-framework/tests/Integration/Console/Components/TaskComponentTest.php:38

OK, but there were issues!
Tests: 4, Assertions: 8, Deprecations: 1.
 *  Terminal will be reused by tasks, press any key to close it. 
@innocenzi innocenzi changed the title [Feature Request]: Update Blade implementation Update Blade implementation Feb 21, 2025
@brendt brendt added this to the v1.0.0-alpha.6 milestone Feb 22, 2025
@brendt
Copy link
Member

brendt commented Feb 22, 2025

My preference would be this:

Use illuminate/view with a custom bridge

And have it as a separate package, something like tempest/blade or tempest/view-blade. I don't know how much work that would be though.

@brendt
Copy link
Member

brendt commented Feb 22, 2025

Actually, looking at the source of jenssegers/blade, it should be pretty trivial to make our own bridge. In that case, I rather have our own package instead of forking the existing one, starting from a clean slate and including Tempest-specific stuff (initializer, blade config)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants