-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Mailchimp Mailer Bridge: undefined index: _id when sending an email #34597
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mailchimp Mailer Bridge: undefined index: _id when sending an email #34597
Conversation
* 4.4: [Process] fix typo in tests
* 4.4: [PhpUnitBridge] fix undefined variables
* 4.4: [PhpUnitBridge] more fixes for PHP 5.5
* 4.4: [HttpKernel] fix merge fix tests [HttpClient] fix throwing HTTP exceptions when the 1st chunk is emitted
* 4.4: fix merge
* 4.4: cleanup fix tests
This PR was merged into the 5.0-dev branch. Discussion ---------- [TwigBundle] fix accessing service arguments | Q | A | ------------- | --- | Branch? | master | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | | License | MIT | Doc PR | Commits ------- 6233cce fix accessing service arguments
* 4.4: [Cache] skip igbinary on PHP 7.4.0
* 4.4: [travis] checkout previous major and test with patched components on deps=high
* 4.4: [travis] install from dist except for selected components
* 4.4: [FrameworkBundle] fix tests fix typo
* 4.4: [travis] fix testing flipped versions [travis] honor .gitattributes when building local packages
* 4.3: [travis] fix CI
* 4.4: [travis] fix CI
* 4.4: [Twig] Remove deprecated tag usage
* 4.4: [travis] fix typo [travis] more CI fixes
* 4.4: [Security/Http] fix typo in deprecation message [Security] Deprecate isGranted()/decide() on more than one attribute Fixed a minor typo in the UPGRADE to 5.0 guide Various tweaks 3.4 Various tweaks 4.3 [Security] Make stateful firewalls turn responses private only when needed [PhpUnit] Fix usleep mock return value Revert \"feature symfony#33507 [WebProfiler] Deprecated intercept_redirects in 4.4 (dorumd)\" [TwigBundle] typo [TwigBundle] fix test case [Lock] use Predis\ClientInterface instead of Predis\Client Allow Twig 3 Minor tweaks Fix version typo in deprecation notice [Form][SubmitType] Add "validate" option hint to the --parse-tags when parsing tags fails Make legacy "wrong" RFC2047 encoding apply only to one header
* 4.4: [Routing] fix bad fix
This PR was merged into the 5.0-dev branch. Discussion ---------- [Security] remove deprecated code paths | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | | License | MIT | Doc PR | Commits ------- 2b6ce01 remove deprecated code paths
This PR was merged into the 5.0-dev branch. Discussion ---------- [Security] remove tests for legacy behavior | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | | License | MIT | Doc PR | Commits ------- 4e0f034 remove tests for legacy behavior
…an abstract unit system
…rings management with an abstract unit system (nicolas-grekas, hhamon, gharlan) This PR was merged into the 5.0-dev branch. Discussion ---------- [String] a new component for object-oriented strings management with an abstract unit system | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - This is a reboot of symfony#22184 (thanks @hhamon for working on it) and a generalization of my previous work on the topic ([patchwork/utf8](https://github.com/tchwork/utf8)). Unlike existing libraries (including `patchwork/utf8`), this component provides a unified API for the 3 unit systems of strings: bytes, code points and grapheme clusters. The unified API is defined by the `AbstractString` class. It has 2 direct child classes: `BinaryString` and `AbstractUnicodeString`, itself extended by `Utf8String` and `GraphemeString`. All objects are immutable and provide clear edge-case semantics, using exceptions and/or (nullable) types! Two helper functions are provided to create such strings: ```php new GraphemeString('foo') == u('foo'); // when dealing with Unicode, prefer grapheme units new BinaryString('foo') == b('foo'); ``` `GraphemeString` is the most linguistic-friendly variant of them, which means it's the one ppl should use most of the time *when dealing with written text*. Future ideas: - improve tests - add more docblocks (only where they'd add value!) - consider adding more methods in the string API (`is*()?`, `*Encode()`?, etc.) - first class Emoji support - merge the Inflector component into this one - use `width()` to improve `truncate()` and `wordwrap()` - move method `slug()` to a dedicated locale-aware service class - propose your ideas (send PRs after merge) Out of (current) scope: - what [intl](https://php.net/intl) provides (collations, transliterations, confusables, segmentation, etc) Here is the unified API I'm proposing in this PR, borrowed from looking at many existing libraries, but also Java, Python, JavaScript and Go. ```php function __construct(string $string = ''); static function unwrap(array $values): array static function wrap(array $values): array function after($needle, bool $includeNeedle = false, int $offset = 0): self; function afterLast($needle, bool $includeNeedle = false, int $offset = 0): self; function append(string ...$suffix): self; function before($needle, bool $includeNeedle = false, int $offset = 0): self; function beforeLast($needle, bool $includeNeedle = false, int $offset = 0): self; function camel(): self; function chunk(int $length = 1): array; function collapseWhitespace(): self function endsWith($suffix): bool; function ensureEnd(string $suffix): self; function ensureStart(string $prefix): self; function equalsTo($string): bool; function folded(): self; function ignoreCase(): self; function indexOf($needle, int $offset = 0): ?int; function indexOfLast($needle, int $offset = 0): ?int; function isEmpty(): bool; function join(array $strings): self; function jsonSerialize(): string; function length(): int; function lower(): self; function match(string $pattern, int $flags = 0, int $offset = 0): array; function padBoth(int $length, string $padStr = ' '): self; function padEnd(int $length, string $padStr = ' '): self; function padStart(int $length, string $padStr = ' '): self; function prepend(string ...$prefix): self; function repeat(int $multiplier): self; function replace(string $from, string $to): self; function replaceMatches(string $fromPattern, $to): self; function slice(int $start = 0, int $length = null): self; function snake(): self; function splice(string $replacement, int $start = 0, int $length = null): self; function split(string $delimiter, int $limit = null, int $flags = null): array; function startsWith($prefix): bool; function title(bool $allWords = false): self; function toBinary(string $toEncoding = null): BinaryString; function toGrapheme(): GraphemeString; function toUtf8(): Utf8String; function trim(string $chars = " \t\n\r\0\x0B\x0C\u{A0}\u{FEFF}"): self; function trimEnd(string $chars = " \t\n\r\0\x0B\x0C\u{A0}\u{FEFF}"): self; function trimStart(string $chars = " \t\n\r\0\x0B\x0C\u{A0}\u{FEFF}"): self; function truncate(int $length, string $ellipsis = ''): self; function upper(): self; function width(bool $ignoreAnsiDecoration = true): int; function wordwrap(int $width = 75, string $break = "\n", bool $cut = false): self; function __clone(); function __toString(): string; ``` `AbstractUnicodeString` adds these: ```php static function fromCodePoints(int ...$codes): self; function ascii(array $rules = []): self; function codePoint(int $index = 0): ?int; function folded(bool $compat = true): parent; function normalize(int $form = self::NFC): self; function slug(string $separator = '-'): self; ``` and `BinaryString`: ```php static function fromRandom(int $length = 16): self; function byteCode(int $index = 0): ?int; function isUtf8(): bool; function toUtf8(string $fromEncoding = null): Utf8String; function toGrapheme(string $fromEncoding = null): GraphemeString; ``` Case insensitive operations are done with the `ignoreCase()` method. e.g. `b('abc')->ignoreCase()->indexOf('B')` will return `1`. For reference, CLDR transliterations (used in the `ascii()` method) are defined here: https://github.com/unicode-org/cldr/tree/master/common/transforms Commits ------- dd8745a [String] add more tests 82a0095 [String] add tests 012e92a [String] a new component for object-oriented strings management with an abstract unit system
…sseur) This PR was merged into the 5.0-dev branch. Discussion ---------- [Security] Fix isGranted with object attribute | Q | A | ------------- | --- | Branch? | master (the added test could be backported to older branches) | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | symfony#33697 (comment) | License | MIT | Doc PR | Fix calls to isGranted with `$attribute` beeing an object. Commits ------- 3a5fd48 Fix isGranted with object attribute
* 4.4: (28 commits) [FrameworkBundle] Fix framework bundle lock configuration not working as expected [Validator] Add the missing translations for the Azerbaijani locale [HttpClient] workaround bad Content-Length sent by old libcurl [Cache] dont override native Memcached options Fix CS Fix exceptions (PDOException) error code type [ErrorHandler] fix return-type patching logic [Messenger] Added support for `from_transport` attribute on `messenger.message_handler` tag [ErrorHandler] don't throw deprecations for return-types by default ensure legacy event dispatcher compatibility ensure legacy event dispatcher compatibility Fix return type of Process::restart(). [Cache] fail gracefully when locking is not supported [HttpKernel] compress files generated by the profiler tweak deprecation messages and changelog fix version in @deprecated annotation Use VarCloner data instead of legacy array for query params [Security] use LegacyEventDispatcherProxy [HttpClient] fix undefined index access [HttpClient] fix race condition when reading response with informational status ...
…(fancyweb) This PR was merged into the 5.0 branch. Discussion ---------- [Routing] Fix ContainerLoader and ObjectLoaderTest | Q | A | ------------- | --- | Branch? | master | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - Commits ------- 0e5db6a [Routing] Fix ContainerLoader and ObjectLoaderTest
This PR was merged into the 5.0 branch. Discussion ---------- Allow PHP ^7.2.5 | Q | A | ------------- | --- | Branch? | 5.0 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | Fix symfony#34442 | License | MIT | Doc PR | - Let's what the CI says. Will need tagging all contracts as v2.0.1 after merge. Commits ------- 6194c2a Allow PHP ^7.2.5
* 4.4: [Routing] fix tests [Form] group constraints when calling the validator Remove wrong @group legacy annotations [DependencyInjection] Fix dumping multiple deprecated aliases allow button names to start with uppercase letter States that the HttpClient provides a Http Async implementation
* 5.0: [Routing] fix tests [DI] minor cleanup [Form] group constraints when calling the validator Remove wrong @group legacy annotations [DependencyInjection] Fix dumping multiple deprecated aliases allow button names to start with uppercase letter Allow PHP ^7.2.5 States that the HttpClient provides a Http Async implementation [Routing] Fix ContainerLoader and ObjectLoaderTest [HttpKernel] Make ErrorListener::onKernelException()'s dispatcher argument explicit [HttpKernel] Drop deprecated ExceptionListener Removed extra whitespace [Security] Fix best encoder not wired using migrate_from
…essageEvent (chapa) This PR was squashed before being merged into the 5.1-dev branch (closes symfony#34475). Discussion ---------- [Mailer] Add UPGRADE entries about Envelope and MessageEvent * Class `SmtpEnvelope` has been renamed to `Envelope` in symfony#33562 * A required `$transport` argument has been added to `MessageEvent` in symfony#32927 | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | N/A | License | MIT | Doc PR | already up-to-date Commits ------- 7baa295 [Mailer] Add UPGRADE entries about Envelope and MessageEvent
…n + better default message in case it is not set
…hod (koenreiniers) This PR was squashed before being merged into the 5.1-dev branch (closes symfony#34457). Discussion ---------- Added context to exceptions thrown in apply method | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes <!-- please update src/**/CHANGELOG.md files --> | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tickets | | License | MIT | Doc PR | During the workflow and state machines workshop at SymfonyCon, we noticed that the context in the apply method was not passed to the exceptions that are thrown. This could prove to be convenient for debugging purposes. Commits ------- 8f86c33 Added context to exceptions thrown in apply method
…e when blocking a transition + better default message in case it is not set (lyrixx) This PR was merged into the 5.1-dev branch. Discussion ---------- [DX] [Workflow] Added a way to specify a message when blocking a transition + better default message in case it is not set | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | Fix symfony#34466 | License | MIT | Doc PR | Commits ------- 169bb2f [Workflow] Added a way to specify a message when blocking a transition + better default message in case it is not set
… (PHP 7.4) (dunglas) This PR was squashed before being merged into the 5.1-dev branch (closes symfony#34557). Discussion ---------- [PropertyInfo] Add support for typed properties (PHP 7.4) | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tickets | n/a <!-- prefix each issue number with "Fix #", if any --> | License | MIT | Doc PR | n/a Add support for [typed properties](https://wiki.php.net/rfc/typed_properties_v2), a new feature introduced in PHP 7.4: ```php class Foo { public Bar $bar; private ?bool $nullableBoolProp; } $this->extractor->getTypes(Foo::class, 'bar'); // Type[] $this->extractor->getTypes(Foo::class, 'nullableBoolProp'); // Type[] ``` #SymfonyHackday Commits ------- 7edfe4f [PropertyInfo] Add support for typed properties (PHP 7.4)
…altsov) This PR was squashed before being merged into the 5.1-dev branch (closes symfony#32937). Discussion ---------- [Routing] Deprecate RouteCollectionBuilder | Q | A | ------------- | --- | Branch? | 5.1 | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | yes | Tests pass? | yes | Fixed tickets | symfony#32240 | License | MIT | Doc PR | symfony/symfony-docs#12688 | Recipe PR | symfony/recipes#690 A lot to be done here after the implementation is accepted: - [x] finish deprecations in the MicroKernelTrait - [x] deprecate the class - [x] mention in the CHANGELOG file - [x] mention in the UPGRADE file - [x] mark tests as legacy - [x] add a doc PR - [x] update the recipe Ping @Tobion , @nicolas-grekas . Commits ------- e641cbd [Routing] Deprecate RouteCollectionBuilder
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Can you change the target branch to 4.4 instead?
@@ -52,6 +52,7 @@ protected function doSendHttp(SentMessage $message): ResponseInterface | |||
]); | |||
|
|||
$result = $response->toArray(false); | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you revert this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Absolutely!
let me just create another PR. |
When I set the DSN:
MAILER_DSN=mandrill://KEY@default
and try to send an email:
it returns an exception:
Stacktrace:
The fix, how does it work:
According to documentation, the endpoint
https://mandrillapp.com/api/1.0/messages/send-raw.json
returns an array of results in case of success:in case of an error:
The fix just sets the right message id.