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

Blueprint.phar PHP 7.0 compat #81

Merged
merged 9 commits into from
Mar 19, 2024
Merged

Conversation

adamziel
Copy link
Collaborator

@adamziel adamziel commented Mar 19, 2024

Makes the built Blueprint.phar file compatible with PHP 7.0:

rm -rf examples/new-wp;
make bundle_web;
USE_PHAR=1 php examples/blueprint_compiling_simple_progress.php
# It starts downloading and extracting WordPress etc

# Also, try
docker run -it --rm --name my-running-script -v "$PWD":/usr/src/myapp -w /usr/src/myapp php:7.0-cli php your-script.php
# It starts downloading and extracting WordPress etc

Changes made

  • Added a Makefile to manage two separate dependency environments: dev and web (for building the .phar)
  • All dependencies brought over to this repo and patched for PHP 7.0 – 8.3 compat
  • Cleaned up the .phar contents to reduce the size to ~180KB
  • Allow calling wp-cli commands as root for the docker run use-case above. TODO: Revisit, maybe add a special --allow-root mode to the entire Blueprints library.

Makes the built Blueprint.phar file compatible with PHP 7.0:

```php
rm -rf examples/new-wp;
make bundle_web;
USE_PHAR=1 php examples/blueprint_compiling_simple_progress.php
```

 ## Changes made

* Added a Makefile to manage two separate dependency environments: dev
  and web (for building the .phar)
* Polyfilled the Symfony/Component/Filesystem/Path class
* Downgrade the EventDispatcher usage to version 3 of that library
* Cleaned up the .phar contents to reduce the size to ~180KB

 ## Follow-up work

A bunch of libraries used by Blueprints throw deprecation warnings on PHP 8.3,
let's patch them.
@adamziel adamziel force-pushed the blueprint-running-on-php-70 branch from c67d31a to 31cab45 Compare March 19, 2024 16:07
@adamziel adamziel merged commit 557dd5e into trunk Mar 19, 2024
16 checks passed
@reimic reimic deleted the blueprint-running-on-php-70 branch April 4, 2024 15:43
@reimic reimic restored the blueprint-running-on-php-70 branch April 4, 2024 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant