Automattic / wordbless

WorDBless allows you to use WordPress core functions in your PHPUnit tests without having to set up a database and the whole WordPress environment
Other
131 stars 6 forks source link

Resolve wp-content folder failure on install #54

Closed kraftbj closed 2 years ago

kraftbj commented 2 years ago

roots/wordpress starting with version 5.9.4 no longer ships the wp-content folder. Previously, it would ship the entire WP install, inclusive of all default themes. It now only ships the "no-content" version. Wordbless install script assumed that wp-content dir would be present.

The intent, I believe, was for roots/wordpress to start doing that at 6.0, but they seemed to included 5.9.x starting with 5.9.4. Since we should update to 6.0+ anyhow, let's do both.

szepeviktor commented 2 years ago

Actually the "Composer way" of doing this is having a static method. "post-update-cmd": "WorDBless\\Composer\\InstallDropin::copy"

May I send a PR to this branch?

leogermani commented 2 years ago

Sure @szepeviktor ,

We are trying to figure out the failing tests on the lowest PHP 8.0. if you have any clues that is also welcome

szepeviktor commented 2 years ago

We are trying to figure out the failing tests on the lowest PHP 8.0. if you have any clues that is also welcome

Yes, my L.A.S.E.R. eye 👁️ spotted the line below. https://github.com/Automattic/wordbless/blob/7798f6f6cab023f3ae0fc2301fdf6f5026734682/.github/workflows/ci.yaml#L225

szepeviktor commented 2 years ago

I'm sorry. I didn't remember my write access to this repo.

szepeviktor commented 2 years ago

I'm not a developer: more errors than keystrokes. Although I'm good at thinking about long-term things.

szepeviktor commented 2 years ago

Now 8.0, lowest installs these.

  - Installing roots/wordpress-core-installer (1.0.0): Downloading (100%)
  - Installing roots/wordpress-no-content (6.0.2): Downloading (100%)
  - Installing roots/wordpress (6.0.2)
  - Installing sebastian/version (3.0.2): Downloading (100%)
  - Installing sebastian/type (2.3.0): Downloading (100%)
  - Installing sebastian/resource-operations (3.0.3): Downloading (100%)
  - Installing sebastian/recursion-context (4.0.2): Downloading (100%)
  - Installing sebastian/object-reflector (2.0.2): Downloading (100%)
  - Installing sebastian/object-enumerator (4.0.3): Downloading (100%)
  - Installing sebastian/global-state (5.0.1): Downloading (100%)
  - Installing sebastian/exporter (4.0.3): Downloading (100%)
  - Installing sebastian/environment (5.1.3): Downloading (100%)
  - Installing sebastian/diff (4.0.3): Downloading (100%)
  - Installing sebastian/comparator (4.0.5): Downloading (100%)
  - Installing sebastian/code-unit (1.0.6): Downloading (100%)
  - Installing sebastian/cli-parser (1.0.1): Downloading (100%)
  - Installing phpunit/php-timer (5.0.2): Downloading (100%)
  - Installing phpunit/php-text-template (2.0.3): Downloading (100%)
  - Installing phpunit/php-invoker (3.1.1): Downloading (100%)
  - Installing phpunit/php-file-iterator (3.0.5): Downloading (100%)
  - Installing theseer/tokenizer (1.2.0): Downloading (100%)
  - Installing nikic/php-parser (v4.10.2): Downloading (100%)
  - Installing sebastian/complexity (2.0.0): Downloading (100%)
  - Installing sebastian/code-unit-reverse-lookup (2.0.2): Downloading (100%)
  - Installing sebastian/lines-of-code (1.0.0): Downloading (100%)
  - Installing phpunit/php-code-coverage (9.2.3): Downloading (100%)
  - Installing doctrine/instantiator (1.3.1): Downloading (100%)
  - Installing phpdocumentor/reflection-common (2.2.0): Downloading (100%)
  - Installing symfony/polyfill-ctype (v1.8.0): Downloading (100%)
  - Installing webmozart/assert (1.9.1): Downloading (100%)
  - Installing phpdocumentor/type-resolver (1.3.0): Downloading (100%)
  - Installing phpdocumentor/reflection-docblock (5.2.0): Downloading (100%)
  - Installing phpspec/prophecy (1.14.0): Downloading (100%)
  - Installing phar-io/version (3.0.2): Downloading (100%)
  - Installing phar-io/manifest (2.0.1): Downloading (100%)
  - Installing myclabs/deep-copy (1.10.1): Downloading (100%)
  - Installing phpunit/phpunit (9.5.0): Downloading (100%)  👈🏻 
leogermani commented 2 years ago

thanks @szepeviktor

CI is still failing but I'm going to merge the PR as it is and open an issue for us to look at this later so we can unblock some other work depending on this

leogermani commented 2 years ago

https://github.com/Automattic/wordbless/issues/55