wexample-wex-addon-dev-php 9.0.0__tar.gz → 12.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- wexample_wex_addon_dev_php-12.0.0/PKG-INFO +334 -0
- wexample_wex_addon_dev_php-12.0.0/README.md +311 -0
- {wexample_wex_addon_dev_php-9.0.0 → wexample_wex_addon_dev_php-12.0.0}/pyproject.toml +6 -5
- {wexample_wex_addon_dev_php-9.0.0 → wexample_wex_addon_dev_php-12.0.0}/src/wexample_wex_addon_dev_php/config_value/php_package_readme_config_value.py +5 -2
- {wexample_wex_addon_dev_php-9.0.0 → wexample_wex_addon_dev_php-12.0.0}/src/wexample_wex_addon_dev_php/file/php_composer_json_file.py +58 -0
- {wexample_wex_addon_dev_php-9.0.0/src/wexample_wex_addon_dev_php/services → wexample_wex_addon_dev_php-12.0.0/src/wexample_wex_addon_dev_php/formatter}/__init__.py +0 -0
- wexample_wex_addon_dev_php-12.0.0/src/wexample_wex_addon_dev_php/formatter/php_code_formatter.py +41 -0
- wexample_wex_addon_dev_php-12.0.0/src/wexample_wex_addon_dev_php/php_addon_manager.py +47 -0
- wexample_wex_addon_dev_php-12.0.0/src/wexample_wex_addon_dev_php/resources/design_rules/php_code.md +20 -0
- wexample_wex_addon_dev_php-12.0.0/src/wexample_wex_addon_dev_php/resources/writing_rules/php_code.md +23 -0
- {wexample_wex_addon_dev_php-9.0.0/src/wexample_wex_addon_dev_php/services/composer/commands → wexample_wex_addon_dev_php-12.0.0/src/wexample_wex_addon_dev_php/services/composer}/__init__.py +0 -0
- {wexample_wex_addon_dev_php-9.0.0 → wexample_wex_addon_dev_php-12.0.0}/src/wexample_wex_addon_dev_php/services/composer/commands/service/refresh_lock.py +7 -2
- {wexample_wex_addon_dev_php-9.0.0/src/wexample_wex_addon_dev_php/services/laravel → wexample_wex_addon_dev_php-12.0.0/src/wexample_wex_addon_dev_php/services/frankenphp}/__init__.py +0 -0
- {wexample_wex_addon_dev_php-9.0.0 → wexample_wex_addon_dev_php-12.0.0}/src/wexample_wex_addon_dev_php/services/frankenphp/docker/docker-compose.yml +0 -2
- {wexample_wex_addon_dev_php-9.0.0/src/wexample_wex_addon_dev_php/services/laravel/commands → wexample_wex_addon_dev_php-12.0.0/src/wexample_wex_addon_dev_php/services/laravel}/__init__.py +0 -0
- {wexample_wex_addon_dev_php-9.0.0/src/wexample_wex_addon_dev_php/services/php → wexample_wex_addon_dev_php-12.0.0/src/wexample_wex_addon_dev_php/services/php/ai}/__init__.py +0 -0
- {wexample_wex_addon_dev_php-9.0.0/src/wexample_wex_addon_dev_php/services/phpmyadmin → wexample_wex_addon_dev_php-12.0.0/src/wexample_wex_addon_dev_php/services/php/ai/shared}/__init__.py +0 -0
- wexample_wex_addon_dev_php-12.0.0/src/wexample_wex_addon_dev_php/services/php/ai/shared/context.j2 +1 -0
- wexample_wex_addon_dev_php-12.0.0/src/wexample_wex_addon_dev_php/services/php/ai/shared/php.j2 +4 -0
- {wexample_wex_addon_dev_php-9.0.0/src/wexample_wex_addon_dev_php/services/new_php → wexample_wex_addon_dev_php-12.0.0/src/wexample_wex_addon_dev_php/services/php}/docker/docker-compose.yml +2 -4
- wexample_wex_addon_dev_php-12.0.0/src/wexample_wex_addon_dev_php/services/php/samples/caddy/Caddyfile +30 -0
- {wexample_wex_addon_dev_php-9.0.0 → wexample_wex_addon_dev_php-12.0.0}/src/wexample_wex_addon_dev_php/services/php/samples/docker/docker-compose.yml +0 -0
- {wexample_wex_addon_dev_php-9.0.0 → wexample_wex_addon_dev_php-12.0.0}/src/wexample_wex_addon_dev_php/services/php/samples/env/dev/docker/docker-compose.yml +0 -0
- {wexample_wex_addon_dev_php-9.0.0 → wexample_wex_addon_dev_php-12.0.0}/src/wexample_wex_addon_dev_php/services/php/samples/env/local/docker/docker-compose.yml +0 -0
- {wexample_wex_addon_dev_php-9.0.0 → wexample_wex_addon_dev_php-12.0.0}/src/wexample_wex_addon_dev_php/services/php/samples/env/prod/docker/docker-compose.yml +0 -0
- {wexample_wex_addon_dev_php-9.0.0 → wexample_wex_addon_dev_php-12.0.0}/src/wexample_wex_addon_dev_php/services/php/service.yml +1 -1
- {wexample_wex_addon_dev_php-9.0.0/src/wexample_wex_addon_dev_php/services/new_symfony → wexample_wex_addon_dev_php-12.0.0/src/wexample_wex_addon_dev_php/services/phpmyadmin}/docker/.wex.yml +0 -0
- {wexample_wex_addon_dev_php-9.0.0/src/wexample_wex_addon_dev_php/services/wordpress → wexample_wex_addon_dev_php-12.0.0/src/wexample_wex_addon_dev_php/services/symfony/ai/agents}/__init__.py +0 -0
- {wexample_wex_addon_dev_php-9.0.0/src/wexample_wex_addon_dev_php/workdir → wexample_wex_addon_dev_php-12.0.0/src/wexample_wex_addon_dev_php/services/symfony/ai/agents/editor}/__init__.py +0 -0
- wexample_wex_addon_dev_php-12.0.0/src/wexample_wex_addon_dev_php/services/symfony/ai/agents/editor/agent.yml +6 -0
- wexample_wex_addon_dev_php-12.0.0/src/wexample_wex_addon_dev_php/services/symfony/ai/agents/editor/context.j2 +32 -0
- wexample_wex_addon_dev_php-12.0.0/src/wexample_wex_addon_dev_php/services/symfony/ai/shared/context.j2 +1 -0
- {wexample_wex_addon_dev_php-9.0.0 → wexample_wex_addon_dev_php-12.0.0}/src/wexample_wex_addon_dev_php/services/symfony/app_service.py +4 -1
- {wexample_wex_addon_dev_php-9.0.0 → wexample_wex_addon_dev_php-12.0.0}/src/wexample_wex_addon_dev_php/services/symfony/commands/service/install_local.py +3 -14
- wexample_wex_addon_dev_php-12.0.0/src/wexample_wex_addon_dev_php/services/symfony/commands/service/watch.py +82 -0
- {wexample_wex_addon_dev_php-9.0.0/src/wexample_wex_addon_dev_php/services/php/samples → wexample_wex_addon_dev_php-12.0.0/src/wexample_wex_addon_dev_php/services/symfony/docker}/.wex.yml +0 -0
- {wexample_wex_addon_dev_php-9.0.0 → wexample_wex_addon_dev_php-12.0.0}/src/wexample_wex_addon_dev_php/services/symfony/docker/docker-compose.yml +0 -2
- wexample_wex_addon_dev_php-12.0.0/src/wexample_wex_addon_dev_php/services/symfony/knowledge/__init__.py +0 -0
- wexample_wex_addon_dev_php-12.0.0/src/wexample_wex_addon_dev_php/services/symfony/knowledge/entity.md +4 -0
- {wexample_wex_addon_dev_php-9.0.0/src/wexample_wex_addon_dev_php/services/phpmyadmin/docker → wexample_wex_addon_dev_php-12.0.0/src/wexample_wex_addon_dev_php/services/symfony/samples}/.wex.yml +0 -0
- {wexample_wex_addon_dev_php-9.0.0/src/wexample_wex_addon_dev_php/services/phpmyadmin/env → wexample_wex_addon_dev_php-12.0.0/src/wexample_wex_addon_dev_php/services/symfony/samples/docker}/.wex.yml +0 -0
- {wexample_wex_addon_dev_php-9.0.0 → wexample_wex_addon_dev_php-12.0.0}/src/wexample_wex_addon_dev_php/services/symfony/samples/docker/docker-compose.yml +0 -0
- wexample_wex_addon_dev_php-12.0.0/src/wexample_wex_addon_dev_php/services/symfony/samples/docker/env.build +11 -0
- {wexample_wex_addon_dev_php-9.0.0/src/wexample_wex_addon_dev_php/services/symfony/docker → wexample_wex_addon_dev_php-12.0.0/src/wexample_wex_addon_dev_php/services/symfony/samples/docker/images}/.wex.yml +0 -0
- wexample_wex_addon_dev_php-12.0.0/src/wexample_wex_addon_dev_php/services/symfony/samples/docker/images/Dockerfile.dev +7 -0
- wexample_wex_addon_dev_php-12.0.0/src/wexample_wex_addon_dev_php/services/symfony/samples/docker/images/Dockerfile.release +50 -0
- {wexample_wex_addon_dev_php-9.0.0/src/wexample_wex_addon_dev_php/services/symfony/samples → wexample_wex_addon_dev_php-12.0.0/src/wexample_wex_addon_dev_php/services/symfony/samples/env/dev/docker}/.wex.yml +0 -0
- {wexample_wex_addon_dev_php-9.0.0 → wexample_wex_addon_dev_php-12.0.0}/src/wexample_wex_addon_dev_php/services/symfony/samples/env/dev/docker/docker-compose.yml +0 -0
- {wexample_wex_addon_dev_php-9.0.0/src/wexample_wex_addon_dev_php/services/symfony/samples/apache → wexample_wex_addon_dev_php-12.0.0/src/wexample_wex_addon_dev_php/services/symfony/samples/env/local/docker}/.wex.yml +0 -0
- wexample_wex_addon_dev_php-12.0.0/src/wexample_wex_addon_dev_php/services/symfony/samples/env/local/docker/docker-compose.yml +8 -0
- {wexample_wex_addon_dev_php-9.0.0/src/wexample_wex_addon_dev_php/services/symfony/samples/env/local → wexample_wex_addon_dev_php-12.0.0/src/wexample_wex_addon_dev_php/services/symfony/samples/env/prod}/docker/.wex.yml +0 -0
- {wexample_wex_addon_dev_php-9.0.0 → wexample_wex_addon_dev_php-12.0.0}/src/wexample_wex_addon_dev_php/services/symfony/samples/env/prod/docker/docker-compose.yml +0 -0
- wexample_wex_addon_dev_php-12.0.0/src/wexample_wex_addon_dev_php/services/symfony/service.yml +9 -0
- wexample_wex_addon_dev_php-12.0.0/src/wexample_wex_addon_dev_php/services/wordpress/__init__.py +0 -0
- {wexample_wex_addon_dev_php-9.0.0 → wexample_wex_addon_dev_php-12.0.0}/src/wexample_wex_addon_dev_php/services/wordpress/docker/docker-compose.yml +3 -0
- wexample_wex_addon_dev_php-12.0.0/src/wexample_wex_addon_dev_php/workdir/__init__.py +0 -0
- {wexample_wex_addon_dev_php-9.0.0 → wexample_wex_addon_dev_php-12.0.0}/src/wexample_wex_addon_dev_php/workdir/php_package_workdir.py +1 -1
- wexample_wex_addon_dev_php-12.0.0/src/wexample_wex_addon_dev_php/workdir/php_symfony_workdir.py +692 -0
- wexample_wex_addon_dev_php-12.0.0/tests/.gitkeep +0 -0
- wexample_wex_addon_dev_php-9.0.0/PKG-INFO +0 -477
- wexample_wex_addon_dev_php-9.0.0/README.md +0 -455
- wexample_wex_addon_dev_php-9.0.0/src/wexample_wex_addon_dev_php/php_addon_manager.py +0 -16
- wexample_wex_addon_dev_php-9.0.0/src/wexample_wex_addon_dev_php/services/new_php/samples/caddy/Caddyfile +0 -13
- wexample_wex_addon_dev_php-9.0.0/src/wexample_wex_addon_dev_php/services/new_php/samples/docker/docker-compose.yml +0 -6
- wexample_wex_addon_dev_php-9.0.0/src/wexample_wex_addon_dev_php/services/new_php/samples/env/dev/docker/docker-compose.yml +0 -4
- wexample_wex_addon_dev_php-9.0.0/src/wexample_wex_addon_dev_php/services/new_php/samples/env/local/docker/docker-compose.yml +0 -2
- wexample_wex_addon_dev_php-9.0.0/src/wexample_wex_addon_dev_php/services/new_php/samples/env/prod/docker/docker-compose.yml +0 -4
- wexample_wex_addon_dev_php-9.0.0/src/wexample_wex_addon_dev_php/services/new_php/service.yml +0 -15
- wexample_wex_addon_dev_php-9.0.0/src/wexample_wex_addon_dev_php/services/new_symfony/docker/docker-compose.yml +0 -6
- wexample_wex_addon_dev_php-9.0.0/src/wexample_wex_addon_dev_php/services/new_symfony/service.yml +0 -6
- wexample_wex_addon_dev_php-9.0.0/src/wexample_wex_addon_dev_php/services/php/docker/docker-compose.yml +0 -18
- wexample_wex_addon_dev_php-9.0.0/src/wexample_wex_addon_dev_php/services/php/samples/apache/web.conf +0 -13
- wexample_wex_addon_dev_php-9.0.0/src/wexample_wex_addon_dev_php/services/php/samples/env/local/php/web.ini +0 -5
- wexample_wex_addon_dev_php-9.0.0/src/wexample_wex_addon_dev_php/services/php/samples/env/prod/apache/web.conf +0 -13
- wexample_wex_addon_dev_php-9.0.0/src/wexample_wex_addon_dev_php/services/php/samples/index.php +0 -3
- wexample_wex_addon_dev_php-9.0.0/src/wexample_wex_addon_dev_php/services/php/samples/php/web.ini +0 -3
- wexample_wex_addon_dev_php-9.0.0/src/wexample_wex_addon_dev_php/services/symfony/commands/service/refresh_lock.py +0 -70
- wexample_wex_addon_dev_php-9.0.0/src/wexample_wex_addon_dev_php/services/symfony/samples/apache/web.conf +0 -14
- wexample_wex_addon_dev_php-9.0.0/src/wexample_wex_addon_dev_php/services/symfony/samples/env/local/docker/docker-compose.yml +0 -2
- wexample_wex_addon_dev_php-9.0.0/src/wexample_wex_addon_dev_php/services/symfony/service.yml +0 -4
- wexample_wex_addon_dev_php-9.0.0/src/wexample_wex_addon_dev_php/workdir/php_symfony_workdir.py +0 -10
- wexample_wex_addon_dev_php-9.0.0/src/wexample_wex_addon_dev_php/workdir/symfony_workdir.py +0 -27
- {wexample_wex_addon_dev_php-9.0.0 → wexample_wex_addon_dev_php-12.0.0}/src/wexample_wex_addon_dev_php/__init__.py +0 -0
- {wexample_wex_addon_dev_php-9.0.0 → wexample_wex_addon_dev_php-12.0.0}/src/wexample_wex_addon_dev_php/__pycache__/__init__.py +0 -0
- {wexample_wex_addon_dev_php-9.0.0 → wexample_wex_addon_dev_php-12.0.0}/src/wexample_wex_addon_dev_php/config_value/__init__.py +0 -0
- {wexample_wex_addon_dev_php-9.0.0 → wexample_wex_addon_dev_php-12.0.0}/src/wexample_wex_addon_dev_php/const/__init__.py +0 -0
- {wexample_wex_addon_dev_php-9.0.0 → wexample_wex_addon_dev_php-12.0.0}/src/wexample_wex_addon_dev_php/const/tags.py +0 -0
- {wexample_wex_addon_dev_php-9.0.0 → wexample_wex_addon_dev_php-12.0.0}/src/wexample_wex_addon_dev_php/file/__init__.py +0 -0
- {wexample_wex_addon_dev_php-9.0.0 → wexample_wex_addon_dev_php-12.0.0}/src/wexample_wex_addon_dev_php/py.typed +0 -0
- {wexample_wex_addon_dev_php-9.0.0 → wexample_wex_addon_dev_php-12.0.0}/src/wexample_wex_addon_dev_php/resources/.wex.yml +0 -0
- {wexample_wex_addon_dev_php-9.0.0 → wexample_wex_addon_dev_php-12.0.0}/src/wexample_wex_addon_dev_php/resources/docker/Dockerfile.roave +0 -0
- {wexample_wex_addon_dev_php-9.0.0/src/wexample_wex_addon_dev_php/services/composer → wexample_wex_addon_dev_php-12.0.0/src/wexample_wex_addon_dev_php/services}/__init__.py +0 -0
- {wexample_wex_addon_dev_php-9.0.0/src/wexample_wex_addon_dev_php/services/composer/commands/service → wexample_wex_addon_dev_php-12.0.0/src/wexample_wex_addon_dev_php/services/composer/commands}/__init__.py +0 -0
- {wexample_wex_addon_dev_php-9.0.0/src/wexample_wex_addon_dev_php/services/frankenphp → wexample_wex_addon_dev_php-12.0.0/src/wexample_wex_addon_dev_php/services/composer/commands/service}/__init__.py +0 -0
- {wexample_wex_addon_dev_php-9.0.0 → wexample_wex_addon_dev_php-12.0.0}/src/wexample_wex_addon_dev_php/services/composer/commands/service/install_local.py +0 -0
- {wexample_wex_addon_dev_php-9.0.0 → wexample_wex_addon_dev_php-12.0.0}/src/wexample_wex_addon_dev_php/services/composer/docker/.wex.yml +0 -0
- {wexample_wex_addon_dev_php-9.0.0 → wexample_wex_addon_dev_php-12.0.0}/src/wexample_wex_addon_dev_php/services/composer/docker/docker-compose.yml +0 -0
- {wexample_wex_addon_dev_php-9.0.0 → wexample_wex_addon_dev_php-12.0.0}/src/wexample_wex_addon_dev_php/services/composer/service.yml +0 -0
- {wexample_wex_addon_dev_php-9.0.0 → wexample_wex_addon_dev_php-12.0.0}/src/wexample_wex_addon_dev_php/services/frankenphp/docker/.wex.yml +0 -0
- {wexample_wex_addon_dev_php-9.0.0 → wexample_wex_addon_dev_php-12.0.0}/src/wexample_wex_addon_dev_php/services/frankenphp/samples/.wex.yml +0 -0
- {wexample_wex_addon_dev_php-9.0.0 → wexample_wex_addon_dev_php-12.0.0}/src/wexample_wex_addon_dev_php/services/frankenphp/samples/caddy/.wex.yml +0 -0
- {wexample_wex_addon_dev_php-9.0.0 → wexample_wex_addon_dev_php-12.0.0}/src/wexample_wex_addon_dev_php/services/frankenphp/samples/caddy/Caddyfile +0 -0
- {wexample_wex_addon_dev_php-9.0.0 → wexample_wex_addon_dev_php-12.0.0}/src/wexample_wex_addon_dev_php/services/frankenphp/samples/docker/.wex.yml +0 -0
- {wexample_wex_addon_dev_php-9.0.0 → wexample_wex_addon_dev_php-12.0.0}/src/wexample_wex_addon_dev_php/services/frankenphp/samples/docker/docker-compose.yml +0 -0
- {wexample_wex_addon_dev_php-9.0.0 → wexample_wex_addon_dev_php-12.0.0}/src/wexample_wex_addon_dev_php/services/frankenphp/samples/env/dev/docker/.wex.yml +0 -0
- {wexample_wex_addon_dev_php-9.0.0 → wexample_wex_addon_dev_php-12.0.0}/src/wexample_wex_addon_dev_php/services/frankenphp/samples/env/dev/docker/docker-compose.yml +0 -0
- {wexample_wex_addon_dev_php-9.0.0 → wexample_wex_addon_dev_php-12.0.0}/src/wexample_wex_addon_dev_php/services/frankenphp/samples/env/local/docker/.wex.yml +0 -0
- {wexample_wex_addon_dev_php-9.0.0 → wexample_wex_addon_dev_php-12.0.0}/src/wexample_wex_addon_dev_php/services/frankenphp/samples/env/local/docker/docker-compose.yml +0 -0
- {wexample_wex_addon_dev_php-9.0.0 → wexample_wex_addon_dev_php-12.0.0}/src/wexample_wex_addon_dev_php/services/frankenphp/samples/env/prod/docker/.wex.yml +0 -0
- {wexample_wex_addon_dev_php-9.0.0 → wexample_wex_addon_dev_php-12.0.0}/src/wexample_wex_addon_dev_php/services/frankenphp/samples/env/prod/docker/docker-compose.yml +0 -0
- {wexample_wex_addon_dev_php-9.0.0 → wexample_wex_addon_dev_php-12.0.0}/src/wexample_wex_addon_dev_php/services/frankenphp/samples/php/.wex.yml +0 -0
- {wexample_wex_addon_dev_php-9.0.0 → wexample_wex_addon_dev_php-12.0.0}/src/wexample_wex_addon_dev_php/services/frankenphp/samples/php/web.ini +0 -0
- {wexample_wex_addon_dev_php-9.0.0 → wexample_wex_addon_dev_php-12.0.0}/src/wexample_wex_addon_dev_php/services/frankenphp/service.yml +0 -0
- {wexample_wex_addon_dev_php-9.0.0 → wexample_wex_addon_dev_php-12.0.0}/src/wexample_wex_addon_dev_php/services/laravel/app_service.py +0 -0
- {wexample_wex_addon_dev_php-9.0.0/src/wexample_wex_addon_dev_php/services/laravel/commands/db → wexample_wex_addon_dev_php-12.0.0/src/wexample_wex_addon_dev_php/services/laravel/commands}/__init__.py +0 -0
- {wexample_wex_addon_dev_php-9.0.0/src/wexample_wex_addon_dev_php/services/laravel/commands/maintenance → wexample_wex_addon_dev_php-12.0.0/src/wexample_wex_addon_dev_php/services/laravel/commands/db}/__init__.py +0 -0
- {wexample_wex_addon_dev_php-9.0.0 → wexample_wex_addon_dev_php-12.0.0}/src/wexample_wex_addon_dev_php/services/laravel/commands/db/migrate.yml +0 -0
- {wexample_wex_addon_dev_php-9.0.0/src/wexample_wex_addon_dev_php/services/laravel/commands/service → wexample_wex_addon_dev_php-12.0.0/src/wexample_wex_addon_dev_php/services/laravel/commands/maintenance}/__init__.py +0 -0
- {wexample_wex_addon_dev_php-9.0.0 → wexample_wex_addon_dev_php-12.0.0}/src/wexample_wex_addon_dev_php/services/laravel/commands/maintenance/disable.yml +0 -0
- {wexample_wex_addon_dev_php-9.0.0 → wexample_wex_addon_dev_php-12.0.0}/src/wexample_wex_addon_dev_php/services/laravel/commands/maintenance/enable.yml +0 -0
- {wexample_wex_addon_dev_php-9.0.0/src/wexample_wex_addon_dev_php/services/new_php → wexample_wex_addon_dev_php-12.0.0/src/wexample_wex_addon_dev_php/services/laravel/commands/service}/__init__.py +0 -0
- {wexample_wex_addon_dev_php-9.0.0 → wexample_wex_addon_dev_php-12.0.0}/src/wexample_wex_addon_dev_php/services/laravel/commands/service/install_local.py +0 -0
- {wexample_wex_addon_dev_php-9.0.0 → wexample_wex_addon_dev_php-12.0.0}/src/wexample_wex_addon_dev_php/services/laravel/commands/service/refresh_lock.py +0 -0
- {wexample_wex_addon_dev_php-9.0.0 → wexample_wex_addon_dev_php-12.0.0}/src/wexample_wex_addon_dev_php/services/laravel/docker/.wex.yml +0 -0
- {wexample_wex_addon_dev_php-9.0.0 → wexample_wex_addon_dev_php-12.0.0}/src/wexample_wex_addon_dev_php/services/laravel/docker/docker-compose.yml +0 -0
- {wexample_wex_addon_dev_php-9.0.0 → wexample_wex_addon_dev_php-12.0.0}/src/wexample_wex_addon_dev_php/services/laravel/samples/.wex.yml +0 -0
- {wexample_wex_addon_dev_php-9.0.0 → wexample_wex_addon_dev_php-12.0.0}/src/wexample_wex_addon_dev_php/services/laravel/samples/docker/docker-compose.yml +0 -0
- {wexample_wex_addon_dev_php-9.0.0 → wexample_wex_addon_dev_php-12.0.0}/src/wexample_wex_addon_dev_php/services/laravel/samples/env/dev/docker/docker-compose.yml +0 -0
- {wexample_wex_addon_dev_php-9.0.0 → wexample_wex_addon_dev_php-12.0.0}/src/wexample_wex_addon_dev_php/services/laravel/samples/env/prod/docker/docker-compose.yml +0 -0
- {wexample_wex_addon_dev_php-9.0.0 → wexample_wex_addon_dev_php-12.0.0}/src/wexample_wex_addon_dev_php/services/laravel/service.yml +0 -0
- {wexample_wex_addon_dev_php-9.0.0/src/wexample_wex_addon_dev_php/services/new_symfony → wexample_wex_addon_dev_php-12.0.0/src/wexample_wex_addon_dev_php/services/php}/__init__.py +0 -0
- {wexample_wex_addon_dev_php-9.0.0/src/wexample_wex_addon_dev_php/services/new_php → wexample_wex_addon_dev_php-12.0.0/src/wexample_wex_addon_dev_php/services/php}/docker/.wex.yml +0 -0
- {wexample_wex_addon_dev_php-9.0.0/src/wexample_wex_addon_dev_php/services/new_php → wexample_wex_addon_dev_php-12.0.0/src/wexample_wex_addon_dev_php/services/php}/samples/.wex.yml +0 -0
- {wexample_wex_addon_dev_php-9.0.0/src/wexample_wex_addon_dev_php/services/new_php → wexample_wex_addon_dev_php-12.0.0/src/wexample_wex_addon_dev_php/services/php}/samples/caddy/.wex.yml +0 -0
- {wexample_wex_addon_dev_php-9.0.0/src/wexample_wex_addon_dev_php/services/new_php → wexample_wex_addon_dev_php-12.0.0/src/wexample_wex_addon_dev_php/services/php}/samples/docker/.wex.yml +0 -0
- {wexample_wex_addon_dev_php-9.0.0/src/wexample_wex_addon_dev_php/services/new_php → wexample_wex_addon_dev_php-12.0.0/src/wexample_wex_addon_dev_php/services/php}/samples/env/dev/docker/.wex.yml +0 -0
- {wexample_wex_addon_dev_php-9.0.0/src/wexample_wex_addon_dev_php/services/new_php → wexample_wex_addon_dev_php-12.0.0/src/wexample_wex_addon_dev_php/services/php}/samples/env/local/docker/.wex.yml +0 -0
- {wexample_wex_addon_dev_php-9.0.0/src/wexample_wex_addon_dev_php/services/new_php → wexample_wex_addon_dev_php-12.0.0/src/wexample_wex_addon_dev_php/services/php}/samples/env/prod/docker/.wex.yml +0 -0
- {wexample_wex_addon_dev_php-9.0.0/src/wexample_wex_addon_dev_php/services/new_php → wexample_wex_addon_dev_php-12.0.0/src/wexample_wex_addon_dev_php/services/php}/samples/php/.wex.yml +0 -0
- {wexample_wex_addon_dev_php-9.0.0/src/wexample_wex_addon_dev_php/services/new_php → wexample_wex_addon_dev_php-12.0.0/src/wexample_wex_addon_dev_php/services/php}/samples/php/web.ini +0 -0
- {wexample_wex_addon_dev_php-9.0.0/src/wexample_wex_addon_dev_php/services/phpmyadmin/commands → wexample_wex_addon_dev_php-12.0.0/src/wexample_wex_addon_dev_php/services/phpmyadmin}/__init__.py +0 -0
- {wexample_wex_addon_dev_php-9.0.0/src/wexample_wex_addon_dev_php/services/phpmyadmin/commands/runtime → wexample_wex_addon_dev_php-12.0.0/src/wexample_wex_addon_dev_php/services/phpmyadmin/commands}/__init__.py +0 -0
- {wexample_wex_addon_dev_php-9.0.0/src/wexample_wex_addon_dev_php/services/symfony → wexample_wex_addon_dev_php-12.0.0/src/wexample_wex_addon_dev_php/services/phpmyadmin/commands/runtime}/__init__.py +0 -0
- {wexample_wex_addon_dev_php-9.0.0 → wexample_wex_addon_dev_php-12.0.0}/src/wexample_wex_addon_dev_php/services/phpmyadmin/docker/docker-compose.yml +0 -0
- {wexample_wex_addon_dev_php-9.0.0/src/wexample_wex_addon_dev_php/services/php/docker → wexample_wex_addon_dev_php-12.0.0/src/wexample_wex_addon_dev_php/services/phpmyadmin/env}/.wex.yml +0 -0
- {wexample_wex_addon_dev_php-9.0.0 → wexample_wex_addon_dev_php-12.0.0}/src/wexample_wex_addon_dev_php/services/phpmyadmin/env/local/docker/docker-compose.yml +0 -0
- {wexample_wex_addon_dev_php-9.0.0 → wexample_wex_addon_dev_php-12.0.0}/src/wexample_wex_addon_dev_php/services/phpmyadmin/service.yml +0 -0
- {wexample_wex_addon_dev_php-9.0.0/src/wexample_wex_addon_dev_php/services/symfony/commands → wexample_wex_addon_dev_php-12.0.0/src/wexample_wex_addon_dev_php/services/symfony}/__init__.py +0 -0
- {wexample_wex_addon_dev_php-9.0.0/src/wexample_wex_addon_dev_php/services/symfony/commands/service → wexample_wex_addon_dev_php-12.0.0/src/wexample_wex_addon_dev_php/services/symfony/ai}/__init__.py +0 -0
- /wexample_wex_addon_dev_php-9.0.0/src/wexample_wex_addon_dev_php/services/php/samples/env/dev/cron/default.cron → /wexample_wex_addon_dev_php-12.0.0/src/wexample_wex_addon_dev_php/services/symfony/ai/shared/__init__.py +0 -0
- /wexample_wex_addon_dev_php-9.0.0/src/wexample_wex_addon_dev_php/services/php/samples/env/local/cron/default.cron → /wexample_wex_addon_dev_php-12.0.0/src/wexample_wex_addon_dev_php/services/symfony/commands/__init__.py +0 -0
- /wexample_wex_addon_dev_php-9.0.0/src/wexample_wex_addon_dev_php/services/php/samples/env/prod/cron/default.cron → /wexample_wex_addon_dev_php-12.0.0/src/wexample_wex_addon_dev_php/services/symfony/commands/service/__init__.py +0 -0
- {wexample_wex_addon_dev_php-9.0.0 → wexample_wex_addon_dev_php-12.0.0}/src/wexample_wex_addon_dev_php/services/symfony/commands/service/deploy.py +0 -0
- {wexample_wex_addon_dev_php-9.0.0 → wexample_wex_addon_dev_php-12.0.0}/src/wexample_wex_addon_dev_php/services/wordpress/commands/__init__.py +0 -0
- {wexample_wex_addon_dev_php-9.0.0 → wexample_wex_addon_dev_php-12.0.0}/src/wexample_wex_addon_dev_php/services/wordpress/commands/service/__init__.py +0 -0
- {wexample_wex_addon_dev_php-9.0.0 → wexample_wex_addon_dev_php-12.0.0}/src/wexample_wex_addon_dev_php/services/wordpress/commands/url/__init__.py +0 -0
- {wexample_wex_addon_dev_php-9.0.0 → wexample_wex_addon_dev_php-12.0.0}/src/wexample_wex_addon_dev_php/services/wordpress/commands/url/replace.py +0 -0
- {wexample_wex_addon_dev_php-9.0.0 → wexample_wex_addon_dev_php-12.0.0}/src/wexample_wex_addon_dev_php/services/wordpress/docker/.wex.yml +0 -0
- {wexample_wex_addon_dev_php-9.0.0 → wexample_wex_addon_dev_php-12.0.0}/src/wexample_wex_addon_dev_php/services/wordpress/samples/.wex.yml +0 -0
- {wexample_wex_addon_dev_php-9.0.0 → wexample_wex_addon_dev_php-12.0.0}/src/wexample_wex_addon_dev_php/services/wordpress/samples/docker/docker-compose-cli.yml +0 -0
- {wexample_wex_addon_dev_php-9.0.0 → wexample_wex_addon_dev_php-12.0.0}/src/wexample_wex_addon_dev_php/services/wordpress/samples/docker/docker-compose.yml +0 -0
- {wexample_wex_addon_dev_php-9.0.0 → wexample_wex_addon_dev_php-12.0.0}/src/wexample_wex_addon_dev_php/services/wordpress/samples/env/dev/docker/docker-compose.yml +0 -0
- {wexample_wex_addon_dev_php-9.0.0 → wexample_wex_addon_dev_php-12.0.0}/src/wexample_wex_addon_dev_php/services/wordpress/samples/env/local/wp-cli/.gitkeep +0 -0
- {wexample_wex_addon_dev_php-9.0.0 → wexample_wex_addon_dev_php-12.0.0}/src/wexample_wex_addon_dev_php/services/wordpress/samples/env/prod/docker/docker-compose.yml +0 -0
- {wexample_wex_addon_dev_php-9.0.0 → wexample_wex_addon_dev_php-12.0.0}/src/wexample_wex_addon_dev_php/services/wordpress/service.yml +0 -0
- {wexample_wex_addon_dev_php-9.0.0 → wexample_wex_addon_dev_php-12.0.0}/src/wexample_wex_addon_dev_php/workdir/php_packages_suite_workdir.py +0 -0
- {wexample_wex_addon_dev_php-9.0.0 → wexample_wex_addon_dev_php-12.0.0}/src/wexample_wex_addon_dev_php/workdir/php_workdir.py +0 -0
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: wexample-wex-addon-dev-php
|
|
3
|
+
Version: 12.0.0
|
|
4
|
+
Summary: Extends wex with PHP-specific development commands for Composer, Laravel, Symfony, and WordPress services running in Docker containers
|
|
5
|
+
Author-Email: weeger <contact@wexample.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Classifier: Programming Language :: Python :: 3
|
|
8
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
9
|
+
Classifier: Operating System :: OS Independent
|
|
10
|
+
Project-URL: homepage, https://github.com/wexample/python-wex-dev-python
|
|
11
|
+
Requires-Python: >=3.10
|
|
12
|
+
Requires-Dist: attrs>=23.1.0
|
|
13
|
+
Requires-Dist: cattrs>=23.1.0
|
|
14
|
+
Requires-Dist: wexample-filestate-php>=6.4.0
|
|
15
|
+
Requires-Dist: wexample-filestate-symfony>=1.1.0
|
|
16
|
+
Requires-Dist: wexample-wex-addon-ai>=14.0.0
|
|
17
|
+
Requires-Dist: wexample-wex-addon-app>=31.0.0
|
|
18
|
+
Requires-Dist: wexample-wex-addon-dev-javascript>=8.1.0
|
|
19
|
+
Provides-Extra: dev
|
|
20
|
+
Requires-Dist: pytest; extra == "dev"
|
|
21
|
+
Requires-Dist: pytest-cov; extra == "dev"
|
|
22
|
+
Description-Content-Type: text/markdown
|
|
23
|
+
|
|
24
|
+
# wex_addon_dev_php
|
|
25
|
+
|
|
26
|
+
Version: 12.0.0
|
|
27
|
+
|
|
28
|
+
`wex_addon_dev_php` extends the wex CLI with PHP-specific development commands for Composer, Laravel, Symfony, and WordPress services running in Docker containers. It is aimed at PHP developers who manage their apps through wex and need framework-aware automation — dependency wiring, migration runs, lock-file refreshes — executed directly inside the running service containers. The addon registers four workdir types (`php`, `php-package`, `php-packages-suite`, `php-symfony`) and contributes its commands through the standard `PhpAddonManager` plugin point.
|
|
29
|
+
|
|
30
|
+
## Table of Contents
|
|
31
|
+
|
|
32
|
+
- [Installation](#installation)
|
|
33
|
+
- [Quickstart](#quickstart)
|
|
34
|
+
- [Tests](#tests)
|
|
35
|
+
- [Architecture](#architecture)
|
|
36
|
+
- [Integration in the Suite](#integration-in-the-suite)
|
|
37
|
+
- [Dependencies](#dependencies)
|
|
38
|
+
- [Versioning & Compatibility Policy](#versioning--compatibility-policy)
|
|
39
|
+
- [License](#license)
|
|
40
|
+
- [About us](#about-us)
|
|
41
|
+
- [Known Limitations & Roadmap](#known-limitations--roadmap)
|
|
42
|
+
- [Status & Compatibility](#status--compatibility)
|
|
43
|
+
- [Useful Links](#useful-links)
|
|
44
|
+
- [Migration Notes](#migration-notes)
|
|
45
|
+
|
|
46
|
+
## Installation
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
pip install wexample-wex-addon-dev-php
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Requires Python >=3.10.
|
|
53
|
+
|
|
54
|
+
## Quickstart
|
|
55
|
+
|
|
56
|
+
Install the package:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
pip install wexample-wex-addon-dev-php
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
The addon's plugin class is in src/wexample_wex_addon_dev_php/php_addon_manager.py:
|
|
63
|
+
|
|
64
|
+
```python
|
|
65
|
+
from wexample_wex_addon_dev_php.php_addon_manager import PhpAddonManager
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Passing `PhpAddonManager` to the wex kernel registers four workdir types — `php`, `php-package`, `php-packages-suite`, `php-symfony` — and auto-discovers every service command under `services/`.
|
|
69
|
+
|
|
70
|
+
One ready-to-use command is `symfony/service/deploy`, defined in src/wexample_wex_addon_dev_php/services/symfony/commands/service/deploy.py. When wex invokes it against a running Symfony container it executes:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
cd /var/www/html
|
|
74
|
+
if [ -d migrations ]; then
|
|
75
|
+
bin/console doctrine:migrations:migrate --no-interaction --allow-no-migration
|
|
76
|
+
fi
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Pending Doctrine migrations are applied; if there are none, the command exits cleanly.
|
|
80
|
+
|
|
81
|
+
## Tests
|
|
82
|
+
|
|
83
|
+
This project uses `pytest` for testing and `pytest-cov` for code coverage analysis.
|
|
84
|
+
|
|
85
|
+
### Installation
|
|
86
|
+
|
|
87
|
+
First, install the required testing dependencies:
|
|
88
|
+
```bash
|
|
89
|
+
.venv/bin/python -m pip install pytest pytest-cov
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### Basic Usage
|
|
93
|
+
|
|
94
|
+
Run all tests with coverage:
|
|
95
|
+
```bash
|
|
96
|
+
.venv/bin/python -m pytest --cov --cov-report=html
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Common Commands
|
|
100
|
+
```bash
|
|
101
|
+
# Run tests with coverage for a specific module
|
|
102
|
+
.venv/bin/python -m pytest --cov=your_module
|
|
103
|
+
|
|
104
|
+
# Show which lines are not covered
|
|
105
|
+
.venv/bin/python -m pytest --cov=your_module --cov-report=term-missing
|
|
106
|
+
|
|
107
|
+
# Generate an HTML coverage report
|
|
108
|
+
.venv/bin/python -m pytest --cov=your_module --cov-report=html
|
|
109
|
+
|
|
110
|
+
# Combine terminal and HTML reports
|
|
111
|
+
.venv/bin/python -m pytest --cov=your_module --cov-report=term-missing --cov-report=html
|
|
112
|
+
|
|
113
|
+
# Run specific test file with coverage
|
|
114
|
+
.venv/bin/python -m pytest tests/test_file.py --cov=your_module --cov-report=term-missing
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### Viewing HTML Reports
|
|
118
|
+
|
|
119
|
+
After generating an HTML report, open `htmlcov/index.html` in your browser to view detailed line-by-line coverage information.
|
|
120
|
+
|
|
121
|
+
### Coverage Threshold
|
|
122
|
+
|
|
123
|
+
To enforce a minimum coverage percentage:
|
|
124
|
+
```bash
|
|
125
|
+
.venv/bin/python -m pytest --cov=your_module --cov-fail-under=80
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
This will cause the test suite to fail if coverage drops below 80%.
|
|
129
|
+
|
|
130
|
+
## Architecture
|
|
131
|
+
|
|
132
|
+
The addon is a Python package (`wexample-wex-addon-dev-php`) that plugs into the wex CLI through a single manager class. Its parts are: the entry-point manager, a workdir layer (four types), a set of support types, and a service layer where each PHP framework contributes Docker container definitions and commands.
|
|
133
|
+
|
|
134
|
+
### Entry point
|
|
135
|
+
|
|
136
|
+
src/wexample_wex_addon_dev_php/php_addon_manager.py is the class the host kernel receives. It extends `AbstractAddonManager` and does two things: it reports the package module so wex can auto-discover every service command nested under `services/`, and it declares the four workdir types the addon adds:
|
|
137
|
+
|
|
138
|
+
```python
|
|
139
|
+
return {
|
|
140
|
+
"php": PhpWorkdir,
|
|
141
|
+
"php-package": PhpPackageWorkdir,
|
|
142
|
+
"php-packages-suite": PhpPackagesSuiteWorkdir,
|
|
143
|
+
"php-symfony": PhpSymfonyWorkdir,
|
|
144
|
+
}
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### Workdir layer
|
|
148
|
+
|
|
149
|
+
The four workdir types form a hierarchy rooted in `PhpWorkdir`.
|
|
150
|
+
|
|
151
|
+
#### PhpWorkdir
|
|
152
|
+
|
|
153
|
+
src/wexample_wex_addon_dev_php/workdir/php_workdir.py is the base for all PHP projects. It extends `CodeBaseWorkdir` and `WithAiWorkdirMixin`. Its `prepare_value` declares the expected filesystem shape: `composer.json` (must exist), `src/` and `tests/` directories (both required), and an optional `package.json` entry that is included only when the file exists on disk. PHP source files in both directories automatically pick up `PhpcsFixerOption`. `get_app_config_file` returns a `PhpComposerJsonFile`; `get_dependency_manifests` appends `package.json` when present so that polyglot apps (Symfony or Laravel with a Node-built frontend) follow composer version syncs. Tests are run via `vendor/bin/phpunit`; `has_tests` checks for at least one `*Test.php` file under `tests/`.
|
|
154
|
+
|
|
155
|
+
#### PhpPackageWorkdir
|
|
156
|
+
|
|
157
|
+
src/wexample_wex_addon_dev_php/workdir/php_package_workdir.py extends `PhpWorkdir` and adds the mechanics for an individual distributable Composer library.
|
|
158
|
+
|
|
159
|
+
Backward-compatibility checking uses a dedicated Docker runner built from src/wexample_wex_addon_dev_php/resources/docker/Dockerfile.roave (PHP 8.4 with `roave/backward-compatibility-check` installed globally). When classifying a version bump, the workdir mounts the git repository root at `/var/www/html` and runs `roave-backward-compatibility-check --from=<last_tag>` inside the container; a non-zero exit promotes the bump to `major`.
|
|
160
|
+
|
|
161
|
+
Publishing adds a Packagist-friendly annotated tag (`vX.Y.Z`) on top of what the base class produces, then pushes to the deployment remote via `push_to_deployment_remote`.
|
|
162
|
+
|
|
163
|
+
`search_in_codebase` walks every `PhpFile` child recursively; `search_imports_in_codebase` wraps it with a regex that matches `use Vendor\Package\...;` and qualified references.
|
|
164
|
+
|
|
165
|
+
#### PhpPackagesSuiteWorkdir
|
|
166
|
+
|
|
167
|
+
src/wexample_wex_addon_dev_php/workdir/php_packages_suite_workdir.py extends `FrameworkPackageSuiteWorkdir`. It identifies child package directories by the presence of a `composer.json` file (`_child_is_package_directory`) and materialises each as a `PhpPackageWorkdir`. The child package directory name reported to the framework is `"composer"`.
|
|
168
|
+
|
|
169
|
+
#### PhpSymfonyWorkdir
|
|
170
|
+
|
|
171
|
+
src/wexample_wex_addon_dev_php/workdir/php_symfony_workdir.py extends `PhpWorkdir`. Its `apply` runs the PHP pass first, then creates a `JavascriptWorkdir` for the same path and runs its apply pass — covering Symfony apps that ship a Node-built frontend alongside their PHP source.
|
|
172
|
+
|
|
173
|
+
### Support types
|
|
174
|
+
|
|
175
|
+
#### PhpComposerJsonFile
|
|
176
|
+
|
|
177
|
+
src/wexample_wex_addon_dev_php/file/php_composer_json_file.py wraps `composer.json` as a typed `JsonFile` via `AppDependenciesConfigFileMixin`. Its responsibilities:
|
|
178
|
+
|
|
179
|
+
- `get_dependencies_versions` reads the `require` block and returns it as `dict[str, str]`
|
|
180
|
+
- `add_dependency_from_string` adds or updates a constraint in `require` or `require-dev`
|
|
181
|
+
- `dumps` injects the package name (derived from the workdir's vendor and project names) and version at write time
|
|
182
|
+
- `set_private_registry_packages` pins each forge-style composer repository (URL containing `/packages/composer`) to an `only` list of private package names, preventing it from masking newer Packagist versions
|
|
183
|
+
|
|
184
|
+
#### PhpPackageReadmeContentConfigValue
|
|
185
|
+
|
|
186
|
+
src/wexample_wex_addon_dev_php/config_value/php_package_readme_config_value.py extends `AppReadmeConfigValue` and overrides `_get_app_description` to pull the description field from `composer.json` before falling back to the generic base logic.
|
|
187
|
+
|
|
188
|
+
#### DomainTag
|
|
189
|
+
|
|
190
|
+
src/wexample_wex_addon_dev_php/const/tags.py declares the five domain tags the addon's commands use: `APP_LIFECYCLE`, `CONFIG`, `DB`, `FRAMEWORK`, `LANGUAGE_PHP`. Every `@command` decorator in this package references one or more of them in its `tags=` list.
|
|
191
|
+
|
|
192
|
+
### Service layer
|
|
193
|
+
|
|
194
|
+
Services live under `src/wexample_wex_addon_dev_php/services/`. Each service has a `service.yml`, a `docker/docker-compose.yml`, optional env-specific compose overlays under `samples/env/{dev,prod,local}/`, and a `commands/` sub-tree with Python or YAML command files.
|
|
195
|
+
|
|
196
|
+
#### php
|
|
197
|
+
|
|
198
|
+
Defined in src/wexample_wex_addon_dev_php/services/php/service.yml and src/wexample_wex_addon_dev_php/services/php/docker/docker-compose.yml. The base PHP service: runs `dunglas/frankenphp:php8.4`, mounts the app at `/var/www/html`, and binds a `Caddyfile` and a `web.ini` from the runtime config. The `laravel` and `symfony` containers extend this compose service definition. Sample files for the Caddyfile (serving from `public/`, `php_server` directive) and `web.ini` (upload limits, memory limit) are shipped in `services/php/samples/`.
|
|
199
|
+
|
|
200
|
+
#### frankenphp
|
|
201
|
+
|
|
202
|
+
Defined in src/wexample_wex_addon_dev_php/services/frankenphp/service.yml. A standalone FrankenPHP service with the same image and binding conventions as `php`, used when the app does not need the `php` base service name.
|
|
203
|
+
|
|
204
|
+
#### composer
|
|
205
|
+
|
|
206
|
+
Defined in src/wexample_wex_addon_dev_php/services/composer/service.yml. A dedicated Composer container (`composer:latest`) that mounts the app at `/var/www/html` and stays alive via `tail -f /dev/null`. Its commands are the generic lock-management routines that Laravel and Symfony both call.
|
|
207
|
+
|
|
208
|
+
#### laravel
|
|
209
|
+
|
|
210
|
+
Defined in src/wexample_wex_addon_dev_php/services/laravel/service.yml; extends the `php` compose service and declares a MySQL dependency. src/wexample_wex_addon_dev_php/services/laravel/app_service.py contributes a workdir filestate requirement: uid `82:82` (www-data in Alpine images) on `storage/` and `bootstrap/cache/`, enforced by `get_workdir_contribution`.
|
|
211
|
+
|
|
212
|
+
#### symfony
|
|
213
|
+
|
|
214
|
+
Defined in src/wexample_wex_addon_dev_php/services/symfony/service.yml; extends the `php` compose service. src/wexample_wex_addon_dev_php/services/symfony/app_service.py applies the same uid `82:82` requirement to `var/`. src/wexample_wex_addon_dev_php/services/symfony/knowledge/entity.md is a static knowledge fragment injected into AI context: it states that every Symfony entity must extend `AbstractEntity` from `wexample-symfony-helpers`.
|
|
215
|
+
|
|
216
|
+
#### wordpress
|
|
217
|
+
|
|
218
|
+
Defined in src/wexample_wex_addon_dev_php/services/wordpress/service.yml. Runs `wordpress:6.3.1-php8.2-apache` plus a `wordpress_cli` sidecar (`wordpress:cli-2.7.1-php8.2`) defined in src/wexample_wex_addon_dev_php/services/wordpress/docker/docker-compose.yml. WordPress commands target the sidecar by constructing its container name as `{app_project_name}_wordpress_cli`.
|
|
219
|
+
|
|
220
|
+
#### phpmyadmin
|
|
221
|
+
|
|
222
|
+
Defined in src/wexample_wex_addon_dev_php/services/phpmyadmin/service.yml. Runs `phpmyadmin/phpmyadmin:5.2` on the shared `wex_net` network; the local env overlay injects `PMA_USER` and `PMA_PASSWORD`.
|
|
223
|
+
|
|
224
|
+
### Commands
|
|
225
|
+
|
|
226
|
+
#### Composer (generic, reused by Laravel and Symfony)
|
|
227
|
+
|
|
228
|
+
src/wexample_wex_addon_dev_php/services/composer/commands/service/install_local.py is the shared local-wiring routine. It reads `local_packages.php` from the runtime config, runs `composer install --no-scripts` inside the target container, symlinks every local-dev package directory from `VENDOR_DEV_DIR/<vendor>/<pkg>` into `vendor/`, then runs `composer dump-autoload`. The constants `APP_DIR = "/var/www/html"` and `VENDOR_DEV_DIR = "/var/www/vendor-dev"` are exported so framework services can import them.
|
|
229
|
+
|
|
230
|
+
src/wexample_wex_addon_dev_php/services/composer/commands/service/refresh_lock.py runs `composer update --no-install --with-all-dependencies <packages>` inside the container. `--no-install` rewrites `composer.lock` without touching `vendor/` (which may hold local development symlinks); `--with-all-dependencies` allows sibling library constraints to move.
|
|
231
|
+
|
|
232
|
+
#### Laravel
|
|
233
|
+
|
|
234
|
+
src/wexample_wex_addon_dev_php/services/laravel/commands/service/install_local.py clears `bootstrap/cache/packages.php` and `bootstrap/cache/services.php` before delegating to `composer__service__install_local`, then runs `php artisan optimize:clear` to flush the rebuilt service-provider cache.
|
|
235
|
+
|
|
236
|
+
src/wexample_wex_addon_dev_php/services/laravel/commands/service/refresh_lock.py delegates to the generic composer and node `refresh_lock` functions, selecting each by whether the corresponding packages argument is non-empty.
|
|
237
|
+
|
|
238
|
+
src/wexample_wex_addon_dev_php/services/laravel/commands/maintenance/enable.yml is a YAML command that attaches `after app::maintenance/enable` and runs `php artisan down` in the Laravel container. Its mirror, src/wexample_wex_addon_dev_php/services/laravel/commands/maintenance/disable.yml, attaches `after app::maintenance/disable` and runs `php artisan up`.
|
|
239
|
+
|
|
240
|
+
src/wexample_wex_addon_dev_php/services/laravel/commands/db/migrate.yml attaches `before app::maintenance/disable` and runs `php artisan migrate --force --no-interaction -vvv`, so migrations complete before the app is brought back up.
|
|
241
|
+
|
|
242
|
+
#### Symfony
|
|
243
|
+
|
|
244
|
+
src/wexample_wex_addon_dev_php/services/symfony/commands/service/install_local.py calls `composer__service__install_local` and `node__service__install_local` in sequence, then runs `bin/console cache:clear` inside the container.
|
|
245
|
+
|
|
246
|
+
src/wexample_wex_addon_dev_php/services/symfony/commands/service/deploy.py is the post-deployment hook: it runs `doctrine:migrations:migrate --no-interaction --allow-no-migration` inside the container. `--no-interaction` is required because the deploy webhook has no TTY; without it, data-loss prompts silently abort the migration.
|
|
247
|
+
|
|
248
|
+
#### WordPress
|
|
249
|
+
|
|
250
|
+
src/wexample_wex_addon_dev_php/services/wordpress/commands/url/replace.py resolves the current site URL by running `wp option get siteurl` inside the `wordpress_cli` sidecar, then calls `wp search-replace <old> <new> --skip-columns=guid`. When `--new-url` is omitted, the target URL is guessed from the first domain in the runtime config's `app.domains` list.
|
|
251
|
+
|
|
252
|
+
### Call path
|
|
253
|
+
|
|
254
|
+
A typical Python service command goes through these steps:
|
|
255
|
+
|
|
256
|
+
1. The wex CLI resolves the command name (e.g. `symfony/service/install_local`) through the registry built by `PhpAddonManager.get_package_module`, which points at the `wexample_wex_addon_dev_php` package for auto-discovery.
|
|
257
|
+
2. The framework constructs an `ExecutionContext` carrying the kernel, IO handle, and the resolved `AppService` for the target service.
|
|
258
|
+
3. The command function receives `context` and `service`; it calls `service.addon_manager.docker_exec(service.name, [...])` to run a shell fragment inside the named Docker container (e.g. `{app_project_name}_symfony`).
|
|
259
|
+
4. For commands that delegate to the generic Composer routines (Laravel `install_local` and `refresh_lock`, Symfony `install_local`), the inner function is called directly in the same Python frame — `composer__service__install_local.function(context=context, service=service)` — reusing the same `service` so execution happens inside the calling service's container, not the composer container.
|
|
260
|
+
5. YAML commands (`maintenance/enable.yml`, `db/migrate.yml`) follow the same resolution path but their shell scripts are executed by the wex YAML runner, which maps `runner: docker` + `service: laravel` to the equivalent `docker exec` call.
|
|
261
|
+
|
|
262
|
+
## Integration in the Suite
|
|
263
|
+
|
|
264
|
+
This package is part of the Wexample Suite — a collection of high-quality, modular tools designed to work seamlessly together across multiple languages and environments.
|
|
265
|
+
|
|
266
|
+
### Related Packages
|
|
267
|
+
|
|
268
|
+
The suite includes packages for configuration management, file handling, prompts, and more. Each package can be used independently or as part of the integrated suite.
|
|
269
|
+
|
|
270
|
+
Visit the [Wexample Suite documentation](https://docs.wexample.com) for the complete package ecosystem.
|
|
271
|
+
|
|
272
|
+
## Dependencies
|
|
273
|
+
|
|
274
|
+
- attrs: >=23.1.0
|
|
275
|
+
- cattrs: >=23.1.0
|
|
276
|
+
- wexample-filestate-php: >=6.4.0
|
|
277
|
+
- wexample-filestate-symfony: >=1.1.0
|
|
278
|
+
- wexample-wex-addon-ai: >=14.0.0
|
|
279
|
+
- wexample-wex-addon-app: >=31.0.0
|
|
280
|
+
- wexample-wex-addon-dev-javascript: >=8.1.0
|
|
281
|
+
|
|
282
|
+
## Versioning & Compatibility Policy
|
|
283
|
+
|
|
284
|
+
Wexample packages follow **Semantic Versioning** (SemVer):
|
|
285
|
+
|
|
286
|
+
- **MAJOR**: Breaking changes
|
|
287
|
+
- **MINOR**: New features, backward compatible
|
|
288
|
+
- **PATCH**: Bug fixes, backward compatible
|
|
289
|
+
|
|
290
|
+
We maintain backward compatibility within major versions and provide clear migration guides for breaking changes.
|
|
291
|
+
|
|
292
|
+
## License
|
|
293
|
+
|
|
294
|
+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
|
295
|
+
|
|
296
|
+
Free to use in both personal and commercial projects.
|
|
297
|
+
|
|
298
|
+
## About us
|
|
299
|
+
|
|
300
|
+
[Wexample](https://wexample.com) stands as a cornerstone of the digital ecosystem — a collective of seasoned engineers, researchers, and creators driven by a relentless pursuit of technological excellence. More than a media platform, it has grown into a vibrant community where innovation meets craftsmanship, and where every line of code reflects a commitment to clarity, durability, and shared intelligence.
|
|
301
|
+
|
|
302
|
+
This packages suite embodies this spirit. Trusted by professionals and enthusiasts alike, it delivers a consistent, high-quality foundation for modern development — open, elegant, and battle-tested. Its reputation is built on years of collaboration, refinement, and rigorous attention to detail, making it a natural choice for those who demand both robustness and beauty in their tools.
|
|
303
|
+
|
|
304
|
+
Wexample cultivates a culture of mastery. Each package, each contribution carries the mark of a community that values precision, ethics, and innovation — a community proud to shape the future of digital craftsmanship.
|
|
305
|
+
|
|
306
|
+
## Known Limitations & Roadmap
|
|
307
|
+
|
|
308
|
+
Current limitations and planned features are tracked in the GitHub issues.
|
|
309
|
+
|
|
310
|
+
See the [project roadmap](https://github.com/wexample/python-wex_addon_dev_php/issues) for upcoming features and improvements.
|
|
311
|
+
|
|
312
|
+
## Status & Compatibility
|
|
313
|
+
|
|
314
|
+
**Maturity**: Production-ready
|
|
315
|
+
|
|
316
|
+
**Python Support**: >=3.10
|
|
317
|
+
|
|
318
|
+
**OS Support**: Linux, macOS, Windows
|
|
319
|
+
|
|
320
|
+
**Status**: Actively maintained
|
|
321
|
+
|
|
322
|
+
## Useful Links
|
|
323
|
+
|
|
324
|
+
- **Homepage**: https://github.com/wexample/python-wex-addon-dev-php
|
|
325
|
+
- **Documentation**: [docs.wexample.com](https://docs.wexample.com)
|
|
326
|
+
- **Issue Tracker**: https://github.com/wexample/python-wex-addon-dev-php/issues
|
|
327
|
+
- **Discussions**: https://github.com/wexample/python-wex-addon-dev-php/discussions
|
|
328
|
+
- **PyPI**: [pypi.org/project/wexample-wex-addon-dev-php](https://pypi.org/project/wexample-wex-addon-dev-php/)
|
|
329
|
+
|
|
330
|
+
## Migration Notes
|
|
331
|
+
|
|
332
|
+
When upgrading between major versions, refer to the migration guides in the documentation.
|
|
333
|
+
|
|
334
|
+
Breaking changes are clearly documented with upgrade paths and examples.
|
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
# wex_addon_dev_php
|
|
2
|
+
|
|
3
|
+
Version: 12.0.0
|
|
4
|
+
|
|
5
|
+
`wex_addon_dev_php` extends the wex CLI with PHP-specific development commands for Composer, Laravel, Symfony, and WordPress services running in Docker containers. It is aimed at PHP developers who manage their apps through wex and need framework-aware automation — dependency wiring, migration runs, lock-file refreshes — executed directly inside the running service containers. The addon registers four workdir types (`php`, `php-package`, `php-packages-suite`, `php-symfony`) and contributes its commands through the standard `PhpAddonManager` plugin point.
|
|
6
|
+
|
|
7
|
+
## Table of Contents
|
|
8
|
+
|
|
9
|
+
- [Installation](#installation)
|
|
10
|
+
- [Quickstart](#quickstart)
|
|
11
|
+
- [Tests](#tests)
|
|
12
|
+
- [Architecture](#architecture)
|
|
13
|
+
- [Integration in the Suite](#integration-in-the-suite)
|
|
14
|
+
- [Dependencies](#dependencies)
|
|
15
|
+
- [Versioning & Compatibility Policy](#versioning--compatibility-policy)
|
|
16
|
+
- [License](#license)
|
|
17
|
+
- [About us](#about-us)
|
|
18
|
+
- [Known Limitations & Roadmap](#known-limitations--roadmap)
|
|
19
|
+
- [Status & Compatibility](#status--compatibility)
|
|
20
|
+
- [Useful Links](#useful-links)
|
|
21
|
+
- [Migration Notes](#migration-notes)
|
|
22
|
+
|
|
23
|
+
## Installation
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
pip install wexample-wex-addon-dev-php
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Requires Python >=3.10.
|
|
30
|
+
|
|
31
|
+
## Quickstart
|
|
32
|
+
|
|
33
|
+
Install the package:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
pip install wexample-wex-addon-dev-php
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
The addon's plugin class is in src/wexample_wex_addon_dev_php/php_addon_manager.py:
|
|
40
|
+
|
|
41
|
+
```python
|
|
42
|
+
from wexample_wex_addon_dev_php.php_addon_manager import PhpAddonManager
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Passing `PhpAddonManager` to the wex kernel registers four workdir types — `php`, `php-package`, `php-packages-suite`, `php-symfony` — and auto-discovers every service command under `services/`.
|
|
46
|
+
|
|
47
|
+
One ready-to-use command is `symfony/service/deploy`, defined in src/wexample_wex_addon_dev_php/services/symfony/commands/service/deploy.py. When wex invokes it against a running Symfony container it executes:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
cd /var/www/html
|
|
51
|
+
if [ -d migrations ]; then
|
|
52
|
+
bin/console doctrine:migrations:migrate --no-interaction --allow-no-migration
|
|
53
|
+
fi
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Pending Doctrine migrations are applied; if there are none, the command exits cleanly.
|
|
57
|
+
|
|
58
|
+
## Tests
|
|
59
|
+
|
|
60
|
+
This project uses `pytest` for testing and `pytest-cov` for code coverage analysis.
|
|
61
|
+
|
|
62
|
+
### Installation
|
|
63
|
+
|
|
64
|
+
First, install the required testing dependencies:
|
|
65
|
+
```bash
|
|
66
|
+
.venv/bin/python -m pip install pytest pytest-cov
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Basic Usage
|
|
70
|
+
|
|
71
|
+
Run all tests with coverage:
|
|
72
|
+
```bash
|
|
73
|
+
.venv/bin/python -m pytest --cov --cov-report=html
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### Common Commands
|
|
77
|
+
```bash
|
|
78
|
+
# Run tests with coverage for a specific module
|
|
79
|
+
.venv/bin/python -m pytest --cov=your_module
|
|
80
|
+
|
|
81
|
+
# Show which lines are not covered
|
|
82
|
+
.venv/bin/python -m pytest --cov=your_module --cov-report=term-missing
|
|
83
|
+
|
|
84
|
+
# Generate an HTML coverage report
|
|
85
|
+
.venv/bin/python -m pytest --cov=your_module --cov-report=html
|
|
86
|
+
|
|
87
|
+
# Combine terminal and HTML reports
|
|
88
|
+
.venv/bin/python -m pytest --cov=your_module --cov-report=term-missing --cov-report=html
|
|
89
|
+
|
|
90
|
+
# Run specific test file with coverage
|
|
91
|
+
.venv/bin/python -m pytest tests/test_file.py --cov=your_module --cov-report=term-missing
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### Viewing HTML Reports
|
|
95
|
+
|
|
96
|
+
After generating an HTML report, open `htmlcov/index.html` in your browser to view detailed line-by-line coverage information.
|
|
97
|
+
|
|
98
|
+
### Coverage Threshold
|
|
99
|
+
|
|
100
|
+
To enforce a minimum coverage percentage:
|
|
101
|
+
```bash
|
|
102
|
+
.venv/bin/python -m pytest --cov=your_module --cov-fail-under=80
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
This will cause the test suite to fail if coverage drops below 80%.
|
|
106
|
+
|
|
107
|
+
## Architecture
|
|
108
|
+
|
|
109
|
+
The addon is a Python package (`wexample-wex-addon-dev-php`) that plugs into the wex CLI through a single manager class. Its parts are: the entry-point manager, a workdir layer (four types), a set of support types, and a service layer where each PHP framework contributes Docker container definitions and commands.
|
|
110
|
+
|
|
111
|
+
### Entry point
|
|
112
|
+
|
|
113
|
+
src/wexample_wex_addon_dev_php/php_addon_manager.py is the class the host kernel receives. It extends `AbstractAddonManager` and does two things: it reports the package module so wex can auto-discover every service command nested under `services/`, and it declares the four workdir types the addon adds:
|
|
114
|
+
|
|
115
|
+
```python
|
|
116
|
+
return {
|
|
117
|
+
"php": PhpWorkdir,
|
|
118
|
+
"php-package": PhpPackageWorkdir,
|
|
119
|
+
"php-packages-suite": PhpPackagesSuiteWorkdir,
|
|
120
|
+
"php-symfony": PhpSymfonyWorkdir,
|
|
121
|
+
}
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### Workdir layer
|
|
125
|
+
|
|
126
|
+
The four workdir types form a hierarchy rooted in `PhpWorkdir`.
|
|
127
|
+
|
|
128
|
+
#### PhpWorkdir
|
|
129
|
+
|
|
130
|
+
src/wexample_wex_addon_dev_php/workdir/php_workdir.py is the base for all PHP projects. It extends `CodeBaseWorkdir` and `WithAiWorkdirMixin`. Its `prepare_value` declares the expected filesystem shape: `composer.json` (must exist), `src/` and `tests/` directories (both required), and an optional `package.json` entry that is included only when the file exists on disk. PHP source files in both directories automatically pick up `PhpcsFixerOption`. `get_app_config_file` returns a `PhpComposerJsonFile`; `get_dependency_manifests` appends `package.json` when present so that polyglot apps (Symfony or Laravel with a Node-built frontend) follow composer version syncs. Tests are run via `vendor/bin/phpunit`; `has_tests` checks for at least one `*Test.php` file under `tests/`.
|
|
131
|
+
|
|
132
|
+
#### PhpPackageWorkdir
|
|
133
|
+
|
|
134
|
+
src/wexample_wex_addon_dev_php/workdir/php_package_workdir.py extends `PhpWorkdir` and adds the mechanics for an individual distributable Composer library.
|
|
135
|
+
|
|
136
|
+
Backward-compatibility checking uses a dedicated Docker runner built from src/wexample_wex_addon_dev_php/resources/docker/Dockerfile.roave (PHP 8.4 with `roave/backward-compatibility-check` installed globally). When classifying a version bump, the workdir mounts the git repository root at `/var/www/html` and runs `roave-backward-compatibility-check --from=<last_tag>` inside the container; a non-zero exit promotes the bump to `major`.
|
|
137
|
+
|
|
138
|
+
Publishing adds a Packagist-friendly annotated tag (`vX.Y.Z`) on top of what the base class produces, then pushes to the deployment remote via `push_to_deployment_remote`.
|
|
139
|
+
|
|
140
|
+
`search_in_codebase` walks every `PhpFile` child recursively; `search_imports_in_codebase` wraps it with a regex that matches `use Vendor\Package\...;` and qualified references.
|
|
141
|
+
|
|
142
|
+
#### PhpPackagesSuiteWorkdir
|
|
143
|
+
|
|
144
|
+
src/wexample_wex_addon_dev_php/workdir/php_packages_suite_workdir.py extends `FrameworkPackageSuiteWorkdir`. It identifies child package directories by the presence of a `composer.json` file (`_child_is_package_directory`) and materialises each as a `PhpPackageWorkdir`. The child package directory name reported to the framework is `"composer"`.
|
|
145
|
+
|
|
146
|
+
#### PhpSymfonyWorkdir
|
|
147
|
+
|
|
148
|
+
src/wexample_wex_addon_dev_php/workdir/php_symfony_workdir.py extends `PhpWorkdir`. Its `apply` runs the PHP pass first, then creates a `JavascriptWorkdir` for the same path and runs its apply pass — covering Symfony apps that ship a Node-built frontend alongside their PHP source.
|
|
149
|
+
|
|
150
|
+
### Support types
|
|
151
|
+
|
|
152
|
+
#### PhpComposerJsonFile
|
|
153
|
+
|
|
154
|
+
src/wexample_wex_addon_dev_php/file/php_composer_json_file.py wraps `composer.json` as a typed `JsonFile` via `AppDependenciesConfigFileMixin`. Its responsibilities:
|
|
155
|
+
|
|
156
|
+
- `get_dependencies_versions` reads the `require` block and returns it as `dict[str, str]`
|
|
157
|
+
- `add_dependency_from_string` adds or updates a constraint in `require` or `require-dev`
|
|
158
|
+
- `dumps` injects the package name (derived from the workdir's vendor and project names) and version at write time
|
|
159
|
+
- `set_private_registry_packages` pins each forge-style composer repository (URL containing `/packages/composer`) to an `only` list of private package names, preventing it from masking newer Packagist versions
|
|
160
|
+
|
|
161
|
+
#### PhpPackageReadmeContentConfigValue
|
|
162
|
+
|
|
163
|
+
src/wexample_wex_addon_dev_php/config_value/php_package_readme_config_value.py extends `AppReadmeConfigValue` and overrides `_get_app_description` to pull the description field from `composer.json` before falling back to the generic base logic.
|
|
164
|
+
|
|
165
|
+
#### DomainTag
|
|
166
|
+
|
|
167
|
+
src/wexample_wex_addon_dev_php/const/tags.py declares the five domain tags the addon's commands use: `APP_LIFECYCLE`, `CONFIG`, `DB`, `FRAMEWORK`, `LANGUAGE_PHP`. Every `@command` decorator in this package references one or more of them in its `tags=` list.
|
|
168
|
+
|
|
169
|
+
### Service layer
|
|
170
|
+
|
|
171
|
+
Services live under `src/wexample_wex_addon_dev_php/services/`. Each service has a `service.yml`, a `docker/docker-compose.yml`, optional env-specific compose overlays under `samples/env/{dev,prod,local}/`, and a `commands/` sub-tree with Python or YAML command files.
|
|
172
|
+
|
|
173
|
+
#### php
|
|
174
|
+
|
|
175
|
+
Defined in src/wexample_wex_addon_dev_php/services/php/service.yml and src/wexample_wex_addon_dev_php/services/php/docker/docker-compose.yml. The base PHP service: runs `dunglas/frankenphp:php8.4`, mounts the app at `/var/www/html`, and binds a `Caddyfile` and a `web.ini` from the runtime config. The `laravel` and `symfony` containers extend this compose service definition. Sample files for the Caddyfile (serving from `public/`, `php_server` directive) and `web.ini` (upload limits, memory limit) are shipped in `services/php/samples/`.
|
|
176
|
+
|
|
177
|
+
#### frankenphp
|
|
178
|
+
|
|
179
|
+
Defined in src/wexample_wex_addon_dev_php/services/frankenphp/service.yml. A standalone FrankenPHP service with the same image and binding conventions as `php`, used when the app does not need the `php` base service name.
|
|
180
|
+
|
|
181
|
+
#### composer
|
|
182
|
+
|
|
183
|
+
Defined in src/wexample_wex_addon_dev_php/services/composer/service.yml. A dedicated Composer container (`composer:latest`) that mounts the app at `/var/www/html` and stays alive via `tail -f /dev/null`. Its commands are the generic lock-management routines that Laravel and Symfony both call.
|
|
184
|
+
|
|
185
|
+
#### laravel
|
|
186
|
+
|
|
187
|
+
Defined in src/wexample_wex_addon_dev_php/services/laravel/service.yml; extends the `php` compose service and declares a MySQL dependency. src/wexample_wex_addon_dev_php/services/laravel/app_service.py contributes a workdir filestate requirement: uid `82:82` (www-data in Alpine images) on `storage/` and `bootstrap/cache/`, enforced by `get_workdir_contribution`.
|
|
188
|
+
|
|
189
|
+
#### symfony
|
|
190
|
+
|
|
191
|
+
Defined in src/wexample_wex_addon_dev_php/services/symfony/service.yml; extends the `php` compose service. src/wexample_wex_addon_dev_php/services/symfony/app_service.py applies the same uid `82:82` requirement to `var/`. src/wexample_wex_addon_dev_php/services/symfony/knowledge/entity.md is a static knowledge fragment injected into AI context: it states that every Symfony entity must extend `AbstractEntity` from `wexample-symfony-helpers`.
|
|
192
|
+
|
|
193
|
+
#### wordpress
|
|
194
|
+
|
|
195
|
+
Defined in src/wexample_wex_addon_dev_php/services/wordpress/service.yml. Runs `wordpress:6.3.1-php8.2-apache` plus a `wordpress_cli` sidecar (`wordpress:cli-2.7.1-php8.2`) defined in src/wexample_wex_addon_dev_php/services/wordpress/docker/docker-compose.yml. WordPress commands target the sidecar by constructing its container name as `{app_project_name}_wordpress_cli`.
|
|
196
|
+
|
|
197
|
+
#### phpmyadmin
|
|
198
|
+
|
|
199
|
+
Defined in src/wexample_wex_addon_dev_php/services/phpmyadmin/service.yml. Runs `phpmyadmin/phpmyadmin:5.2` on the shared `wex_net` network; the local env overlay injects `PMA_USER` and `PMA_PASSWORD`.
|
|
200
|
+
|
|
201
|
+
### Commands
|
|
202
|
+
|
|
203
|
+
#### Composer (generic, reused by Laravel and Symfony)
|
|
204
|
+
|
|
205
|
+
src/wexample_wex_addon_dev_php/services/composer/commands/service/install_local.py is the shared local-wiring routine. It reads `local_packages.php` from the runtime config, runs `composer install --no-scripts` inside the target container, symlinks every local-dev package directory from `VENDOR_DEV_DIR/<vendor>/<pkg>` into `vendor/`, then runs `composer dump-autoload`. The constants `APP_DIR = "/var/www/html"` and `VENDOR_DEV_DIR = "/var/www/vendor-dev"` are exported so framework services can import them.
|
|
206
|
+
|
|
207
|
+
src/wexample_wex_addon_dev_php/services/composer/commands/service/refresh_lock.py runs `composer update --no-install --with-all-dependencies <packages>` inside the container. `--no-install` rewrites `composer.lock` without touching `vendor/` (which may hold local development symlinks); `--with-all-dependencies` allows sibling library constraints to move.
|
|
208
|
+
|
|
209
|
+
#### Laravel
|
|
210
|
+
|
|
211
|
+
src/wexample_wex_addon_dev_php/services/laravel/commands/service/install_local.py clears `bootstrap/cache/packages.php` and `bootstrap/cache/services.php` before delegating to `composer__service__install_local`, then runs `php artisan optimize:clear` to flush the rebuilt service-provider cache.
|
|
212
|
+
|
|
213
|
+
src/wexample_wex_addon_dev_php/services/laravel/commands/service/refresh_lock.py delegates to the generic composer and node `refresh_lock` functions, selecting each by whether the corresponding packages argument is non-empty.
|
|
214
|
+
|
|
215
|
+
src/wexample_wex_addon_dev_php/services/laravel/commands/maintenance/enable.yml is a YAML command that attaches `after app::maintenance/enable` and runs `php artisan down` in the Laravel container. Its mirror, src/wexample_wex_addon_dev_php/services/laravel/commands/maintenance/disable.yml, attaches `after app::maintenance/disable` and runs `php artisan up`.
|
|
216
|
+
|
|
217
|
+
src/wexample_wex_addon_dev_php/services/laravel/commands/db/migrate.yml attaches `before app::maintenance/disable` and runs `php artisan migrate --force --no-interaction -vvv`, so migrations complete before the app is brought back up.
|
|
218
|
+
|
|
219
|
+
#### Symfony
|
|
220
|
+
|
|
221
|
+
src/wexample_wex_addon_dev_php/services/symfony/commands/service/install_local.py calls `composer__service__install_local` and `node__service__install_local` in sequence, then runs `bin/console cache:clear` inside the container.
|
|
222
|
+
|
|
223
|
+
src/wexample_wex_addon_dev_php/services/symfony/commands/service/deploy.py is the post-deployment hook: it runs `doctrine:migrations:migrate --no-interaction --allow-no-migration` inside the container. `--no-interaction` is required because the deploy webhook has no TTY; without it, data-loss prompts silently abort the migration.
|
|
224
|
+
|
|
225
|
+
#### WordPress
|
|
226
|
+
|
|
227
|
+
src/wexample_wex_addon_dev_php/services/wordpress/commands/url/replace.py resolves the current site URL by running `wp option get siteurl` inside the `wordpress_cli` sidecar, then calls `wp search-replace <old> <new> --skip-columns=guid`. When `--new-url` is omitted, the target URL is guessed from the first domain in the runtime config's `app.domains` list.
|
|
228
|
+
|
|
229
|
+
### Call path
|
|
230
|
+
|
|
231
|
+
A typical Python service command goes through these steps:
|
|
232
|
+
|
|
233
|
+
1. The wex CLI resolves the command name (e.g. `symfony/service/install_local`) through the registry built by `PhpAddonManager.get_package_module`, which points at the `wexample_wex_addon_dev_php` package for auto-discovery.
|
|
234
|
+
2. The framework constructs an `ExecutionContext` carrying the kernel, IO handle, and the resolved `AppService` for the target service.
|
|
235
|
+
3. The command function receives `context` and `service`; it calls `service.addon_manager.docker_exec(service.name, [...])` to run a shell fragment inside the named Docker container (e.g. `{app_project_name}_symfony`).
|
|
236
|
+
4. For commands that delegate to the generic Composer routines (Laravel `install_local` and `refresh_lock`, Symfony `install_local`), the inner function is called directly in the same Python frame — `composer__service__install_local.function(context=context, service=service)` — reusing the same `service` so execution happens inside the calling service's container, not the composer container.
|
|
237
|
+
5. YAML commands (`maintenance/enable.yml`, `db/migrate.yml`) follow the same resolution path but their shell scripts are executed by the wex YAML runner, which maps `runner: docker` + `service: laravel` to the equivalent `docker exec` call.
|
|
238
|
+
|
|
239
|
+
## Integration in the Suite
|
|
240
|
+
|
|
241
|
+
This package is part of the Wexample Suite — a collection of high-quality, modular tools designed to work seamlessly together across multiple languages and environments.
|
|
242
|
+
|
|
243
|
+
### Related Packages
|
|
244
|
+
|
|
245
|
+
The suite includes packages for configuration management, file handling, prompts, and more. Each package can be used independently or as part of the integrated suite.
|
|
246
|
+
|
|
247
|
+
Visit the [Wexample Suite documentation](https://docs.wexample.com) for the complete package ecosystem.
|
|
248
|
+
|
|
249
|
+
## Dependencies
|
|
250
|
+
|
|
251
|
+
- attrs: >=23.1.0
|
|
252
|
+
- cattrs: >=23.1.0
|
|
253
|
+
- wexample-filestate-php: >=6.4.0
|
|
254
|
+
- wexample-filestate-symfony: >=1.1.0
|
|
255
|
+
- wexample-wex-addon-ai: >=14.0.0
|
|
256
|
+
- wexample-wex-addon-app: >=31.0.0
|
|
257
|
+
- wexample-wex-addon-dev-javascript: >=8.1.0
|
|
258
|
+
|
|
259
|
+
## Versioning & Compatibility Policy
|
|
260
|
+
|
|
261
|
+
Wexample packages follow **Semantic Versioning** (SemVer):
|
|
262
|
+
|
|
263
|
+
- **MAJOR**: Breaking changes
|
|
264
|
+
- **MINOR**: New features, backward compatible
|
|
265
|
+
- **PATCH**: Bug fixes, backward compatible
|
|
266
|
+
|
|
267
|
+
We maintain backward compatibility within major versions and provide clear migration guides for breaking changes.
|
|
268
|
+
|
|
269
|
+
## License
|
|
270
|
+
|
|
271
|
+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
|
272
|
+
|
|
273
|
+
Free to use in both personal and commercial projects.
|
|
274
|
+
|
|
275
|
+
## About us
|
|
276
|
+
|
|
277
|
+
[Wexample](https://wexample.com) stands as a cornerstone of the digital ecosystem — a collective of seasoned engineers, researchers, and creators driven by a relentless pursuit of technological excellence. More than a media platform, it has grown into a vibrant community where innovation meets craftsmanship, and where every line of code reflects a commitment to clarity, durability, and shared intelligence.
|
|
278
|
+
|
|
279
|
+
This packages suite embodies this spirit. Trusted by professionals and enthusiasts alike, it delivers a consistent, high-quality foundation for modern development — open, elegant, and battle-tested. Its reputation is built on years of collaboration, refinement, and rigorous attention to detail, making it a natural choice for those who demand both robustness and beauty in their tools.
|
|
280
|
+
|
|
281
|
+
Wexample cultivates a culture of mastery. Each package, each contribution carries the mark of a community that values precision, ethics, and innovation — a community proud to shape the future of digital craftsmanship.
|
|
282
|
+
|
|
283
|
+
## Known Limitations & Roadmap
|
|
284
|
+
|
|
285
|
+
Current limitations and planned features are tracked in the GitHub issues.
|
|
286
|
+
|
|
287
|
+
See the [project roadmap](https://github.com/wexample/python-wex_addon_dev_php/issues) for upcoming features and improvements.
|
|
288
|
+
|
|
289
|
+
## Status & Compatibility
|
|
290
|
+
|
|
291
|
+
**Maturity**: Production-ready
|
|
292
|
+
|
|
293
|
+
**Python Support**: >=3.10
|
|
294
|
+
|
|
295
|
+
**OS Support**: Linux, macOS, Windows
|
|
296
|
+
|
|
297
|
+
**Status**: Actively maintained
|
|
298
|
+
|
|
299
|
+
## Useful Links
|
|
300
|
+
|
|
301
|
+
- **Homepage**: https://github.com/wexample/python-wex-addon-dev-php
|
|
302
|
+
- **Documentation**: [docs.wexample.com](https://docs.wexample.com)
|
|
303
|
+
- **Issue Tracker**: https://github.com/wexample/python-wex-addon-dev-php/issues
|
|
304
|
+
- **Discussions**: https://github.com/wexample/python-wex-addon-dev-php/discussions
|
|
305
|
+
- **PyPI**: [pypi.org/project/wexample-wex-addon-dev-php](https://pypi.org/project/wexample-wex-addon-dev-php/)
|
|
306
|
+
|
|
307
|
+
## Migration Notes
|
|
308
|
+
|
|
309
|
+
When upgrading between major versions, refer to the migration guides in the documentation.
|
|
310
|
+
|
|
311
|
+
Breaking changes are clearly documented with upgrade paths and examples.
|