getherbert / framework Goto Github PK
View Code? Open in Web Editor NEWCore Framework
Home Page: http://getherbert.com/
Core Framework
Home Page: http://getherbert.com/
I was thinking, it might be worth moving the autoloading system for plugins (https://github.com/getherbert/framework/blob/dev/bootstrap/autoload.php#L26) into the base class it's self. Or even into a loader class (preferably).
This can be called when Herbert::getInstance(); is called for the first time.
Just sort of gets rid of this gumpf and puts it somewhere it actually belongs.
Hi,
I encountered a problem when setting up routes on a Wordpress installation that has the FORCE_SSL_ADMIN flag set to true.
If I want to use a route in an ajax script fetching the url with the route_url()
method it will always use the protocol of the public site even though i'm calling it from admin. That's an issue because browsers will not allow that:
Mixed Content: The page at 'https://localhost/wp-admin/admin.php?page=testPage' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://localhost/testRoute'. This request has been blocked; the content must be served over HTTPS.
I'm not sure this is a good solution but fixed this in a forked version by changing the return statement of the Router::url()
method like so:
Do you think this is a sustainable solution? I can send a pull request if you would like?
Thanks and what great lib btw!
Hi,
I just recently started using this framework, and it is looking promising.
I did however notice one thing and I am not sure if this is by deign: on every page load, the rewrite rules are being flushed. Technically, this is only really needed at plugin activation.
Is there a reason for this? (Router -> construct -> add_action('wp_loaded', [$this, 'flush']);)
https://github.com/getherbert/framework/blob/dev/Herbert/Framework/Application.php#L12
composer install
Fatal error: Class Herbert\Framework\Application contains 3 abstract methods
and must therefore be declared abstract or implement the remaining methods
(Illuminate\Contracts\Foundation\Application::runningInConsole,
Illuminate\Contracts\Foundation\Application::runningUnitTests,
Illuminate\Contracts\Foundation\Application::getCachedPackagesPath) in
.../vendor/getherbert/framework/Herbert/Framework/Application.php on line 12
hi seems that laravel has done a update and now basePath function in Herbert\Framework\Application is required.
to fix define exact version of illuminate or just add the function ;-)
Could you explain what this function does, especially the variable variable $$x ?
https://github.com/getherbert/framework/blob/dev/Herbert/Framework/Application.php#L170
@jeremyzahner can you take a look #25 please?
When I want to redirect to the route name, in array $routes = $this->routes['named'];
,
I have key like GET::MyPlugin::name
and searching function isnt assume Namespace.
if ( ! isset($routes[$method . '::' . $name]))
{
continue;
}
The framework needs to be updated for PHP 8.
No updates on this guys?
in wp-config.php
define('DB_CHARSET', 'utf8mb4');
define('DB_COLLATE', '');
herberit will use 'utf8_general_ci collate, but it is not matched with utf8mb4 charset,
Mysql error occurs
protected function registerEloquent()
{
global $wpdb;
$capsule = new Capsule($this->app);
$capsule->addConnection([
'driver' => 'mysql',
/*
'host' => DB_HOST,
'database' => DB_NAME,
'username' => DB_USER,
'password' => DB_PASSWORD,
'charset' => DB_CHARSET,
'collation' => DB_COLLATE ?: 'utf8_general_ci',
*/
'host' => $wpdb->dbhost,
'database' => $wpdb->dbname,
'username' => $wpdb->dbuser,
'password' => $wpdb->dbpassword,
'charset' => $wpdb->charset,
'collation' => $wpdb->collate,
'prefix' => $wpdb->prefix
]);
....
}
Hi everyone
if someone can explain me this code maybe I can to fix it with PHP8
thank you
Experienced
Syntax error or access violation: 1253 COLLATION 'utf8_unicode_ci' is not valid for CHARACTER SET 'utf8mb4'
error with the current 'utf8_unicode_ci' collation specified in registerEloquent.
Only managed to get plugin to activate by changing it to 'utf8mb4_unicode_ci'
Can this be exposed as a config option to the developer instead of hard coded?
Hi guys! Could you help me? When I try to activate plugin I get this error:
Fatal error: Declaration of Herbert\Framework\Application::make() must be compatible with Illuminate\Contracts\Container\Container::make($abstract, array $parameters = Array) in /var/www/spinazdorov/htdocs/wp-content/plugins/Klinocs3/vendor/getherbert/framework/Herbert/Framework/Application.php on line 8
http://joxi.ru/Y2L8gpEfO8z926
Unfortunatly, I don't understand how fix it. Tell me please, how could I fix it?
May be I do something wrong ?
Thanks!
UPD: Sorry,I wanted to write here https://github.com/getherbert/herbert/tree/rewrite
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.