Fixed #138 Added PHP-Scoper to build to prevent dependency conflicts.#141
Conversation
|
This moves us a little closer to resolving #79. However, there are still a few more steps that can be automated. |
| @@ -0,0 +1,36 @@ | |||
| #! /bin/sh | |||
There was a problem hiding this comment.
I'm wondering about testing. Do we, or could we, have tests that ensure that the package as built by this script functions correctly? (For example, could we have the existing test suite test what's built by this script.)
There was a problem hiding this comment.
I had to think about this one for a while. We probably could add tests.
We would need to install the test dependencies in seperate vendor directory e.g. vendor_test in the dist directory. From there we should be able to copy the files from the root of the repo needed to run tests: tests, .wp.env.json, package.json, package-lock.json, phpcs.xml, and phpunit.xml.
I believe at that point the dist directory could run the test suite the same as the we do with the repo normally.
There was a problem hiding this comment.
Turns out as long as we run the composer install for our bundled dependencies during the build when we run composer install again later to add our test dependencies the bundled dependencies won't be modified. Because of that we don't need a vendor_dist directory.
Description of the change
This PR fixes #136. It adds a build script to build the plugin distribution files. As part of the build process it now scopes all dependencies into a new
RollbarWPnamespace.Type of change
Related issues
Checklists
Development
Code review