genxbe / kirby3-ray Goto Github PK
View Code? Open in Web Editor NEWHelper tool that enables ray on all the extendable methods.
License: MIT License
Helper tool that enables ray on all the extendable methods.
License: MIT License
also see
spatie/ray#426
march 26: v2
https://github.com/spatie/macroable/releases
you might need to
composer require spatie/macroable:1.0.1
fot php 7 support.
Hi there,
after installing of
genxbe/kirby3-ray v1.0.5
getkirby/cms v3.7.0.2
i am getting the following error when accessing the website (localhost, localhost/panel)
Fatal error: Cannot redeclare dump() (previously declared in /var/www/vendor/symfony/var-dumper/Resources/functions/dump.php:18) in /var/www/kirby/config/helpers.php on line 114
when i deinstall genxbe/kirby3-ray
with composer remove genxbe/kirby3-ray
no error is shown and everything works as expected
Sorry for the cheeky title. PR #3 introduced an error when handling errors.
To reproduce:
<?= 'test'->slug() ?>
in the default.php
template."Uncaught TypeError: Spatie\Ray\Ray::exception(): Argument #1 ($exception) must be of type Exception, Error given, called in /site/plugins/kirby3-ray/index.php on line 56
It seems like you get an Error
instead of an Exception
from the hook and Ray doesn't like that. Disabling the plugin or downgrading to 1.0.1 works.
Maybe add a get_class($exception)
check?
I'm getting errors when using this plugin icw PHP 8.2:
Fatal error: Uncaught Whoops\Exception\ErrorException: mb_convert_encoding(): Handling HTML entities via mbstring is deprecated; use htmlspecialchars, htmlentities, or mb_encode_numericentity/mb_decode_numericentity instead in .../starterkit.test/site/plugins/kirby3-ray/vendor/symfony/var-dumper/Dumper/HtmlDumper.php on line 963
.
Probably related to symfony/symfony#44281 ?
Looking at the ray docs, you can disable the ray()
call as well, with ray()->disable()
- https://spatie.be/docs/ray/v1/usage/framework-agnostic-php-project#enabling--disabling-ray
I think it would be nice to disable that as well with this plugin. The only question is how exactly:
system.loadPlugins:after
index.php
file, something like:if (!option('debug') || !option('genxne.kirby-ray.enabled')){ ray()->disable(); }
perhaps even other way (put it to your custom class?)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.