azine / azinemailgunwebhooksbundle Goto Github PK
View Code? Open in Web Editor NEWSymfony Bundle to easily capture feedback from mailgun.com via their provided webhooks
License: MIT License
Symfony Bundle to easily capture feedback from mailgun.com via their provided webhooks
License: MIT License
With a move to a PHP 7 code-base, we can also move to PHPunit ^6.0.
Are people still actively using PHP 5?
PHP Warning: Invalid argument supplied for foreach() in
...Azine/MailgunWebhooksBundle/Entity/MailgunEvent.php on line 36
The json_decode returns objects by default. json_decode($json, true)
will return as an associative array.
The current routing definitions trigger deprecation notices in Symfony 2.8 as you can see below
DEPRECATED - The "pattern" option in file "/path/to/app/vendor/azine/mailgunwebhooks-bundle/Azine/MailgunWebhooksBundle/Resources/config/routing/mailgunevent_webhook.yml" is deprecated since version 2.2 and will be removed in 3.0. Use the "path" option in the route definition instead.
Simply replacing all occurrences of pattern
with path
should do the trick.
Auto-registration of the command "Azine\MailgunWebhooksBundle\Command\DeleteOldEntriesCommand" is deprecated since Symfony 3.4
it's an easy fix though. They can be autoconfigured (with Symfony 3.3+) or for backward compatibility, added to the services.yml file and tagged tags: ['console.command']
.
With services in 3.4/4.0+ also being made private by default, it may also be good to convert the commad from extends ContainerAwareCommand
to a service (extends Command
), and injecting requirements in the constructor, instead of $this->getContainer()->get('azine_mailgun.service');
(in getMailgunService()
).
The commands should no longer extend ContainerAwareCommand, but be converted to "normal" services with their dependencies injected in the constructor.
Also see #15 (comment)
PS: PRs are welcome.
scrutinizer & coverage badges go to the same URL.
Do you have any plan to update this bundle so that it can be used in Symfony 6, Php 8.1?
Symfony 3+ changed app/console
to bin/console
and router:debug
to debug:router
.
So
php app/console router:debug -e prod | grep mailgunevent_webhook
should be
php bin/console debug:router -e prod | grep mailgunevent_webhook
While developing some emails to be sent from my application, I sent an email from dev that was sent through Mailgun, and so generated an event.
However, the bundle attempted to insert the string 'Unknown' into the 'country' field (and would have tried to do the same for 'region'). 'Country' has a DB length of 2 characters, 'region' has a length of 4. In the events documentation, one example 'region' is also given as 'Texas' (for the 'opened' event).
As of Symfony Flex, directly requiring symfony/symfony
does not work anymore. Instead, you should require only exactly the components you need, e.g. symfony/routing
, symfony/translation
and so on.
Otherwise - and this is currently the case - this bundle won't work with Symfony Flex and/or Symfony 4.
No whitelist configured, no code coverage will be generated
. Moving the code files into a sub-directory allows for easier phpunit.xml configuration, and tidy up the root of the project. Tests/
can stay in the root.
Migrating to PSR-4 style loading is also best practice, but any changes there should be transparent with the use of Composer.
After I updated to the latest version, every pages throws this exception:
An exception has been thrown during the rendering of a template ("Invalid resource provided: "1.2"; Errors: [ERROR 1867] Element '{urn:oasis:names:tc:xliff:document:1.2} source', attribute 'state': The attribute 'state' is not allowed. (in /home/.../web/ - line 14, column 0)
The Xliff schema does mention 'state', but it's not on source
, its on the next element - target
.
Also: #18 (comment)
'dropped' is not listed as a known event-type in DeleteOldEntriesCommand.php (help text, and array_search
).
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.