Skip to content
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

[2.1] Add Composer plugin to correctly autoload PHP CSS Parser dependency #6472

Merged
merged 3 commits into from
Jul 21, 2021

Conversation

pierlon
Copy link
Contributor

@pierlon pierlon commented Jul 21, 2021

Summary

Backport of #6464.

Checklist

  • My code is tested and passes existing tests.
  • My code follows the Engineering Guidelines (updates are often made to the guidelines, check it out periodically).

Co-authored-by: Weston Ruter <westonruter@google.com>
@pierlon pierlon added dependencies Pull requests that update a dependency file php Pull requests that update Php code labels Jul 21, 2021
@pierlon pierlon added this to the v2.1.4 milestone Jul 21, 2021
@pierlon pierlon requested a review from westonruter July 21, 2021 05:48
@pierlon pierlon enabled auto-merge July 21, 2021 05:55
@github-actions
Copy link
Contributor

github-actions bot commented Jul 21, 2021

Plugin builds for bca6e68 are ready 🛎️!

@pierlon pierlon disabled auto-merge July 21, 2021 05:57
@pierlon
Copy link
Contributor Author

pierlon commented Jul 21, 2021

I've traced the E2E JS test failures to the latest Gutenberg release (v11.1.0). Whenever a test navigates to the Onboarding Wizard screen the Gutenberg plugin throws an error on the page because the admin bar is not present on the page, which causes puppeteer to lose its mind and bail for some reason. I've filed an issue on their repo (see WordPress/gutenberg#33591) to see how best that can be resolved.

In the interim I think we can temporarily fix these E2E tests by using and pinning the last Gutenberg release (v11.0.0), as it won't throw the error.

Also note this affects the develop branch as well.

@pierlon
Copy link
Contributor Author

pierlon commented Jul 21, 2021

Also note this affects the develop branch as well.

Weirdly puppeteer doesn't bail and runs all tests to completion, although it does emit similar errors:

image

That's most likely due to the develop branch using a much more recent version of puppeteer.

@westonruter westonruter merged commit 2dfb662 into 2.1 Jul 21, 2021
@westonruter westonruter deleted the fix/2.1-php-css-parser-install branch July 21, 2021 18:55
@westonruter
Copy link
Member

Also note this affects the develop branch as well.

Will you open a PR to do this for develop as well?

@pierlon
Copy link
Contributor Author

pierlon commented Jul 21, 2021

Yep sure.

@westonruter
Copy link
Member

QA Passed

In the 2.1 branch, the autoload path is:

amp-wp/composer.lock

Lines 202 to 212 in 4205e6e

"require-dev": {
"codacy/coverage": "^1.4",
"phpunit/phpunit": "^4.8.36"
},
"default-branch": true,
"type": "library",
"autoload": {
"psr-4": {
"Sabberworm\\CSS\\": "lib/Sabberworm/CSS/"
}
},

This corresponds with #6464 (comment).

@westonruter westonruter self-assigned this Aug 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file php Pull requests that update Php code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants