Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Gracefully handle conflicting version of PHP-CSS-Parser being loaded #1743
When another plugin/theme is installed which also has a copy of PHP-CSS-Parser, if its Composer autoloader wins then the required methods and functionality of our fork will not be available. In this case, all of the CSS processing will not be available, including tree shaking.
So this PR detects for a conflicting version being installed, and it will show a warning:
Additionally, feature detection is now done with fallbacks to the methods that are available.
When the required PHP-CSS-Parser is not available, then the
Classic mode in particular should work acceptably when the required version of PHP-CSS-Parser is not available.