{"payload":{"feedbackUrl":"https://github.com/orgs/community/discussions/53140","repo":{"id":14871640,"defaultBranch":"main","name":"emogrifier","ownerLogin":"MyIntervals","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2013-12-02T18:58:48.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/28989125?v=4","public":true,"private":false,"isOrgOwned":true},"refInfo":{"name":"","listCacheKey":"v0:1726570628.0","currentOid":""},"activityList":{"items":[{"before":"e5317a25d1acb8584400379aa165cf4cde0ec6b4","after":"479980c4374ceda04fe8030df26175a605380302","ref":"refs/heads/cleanup/query-selector-all","pushedAt":"2024-09-18T00:24:26.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"JakeQZ","name":null,"path":"/JakeQZ","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/15205088?s=80&v=4"},"commit":{"message":"Attempt to get Coveralls comment - reverting invalid change","shortMessageHtmlLink":"Attempt to get Coveralls comment - reverting invalid change"}},{"before":"1b425c8408635225ade851cd22c090eed3cd8b08","after":"e5317a25d1acb8584400379aa165cf4cde0ec6b4","ref":"refs/heads/cleanup/query-selector-all","pushedAt":"2024-09-18T00:23:37.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"JakeQZ","name":null,"path":"/JakeQZ","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/15205088?s=80&v=4"},"commit":{"message":"Attempt to get Coveralls comment by making change","shortMessageHtmlLink":"Attempt to get Coveralls comment by making change"}},{"before":"dbf26c9112f202bcef0829764914e8792fe17835","after":"1b425c8408635225ade851cd22c090eed3cd8b08","ref":"refs/heads/cleanup/query-selector-all","pushedAt":"2024-09-18T00:15:33.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"JakeQZ","name":null,"path":"/JakeQZ","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/15205088?s=80&v=4"},"commit":{"message":"[CLEANUP] Add CssInliner::querySelectorAll method\n\nThis `private` method provides functionality that is used in three separate\nplaces (albeit a one-liner), and includes taking care of exception handling\naccording to the debug mode setting.\n\nThe new method and parameter names match the equivalent in the\n[Web API](\n https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelectorAll\n).\n\nThere will be a tiny performance impact due to additional method calls. But the\nbenefits include code re-use and common error handling.\n\nAlso add `ensureNodeIsElement` method for use with the result from\n`querySelectorAll` to ensure type safety. `querySelectorAll` should always\nreturn a `DOMNodeList` of `DOMElement`s. But this cannot be guaranteed if there\nis a bug in CssSelector whereby it returns an XPath expression which may match\nnon-element nodes. And it would (probably) be sub-optimal for\n`querySelectorAll` to have an extra loop checking this, when it can be done in\nthe caller's loop over the returned data.","shortMessageHtmlLink":"[CLEANUP] Add CssInliner::querySelectorAll method"}},{"before":"2b5b3f0188494b5dfa5e15a6312c377f213d71e1","after":"dbf26c9112f202bcef0829764914e8792fe17835","ref":"refs/heads/cleanup/query-selector-all","pushedAt":"2024-09-18T00:07:51.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"JakeQZ","name":null,"path":"/JakeQZ","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/15205088?s=80&v=4"},"commit":{"message":"[CLEANUP] Add CssInliner::querySelectorAll method\n\nThis `private` method provides functionality that is used in three separate\nplaces (albeit a one-liner), and includes taking care of exception handling\naccording to the debug mode setting.\n\nThe new method and parameter names match the equivalent in the\n[Web API](\n https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelectorAll\n).\n\nThere will be a tiny performance impact due to additional method calls. But the\nbenefits include code re-use and common error handling.\n\nAlso add `ensureNodeIsElement` method for use with the result from\n`querySelectorAll` to ensure type safety. `querySelectorAll` should always\nreturn a `DOMNodeList` of `DOMElement`s. But this cannot be guaranteed if there\nis a bug in CssSelector whereby it returns an XPath expression which may match\nnon-element nodes. And it would (probably) be sub-optimal for\n`querySelectorAll` to have an extra loop checking this, when it can be done in\nthe caller's loop over the returned data.","shortMessageHtmlLink":"[CLEANUP] Add CssInliner::querySelectorAll method"}},{"before":"3a0d3a162140ffb901f13976e39a147b1cd0df63","after":"2b5b3f0188494b5dfa5e15a6312c377f213d71e1","ref":"refs/heads/cleanup/query-selector-all","pushedAt":"2024-09-18T00:02:59.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"JakeQZ","name":null,"path":"/JakeQZ","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/15205088?s=80&v=4"},"commit":{"message":"[CLEANUP] Add CssInliner::querySelectorAll method\n\nThis `private` method provides functionality that is used in three separate\nplaces (albeit a one-liner), and includes taking care of exception handling\naccording to the debug mode setting.\n\nThe new method and parameter names match the equivalent in the\n[Web API](\n https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelectorAll\n).\n\nThere will be a tiny performance impact due to additional method calls. But the\nbenefits include code re-use and common error handling.\n\nAlso add `ensureNodeIsElement` method for use with the result from\n`querySelectorAll` to ensure type safety. `querySelectorAll` should always\nreturn a `DOMNodeList` of `DOMElement`s. But this cannot be guaranteed if there\nis a bug in CssSelector whereby it returns an XPath expression which may match\nnon-element nodes. And it would (probably) be sub-optimal for\n`querySelectorAll` to have an extra loop checking this, when it can be done in\nthe caller's loop over the returned data.","shortMessageHtmlLink":"[CLEANUP] Add CssInliner::querySelectorAll method"}},{"before":"a809329aa9b56b80881eafa753f74ed0230235b3","after":"3a0d3a162140ffb901f13976e39a147b1cd0df63","ref":"refs/heads/cleanup/query-selector-all","pushedAt":"2024-09-17T23:54:54.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"JakeQZ","name":null,"path":"/JakeQZ","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/15205088?s=80&v=4"},"commit":{"message":"[CLEANUP] Add CssInliner::querySelectorAll method\n\nThis `private` mehtod provides functionality that is used in three separate\nplaces, and includes taking care of exception handling according to the debug\nmode setting.\n\nThe new method and parameter names match the equivalent in the\n[Web API](\n https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelectorAll\n).\n\nThere will be a tiny performance impact due to additional method calls. But the\nbenefits include code re-use and common error handling.\n\nAlso add `ensureNodeIsElement` method for use with the result from\n`querySelectorAll` to ensure type safety. `querySelectorAll` should always\nreturn a `DOMNodeList` of `DOMElement`s. But this cannot be guaranteed if there\nis a bug in CssSelector whereby it returns an XPath expression which may match\nnon-element nodes. And it would (probably) be sub-optimal for\n`querySelectorAll` to have an extra loop checking this, when it can be done in\nthe caller's loop over the returned data.","shortMessageHtmlLink":"[CLEANUP] Add CssInliner::querySelectorAll method"}},{"before":"56ae6f065b99f6a667996288fecf35256d2ac7aa","after":null,"ref":"refs/heads/cleanup/parse-declaration-block","pushedAt":"2024-09-17T10:57:08.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"oliverklee","name":"Oliver Klee","path":"/oliverklee","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/765746?s=80&v=4"}},{"before":"c05b16839a461ee3c4aee93d32486aca15c537b8","after":"597eaf20ab5d3c3fb64a4222f54d37f580c8a059","ref":"refs/heads/main","pushedAt":"2024-09-17T10:57:07.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"oliverklee","name":"Oliver Klee","path":"/oliverklee","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/765746?s=80&v=4"},"commit":{"message":"[CLEANUP] Add DeclarationBlockParser class (#1311)\n\nThis is essentially a refactoring to move the `parseCssDeclarationsBlock` method\r\nthat was duplicated in both `CssInliner` and `CssToAttributeConverter` to a\r\nseparate class.\r\n\r\nAs well as eliminating duplicate code/functionality, there are other benefits:\r\n- The method can be tested independently, which is duly done;\r\n- The results cache is now shared;\r\n- The functionality is readily available to other classes, e.g. for the solution\r\n to #1276 (as currently proposed).\r\n\r\nPHPStan errors from the original code have been resolved as follows:\r\n- Use `Preg::split` to wrap `preg_split` to handle unexpected errors;\r\n- Check the return value from `preg_match` precisely with `!== 1` instead of\r\n `!`.\r\n\r\nLonger-term, we should be able to use functionality from PHP-CSS-Parser for more\r\naccurate parsing (e.g. strings containing semicolons), whereupon this class can\r\nbecome a wrapper for that, but currently that functionality is not available in\r\na standalone class.","shortMessageHtmlLink":"[CLEANUP] Add DeclarationBlockParser class (#1311)"}},{"before":"2b34d83e256f7bbb789f047d2fcb419ad7fa37f8","after":"56ae6f065b99f6a667996288fecf35256d2ac7aa","ref":"refs/heads/cleanup/parse-declaration-block","pushedAt":"2024-09-17T10:55:34.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"oliverklee","name":"Oliver Klee","path":"/oliverklee","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/765746?s=80&v=4"},"commit":{"message":"[CLEANUP] Add DeclarationBlockParser class\n\nThis is essentially a refactoring to move the `parseCssDeclarationsBlock` method\nthat was duplicated in both `CssInliner` and `CssToAttributeConverter` to a\nseparate class.\n\nAs well as eliminating duplicate code/functionality, there are other benefits:\n- The method can be tested independently, which is duly done;\n- The results cache is now shared;\n- The functionality is readily available to other classes, e.g. for the solution\n to #1276 (as currently proposed).\n\nPHPStan errors from the original code have been resolved as follows:\n- Use `Preg::split` to wrap `preg_split` to handle unexpected errors;\n- Check the return value from `preg_match` precisely with `!== 1` instead of\n `!`.\n\nLonger-term, we should be able to use functionality from PHP-CSS-Parser for more\naccurate parsing (e.g. strings containing semicolons), whereupon this class can\nbecome a wrapper for that, but currently that functionality is not available in\na standalone class.","shortMessageHtmlLink":"[CLEANUP] Add DeclarationBlockParser class"}},{"before":"8389ba48c3dd7ac91d7379f82e89a3fbd18c1902","after":"2b34d83e256f7bbb789f047d2fcb419ad7fa37f8","ref":"refs/heads/cleanup/parse-declaration-block","pushedAt":"2024-09-17T10:53:26.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"oliverklee","name":"Oliver Klee","path":"/oliverklee","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/765746?s=80&v=4"},"commit":{"message":"[CLEANUP] Add DeclarationBlockParser class\n\nThis is essentially a refactoring to move the `parseCssDeclarationsBlock` method\nthat was duplicated in both `CssInliner` and `CssToAttributeConverter` to a\nseparate class.\n\nAs well as eliminating duplicate code/functionality, there are other benefits:\n- The method can be tested independently, which is duly done;\n- The results cache is now shared;\n- The functionality is readily available to other classes, e.g. for the solution\n to #1276 (as currently proposed).\n\nPHPStan errors from the original code have been resolved as follows:\n- Use `Preg::split` to wrap `preg_split` to handle unexpected errors;\n- Check the return value from `preg_match` precisely with `!== 1` instead of\n `!`.\n\nLonger-term, we should be able to use functionality from PHP-CSS-Parser for more\naccurate parsing (e.g. strings containing semicolons), whereupon this class can\nbecome a wrapper for that, but currently that functionality is not available in\na standalone class.","shortMessageHtmlLink":"[CLEANUP] Add DeclarationBlockParser class"}},{"before":"5dcdd642faa630772359f904abb77b2e3660e5b3","after":null,"ref":"refs/heads/cleanup/remove-impossible-throw","pushedAt":"2024-09-17T10:51:08.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"oliverklee","name":"Oliver Klee","path":"/oliverklee","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/765746?s=80&v=4"}},{"before":"178d3ef40490a309d423678a2425cbeff2310958","after":"c05b16839a461ee3c4aee93d32486aca15c537b8","ref":"refs/heads/main","pushedAt":"2024-09-17T10:51:06.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"oliverklee","name":"Oliver Klee","path":"/oliverklee","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/765746?s=80&v=4"},"commit":{"message":"[CLEANUP] Remove an impossible `throw` (#1315)\n\nPHPStan is able to determine that `array_combine` when passed the results of\r\n`array_keys` and `array_values` for the same array can never fail (in the sense\r\nof returning `false`), because the two passed arrays will always be the same\r\nlength.\r\n\r\nPsalm could not, which was why the return value check and `throw` was originally\r\nput in.","shortMessageHtmlLink":"[CLEANUP] Remove an impossible throw (#1315)"}},{"before":"3bc3d6a85e9b6e7157da4d76f7ea06b5448be045","after":"5dcdd642faa630772359f904abb77b2e3660e5b3","ref":"refs/heads/cleanup/remove-impossible-throw","pushedAt":"2024-09-17T10:48:02.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"oliverklee","name":"Oliver Klee","path":"/oliverklee","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/765746?s=80&v=4"},"commit":{"message":"[CLEANUP] Remove an impossible `throw`\n\nPHPStan is able to determine that `array_combine` when passed the results of\n`array_keys` and `array_values` for the same array can never fail (in the sense\nof returning `false`), because the two passed arrays will always be the same\nlength.\n\nPsalm could not, which was why the return value check and `throw` was originally\nput in.","shortMessageHtmlLink":"[CLEANUP] Remove an impossible throw"}},{"before":"8d0d92438930629e56f7995d126af4c1f3683380","after":null,"ref":"refs/heads/cleanup/preg-split-handle-errors","pushedAt":"2024-09-17T08:51:06.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"oliverklee","name":"Oliver Klee","path":"/oliverklee","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/765746?s=80&v=4"}},{"before":"fe0bb4d99ac5ff596807d7f6263cca039bc29150","after":"178d3ef40490a309d423678a2425cbeff2310958","ref":"refs/heads/main","pushedAt":"2024-09-17T08:51:04.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"oliverklee","name":"Oliver Klee","path":"/oliverklee","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/765746?s=80&v=4"},"commit":{"message":"[CLEANUP] Use Preg::split to handle unexpected preg_split errors (#1314)\n\nThis resolves three PHPStan errors.\r\n\r\nInstances of calls to `preg_split` in the two (identical)\r\n`parseCssDeclarationsBlock` methods are not updated - those are covered\r\nseparately by #1311.","shortMessageHtmlLink":"[CLEANUP] Use Preg::split to handle unexpected preg_split errors (#1314)"}},{"before":"5c03b337b50148c69d58cd6c58f968164a483159","after":"a809329aa9b56b80881eafa753f74ed0230235b3","ref":"refs/heads/cleanup/query-selector-all","pushedAt":"2024-09-17T02:36:00.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"JakeQZ","name":null,"path":"/JakeQZ","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/15205088?s=80&v=4"},"commit":{"message":"[CLEANUP] Add CssInliner::querySelectorAll method\n\nThis functionality was used twice, albeit in a (very long) single statement.\n\nThe new method and parameter names match the equivalent in the\n[Web API](\n https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelectorAll\n).\n\nThere will be a tiny performance impact due to additional method calls. But the\nbenefits include code re-use and common error handling (which has been added).","shortMessageHtmlLink":"[CLEANUP] Add CssInliner::querySelectorAll method"}},{"before":"fe0bb4d99ac5ff596807d7f6263cca039bc29150","after":"5c03b337b50148c69d58cd6c58f968164a483159","ref":"refs/heads/cleanup/query-selector-all","pushedAt":"2024-09-17T01:08:19.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"JakeQZ","name":null,"path":"/JakeQZ","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/15205088?s=80&v=4"},"commit":{"message":"[CLEANUP] Add CssInliner::querySelectorAll method\n\nThis functionality was used twice, albeit in a (very long) single statement.\n\nThe new method and parameter names match the equivalent in the\n[Web API](\n https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelectorAll\n).\n\nThere will be a tiny performance impact due to additional method calls. But the\nbenefits include code re-use and common error handling (which has been added).","shortMessageHtmlLink":"[CLEANUP] Add CssInliner::querySelectorAll method"}},{"before":null,"after":"fe0bb4d99ac5ff596807d7f6263cca039bc29150","ref":"refs/heads/cleanup/query-selector-all","pushedAt":"2024-09-17T00:44:33.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"JakeQZ","name":null,"path":"/JakeQZ","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/15205088?s=80&v=4"},"commit":{"message":"[TASK] Remove support for PREG_SPLIT_OFFSET_CAPTURE from Preg::split (#1313)\n\nThis flag is not used anywhere in the current code base. It causes\r\ncomplications with static analysis due to its introduction of a dynamic return\r\ntype for `preg_split`, which would require a PHPStan extension to properly solve\r\n(and which assumes PHPStan would always be used as the static analysis tool).","shortMessageHtmlLink":"[TASK] Remove support for PREG_SPLIT_OFFSET_CAPTURE from Preg::split (#…"}},{"before":"fe0bb4d99ac5ff596807d7f6263cca039bc29150","after":"3bc3d6a85e9b6e7157da4d76f7ea06b5448be045","ref":"refs/heads/cleanup/remove-impossible-throw","pushedAt":"2024-09-16T23:39:47.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"JakeQZ","name":null,"path":"/JakeQZ","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/15205088?s=80&v=4"},"commit":{"message":"[CLEANUP] Remove an impossible `throw`\n\nPHPStan is able to determine that `array_combine` when passed the results of\n`array_keys` and `array_values` for the same array can never fail (in the sense\nof returning `false`), because the two passed arrays will always be the same\nlength.\n\nPsalm could not, which was why the return value check and `throw` was originally\nput in.","shortMessageHtmlLink":"[CLEANUP] Remove an impossible throw"}},{"before":"fe0bb4d99ac5ff596807d7f6263cca039bc29150","after":null,"ref":"refs/heads/cleanup/impossible-throw","pushedAt":"2024-09-16T23:26:45.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"JakeQZ","name":null,"path":"/JakeQZ","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/15205088?s=80&v=4"}},{"before":null,"after":"fe0bb4d99ac5ff596807d7f6263cca039bc29150","ref":"refs/heads/cleanup/impossible-throw","pushedAt":"2024-09-16T23:25:55.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"JakeQZ","name":null,"path":"/JakeQZ","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/15205088?s=80&v=4"},"commit":{"message":"[TASK] Remove support for PREG_SPLIT_OFFSET_CAPTURE from Preg::split (#1313)\n\nThis flag is not used anywhere in the current code base. It causes\r\ncomplications with static analysis due to its introduction of a dynamic return\r\ntype for `preg_split`, which would require a PHPStan extension to properly solve\r\n(and which assumes PHPStan would always be used as the static analysis tool).","shortMessageHtmlLink":"[TASK] Remove support for PREG_SPLIT_OFFSET_CAPTURE from Preg::split (#…"}},{"before":null,"after":"fe0bb4d99ac5ff596807d7f6263cca039bc29150","ref":"refs/heads/cleanup/remove-impossible-throw","pushedAt":"2024-09-16T23:20:23.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"JakeQZ","name":null,"path":"/JakeQZ","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/15205088?s=80&v=4"},"commit":{"message":"[TASK] Remove support for PREG_SPLIT_OFFSET_CAPTURE from Preg::split (#1313)\n\nThis flag is not used anywhere in the current code base. It causes\r\ncomplications with static analysis due to its introduction of a dynamic return\r\ntype for `preg_split`, which would require a PHPStan extension to properly solve\r\n(and which assumes PHPStan would always be used as the static analysis tool).","shortMessageHtmlLink":"[TASK] Remove support for PREG_SPLIT_OFFSET_CAPTURE from Preg::split (#…"}},{"before":"fe0bb4d99ac5ff596807d7f6263cca039bc29150","after":"8d0d92438930629e56f7995d126af4c1f3683380","ref":"refs/heads/cleanup/preg-split-handle-errors","pushedAt":"2024-09-16T23:03:59.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"JakeQZ","name":null,"path":"/JakeQZ","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/15205088?s=80&v=4"},"commit":{"message":"[CLEANUP] Use Preg::split to handle unexpected preg_split errors\n\nThis resolves three PHPStan errors.\n\nInstances of calls to `preg_split` in the two (identical)\n`parseCssDeclarationsBlock` methods are not updated - those are covered\nseparately by #1311.","shortMessageHtmlLink":"[CLEANUP] Use Preg::split to handle unexpected preg_split errors"}},{"before":null,"after":"fe0bb4d99ac5ff596807d7f6263cca039bc29150","ref":"refs/heads/cleanup/preg-split-handle-errors","pushedAt":"2024-09-16T22:43:43.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"JakeQZ","name":null,"path":"/JakeQZ","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/15205088?s=80&v=4"},"commit":{"message":"[TASK] Remove support for PREG_SPLIT_OFFSET_CAPTURE from Preg::split (#1313)\n\nThis flag is not used anywhere in the current code base. It causes\r\ncomplications with static analysis due to its introduction of a dynamic return\r\ntype for `preg_split`, which would require a PHPStan extension to properly solve\r\n(and which assumes PHPStan would always be used as the static analysis tool).","shortMessageHtmlLink":"[TASK] Remove support for PREG_SPLIT_OFFSET_CAPTURE from Preg::split (#…"}},{"before":"8a2abf0a5db55c1d76450b1c16321938eac88371","after":"8389ba48c3dd7ac91d7379f82e89a3fbd18c1902","ref":"refs/heads/cleanup/parse-declaration-block","pushedAt":"2024-09-16T18:36:06.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"JakeQZ","name":null,"path":"/JakeQZ","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/15205088?s=80&v=4"},"commit":{"message":"[CLEANUP] Add DeclarationBlockParser class\n\nThis is essentially a refactoring to move the `parseCssDeclarationsBlock` method\nthat was duplicated in both `CssInliner` and `CssToAttributeConverter` to a\nseparate class.\n\nAs well as eliminating duplicate code/functionality, there are other benefits:\n- The method can be tested independently, which is duly done;\n- The results cache is now shared;\n- The functionality is readily available to other classes, e.g. for the solution\n to #1276 (as currently proposed).\n\nPHPStan errors from the original code have been resolved as follows:\n- Use `Preg::split` to wrap `preg_split` to handle unexpected errors;\n- Check the return value from `preg_match` precisely with `!== 1` instead of\n `!`.\n\nLonger-term, we should be able to use functionality from PHP-CSS-Parser for more\naccurate parsing (e.g. strings containing semicolons), whereupon this class can\nbecome a wrapper for that, but currently that functionality is not available in\na standalone class.","shortMessageHtmlLink":"[CLEANUP] Add DeclarationBlockParser class"}},{"before":"f23bb33947944271e3a8d5218b5ac5f8975c3f49","after":"8a2abf0a5db55c1d76450b1c16321938eac88371","ref":"refs/heads/cleanup/parse-declaration-block","pushedAt":"2024-09-16T18:35:33.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"JakeQZ","name":null,"path":"/JakeQZ","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/15205088?s=80&v=4"},"commit":{"message":"[CLEANUP] Add DeclarationBlockParser class\n\nThis is essentially a refactoring to move the `parseCssDeclarationsBlock` method\nthat was duplicated in both `CssInliner` and `CssToAttributeConverter` to a\nseparate class.\n\nAs well as eliminating duplicate code/functionality, there are other benefits:\n- The method can be tested independently, which is duly done;\n- The results cache is now shared;\n- The functionality is readily available to other classes, e.g. for the solution\n to #1276 (as currently proposed).\n\nPHPStan errors from the original code have been resolved as follows:\n- Use `Preg::split` to wrap `preg_split` to handle unexpected errors (*see\n note);\n- Check the return value from `preg_match` precisely with `!== 1` instead of\n `!`.\n\nLonger-term, we should be able to use functionality from PHP-CSS-Parser for more\naccurate parsing (e.g. strings containing semicolons), whereupon this class can\nbecome a wrapper for that, but currently that functionality is not available in\na standalone class.","shortMessageHtmlLink":"[CLEANUP] Add DeclarationBlockParser class"}},{"before":"88406d79c7694e9df845f1ca771c833cf2bc6028","after":"f23bb33947944271e3a8d5218b5ac5f8975c3f49","ref":"refs/heads/cleanup/parse-declaration-block","pushedAt":"2024-09-16T18:31:36.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"JakeQZ","name":null,"path":"/JakeQZ","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/15205088?s=80&v=4"},"commit":{"message":"[CLEANUP] Add DeclarationBlockParser class\n\nThis is essentially a refactoring to move the `parseCssDeclarationsBlock` method\nthat was duplicated in both `CssInliner` and `CssToAttributeConverter` to a\nseparate class.\n\nAs well as eliminating duplicate code/functionality, there are other benefits:\n- The method can be tested independently, which is duly done;\n- The results cache is now shared;\n- The functionality is readily available to other classes, e.g. for the solution\n to #1276 (as currently proposed).\n\nPHPStan errors from the original code have been resolved as follows:\n- Use `Preg::split` to wrap `preg_split` to handle unexpected errors (*see\n note);\n- Check the return value from `preg_match` precisely with `!== 1` instead of\n `!`.\n\n*Note: `preg_split` may return an array of arrays only if the\n`PREG_SPLIT_OFFSET_CAPTURE` flag is specified. PHPStan knows this, but cannot\nknow that the wrapper function behaves similarly without a\n[Dynamic Return Type Extension](\n https://phpstan.org/developing-extensions/dynamic-return-type-extensions\n) being implemented to tell it so. So an additional logic check is added to\ncater for both flavours of return type.\n\nLonger-term, we should be able to use functionality from PHP-CSS-Parser for more\naccurate parsing (e.g. strings containing semicolons), whereupon this class can\nbecome a wrapper for that, but currently that functionality is not available in\na standalone class.","shortMessageHtmlLink":"[CLEANUP] Add DeclarationBlockParser class"}},{"before":"8593f59ea3bb026b3935b522b1301d88bde8ea52","after":null,"ref":"refs/heads/task/no-preg-offset-capture","pushedAt":"2024-09-16T17:15:46.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"oliverklee","name":"Oliver Klee","path":"/oliverklee","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/765746?s=80&v=4"}},{"before":"ea97b8b37cca9c78563177f335b14491e12316ca","after":"fe0bb4d99ac5ff596807d7f6263cca039bc29150","ref":"refs/heads/main","pushedAt":"2024-09-16T17:15:45.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"oliverklee","name":"Oliver Klee","path":"/oliverklee","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/765746?s=80&v=4"},"commit":{"message":"[TASK] Remove support for PREG_SPLIT_OFFSET_CAPTURE from Preg::split (#1313)\n\nThis flag is not used anywhere in the current code base. It causes\r\ncomplications with static analysis due to its introduction of a dynamic return\r\ntype for `preg_split`, which would require a PHPStan extension to properly solve\r\n(and which assumes PHPStan would always be used as the static analysis tool).","shortMessageHtmlLink":"[TASK] Remove support for PREG_SPLIT_OFFSET_CAPTURE from Preg::split (#…"}},{"before":"91e602673dabe65b4c23e305d068b18acb7bb89c","after":"8593f59ea3bb026b3935b522b1301d88bde8ea52","ref":"refs/heads/task/no-preg-offset-capture","pushedAt":"2024-09-16T17:13:41.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"JakeQZ","name":null,"path":"/JakeQZ","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/15205088?s=80&v=4"},"commit":{"message":"Add exception code, and test that it is set in the exception.\n\nAlso test that the exception message contains \"PREG_SPLIT_OFFSET_CAPTURE\" to\nindicate the reason.","shortMessageHtmlLink":"Add exception code, and test that it is set in the exception."}}],"hasNextPage":true,"hasPreviousPage":false,"activityType":"all","actor":null,"timePeriod":"all","sort":"DESC","perPage":30,"cursor":"Y3Vyc29yOnYyOpK7MjAyNC0wOS0xOFQwMDoyNDoyNi4wMDAwMDBazwAAAAS5GWJB","startCursor":"Y3Vyc29yOnYyOpK7MjAyNC0wOS0xOFQwMDoyNDoyNi4wMDAwMDBazwAAAAS5GWJB","endCursor":"Y3Vyc29yOnYyOpK7MjAyNC0wOS0xNlQxNzoxMzo0MS4wMDAwMDBazwAAAAS3sVEv"}},"title":"Activity · MyIntervals/emogrifier"}