Git Product home page Git Product logo

laravel-sendgrid-webhooks's People

Contributors

kitbrennan90 avatar mrobles-cedesa avatar orclyx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

laravel-sendgrid-webhooks's Issues

Unneeded sendgrid/sendgrid in composer.json

If I'm not mistaken the "sendgrid/sendgrid" that is required in the composer.json isn't used anyway. To keep the package light, I think it whould be a good idea to remove it.

Remove update_category_column_to_array migration

We have a migration to change the table structure in 1.1.0. In order to ensure people can still run migrations when they upgrade from 1.* (including 1.0 before the migration), we should keep the migration in place in 2.*, but then remove the migration and update initial table creation in 3.*.

Send Laravel event when webhook received

It would be super useful to be able to fire a Laravel event that the library user's application can listen to whenever a new Sendgrid webhook is received.

For example, this would allow a user to save to their own analytics software whenever an email is opened.

[BUG] Category Index

DESCRIPTION:
InnoDB has a limitation of 768 bytes per index key and you won't be able to create an index longer than that.

ERROR 1:
SQLSTATE[42000]: Syntax error or access violation: 1170 BLOB/TEXT column 'categories' used in key specification without a key length

FILE: UpdateCategoryColumnToArray

 Schema::table('sendgrid_webhook_events', function (Blueprint $table) {
            $table->jsonb('categories')->default(json_encode([]))->index();
        });

DESCRIPTION:
MySql does not support JSON type

ERROR 2:
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'json) wherecategoryis not null' at line 1

FILE: UpdateCategoryColumnToArray

 default: {
                DB::table('sendgrid_webhook_events')
                    ->whereNotNull('category')
                    ->update(['categories' => DB::raw("CAST(concat('[\"', category, '\"]') AS json)")]);
                break;

Refactor logging into separate class and write unit tests

Currently our logging sits within the library's controller which is leading to a bit of bloat, especially if we decide to add more events later. We should move the logging into a separate class and write unit tests for this class specifically.

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.