[BUGFIX] Parse attribute selectors#1536
Conversation
|
This is a step in the right direction. However, it does not fully fix #1533 yet. Before this fix, there were 57 errors and 36 failures, and with it, there still are 40 errors and 35 failures, but different ones. Now we have exceptions from PHP-CSS-Parser instead of from the Symfony CSS library: We could either try to fix all of them in one PR, or merge this one and then add more PRs until the Emogrifier is green again. I'd be fine either way. WDYT? (And if you would like help getting your local setup to work so you can run the Emogrifier tests with your local copy of PHP-CSS-Parser, I'll be happy to help.) |
|
(And we might also want to make some of the Emogrifier tests more lenient concerning whitspace.) |
I can reproduce this by adding a test for it. I think it's because in
I think merge this one (which focuses on attributes) first, then apply the fix to allow |
007a33f to
6a81ef5
Compare
I just tested Emogrifier with the current I wouldn't like to change the tests to try to cater for one or the other - that's messy. Ideally the tests would perhaps use I don't consider the the changes made to |
Resolved with MyIntervals/emogrifier#1574. The only remaining issue with using the |
|
After we‘ve released PHP-CSS-Parser, let‘s directly create a PR for Emogrifier that both bumps the dependency as well as updates the PHPStan baseline. (We then can clean up the code in later PRs.) |
I was looking to get some renaming done before working on #1445. But we've decided against the original idea I had for that (which may have been a quicker fix of the sticking-plaster variety), and I can't see any obvious low-hanging fruit now. There have also been a number of fixes, changes and deprecations since 9.1, so this is probably a good time to create a 9.2 release. |
Don't treat spaces or characters like
~within them as a stop character representing a combinator.The bug was introduced by #1496 and related changes that split selector representation and parsing into compound selectors and combinators.
Addresses some of the issues in #1533.