Giter Site home page Giter Site logo

framework's People

Contributors

codesman avatar giwrgos88 avatar hadronix avatar jasonagnew avatar jaymcp avatar jeremyzahner avatar onnimonni avatar tormjens avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

framework's Issues

Fatal error: Declaration of Herbert\Framework\Application::make() must be compatible

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

Get URL by router name

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;
            }

Rewrite rules flushed every page load

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']);)

Application class not implementing Illuminate interface

File

https://github.com/getherbert/framework/blob/dev/Herbert/Framework/Application.php#L12

Issue Description

  1. I create a new project using the plugin skeleton at https://github.com/getherbert/herbert
  2. Run composer install
  3. Activate the plugin and see the following error:
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

Using routes for ajax calls from admin when FORCE_SSL_ADMIN is true

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:

74a98ec

Do you think this is a sustainable solution? I can send a pull request if you would like?

Thanks and what great lib btw!

PHP 8

The framework needs to be updated for PHP 8.

Create table error when activing example-plug

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
        ]);
        ....
    }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.