wexample-wex-addon-dev-php 0.0.41__tar.gz → 0.1.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.
Files changed (116) hide show
  1. wexample_wex_addon_dev_php-0.1.0/PKG-INFO +171 -0
  2. wexample_wex_addon_dev_php-0.1.0/README.md +150 -0
  3. {wexample_wex_addon_dev_php-0.0.41 → wexample_wex_addon_dev_php-0.1.0}/pyproject.toml +44 -6
  4. wexample_wex_addon_dev_php-0.0.41/src/wexample_wex_addon_dev_php/py.typed → wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/__init__.py +0 -0
  5. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/__pycache__/__init__.py +0 -0
  6. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/config_value/__init__.py +0 -0
  7. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/config_value/php_package_readme_config_value.py +14 -0
  8. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/file/__init__.py +0 -0
  9. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/file/php_composer_json_file.py +76 -0
  10. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/php_addon_manager.py +13 -0
  11. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/py.typed +0 -0
  12. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/resources/__init__.py +0 -0
  13. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/resources/docker/Dockerfile.roave +22 -0
  14. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/resources/docker/__init__.py +0 -0
  15. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/__init__.py +0 -0
  16. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/laravel/__init__.py +0 -0
  17. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/laravel/docker/__init__.py +0 -0
  18. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/laravel/docker/docker-compose.yml +6 -0
  19. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/laravel/samples/__init__.py +0 -0
  20. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/laravel/samples/docker/__init__.py +0 -0
  21. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/laravel/samples/docker/docker-compose.yml +5 -0
  22. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/laravel/samples/env/__init__.py +0 -0
  23. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/laravel/samples/env/dev/__init__.py +0 -0
  24. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/laravel/samples/env/dev/docker/__init__.py +0 -0
  25. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/laravel/samples/env/dev/docker/docker-compose.yml +5 -0
  26. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/laravel/samples/env/prod/__init__.py +0 -0
  27. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/laravel/samples/env/prod/docker/__init__.py +0 -0
  28. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/laravel/samples/env/prod/docker/docker-compose.yml +5 -0
  29. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/laravel/service.yml +6 -0
  30. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/php/__init__.py +0 -0
  31. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/php/docker/__init__.py +0 -0
  32. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/php/docker/docker-compose.yml +19 -0
  33. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/php/samples/__init__.py +0 -0
  34. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/php/samples/apache/__init__.py +0 -0
  35. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/php/samples/apache/web.conf +13 -0
  36. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/php/samples/docker/__init__.py +0 -0
  37. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/php/samples/docker/docker-compose.yml +5 -0
  38. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/php/samples/env/__init__.py +0 -0
  39. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/php/samples/env/dev/__init__.py +0 -0
  40. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/php/samples/env/dev/cron/__init__.py +0 -0
  41. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/php/samples/env/dev/cron/default.cron +1 -0
  42. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/php/samples/env/dev/docker/__init__.py +0 -0
  43. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/php/samples/env/dev/docker/docker-compose.yml +4 -0
  44. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/php/samples/env/local/__init__.py +0 -0
  45. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/php/samples/env/local/cron/__init__.py +0 -0
  46. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/php/samples/env/local/cron/default.cron +1 -0
  47. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/php/samples/env/local/docker/__init__.py +0 -0
  48. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/php/samples/env/local/docker/docker-compose.yml +4 -0
  49. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/php/samples/env/local/php/__init__.py +0 -0
  50. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/php/samples/env/local/php/web.ini +5 -0
  51. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/php/samples/env/prod/__init__.py +0 -0
  52. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/php/samples/env/prod/apache/__init__.py +0 -0
  53. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/php/samples/env/prod/apache/web.conf +13 -0
  54. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/php/samples/env/prod/cron/__init__.py +0 -0
  55. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/php/samples/env/prod/cron/default.cron +1 -0
  56. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/php/samples/env/prod/docker/__init__.py +0 -0
  57. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/php/samples/env/prod/docker/docker-compose.yml +4 -0
  58. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/php/samples/index.php +3 -0
  59. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/php/samples/php/__init__.py +0 -0
  60. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/php/samples/php/web.ini +3 -0
  61. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/php/service.yml +12 -0
  62. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/phpmyadmin/__init__.py +0 -0
  63. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/phpmyadmin/commands/__init__.py +0 -0
  64. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/phpmyadmin/commands/runtime/__init__.py +0 -0
  65. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/phpmyadmin/docker/__init__.py +0 -0
  66. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/phpmyadmin/docker/docker-compose.yml +9 -0
  67. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/phpmyadmin/env/__init__.py +0 -0
  68. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/phpmyadmin/env/local/__init__.py +0 -0
  69. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/phpmyadmin/env/local/docker/__init__.py +0 -0
  70. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/phpmyadmin/env/local/docker/docker-compose.yml +8 -0
  71. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/phpmyadmin/service.yml +6 -0
  72. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/symfony/__init__.py +0 -0
  73. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/symfony/docker/__init__.py +0 -0
  74. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/symfony/docker/docker-compose.yml +7 -0
  75. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/symfony/samples/__init__.py +0 -0
  76. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/symfony/samples/docker/__init__.py +0 -0
  77. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/symfony/samples/docker/docker-compose.yml +5 -0
  78. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/symfony/samples/env/__init__.py +0 -0
  79. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/symfony/samples/env/dev/__init__.py +0 -0
  80. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/symfony/samples/env/dev/docker/__init__.py +0 -0
  81. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/symfony/samples/env/dev/docker/docker-compose.yml +4 -0
  82. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/symfony/samples/env/prod/__init__.py +0 -0
  83. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/symfony/samples/env/prod/docker/__init__.py +0 -0
  84. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/symfony/samples/env/prod/docker/docker-compose.yml +4 -0
  85. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/symfony/service.yml +6 -0
  86. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/wordpress/__init__.py +0 -0
  87. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/wordpress/commands/__init__.py +1 -0
  88. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/wordpress/commands/service/__init__.py +1 -0
  89. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/wordpress/commands/service/install.py +29 -0
  90. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/wordpress/commands/url/__init__.py +1 -0
  91. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/wordpress/commands/url/replace.py +112 -0
  92. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/wordpress/docker/__init__.py +0 -0
  93. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/wordpress/docker/docker-compose.yml +39 -0
  94. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/wordpress/samples/__init__.py +0 -0
  95. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/wordpress/samples/docker/__init__.py +0 -0
  96. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/wordpress/samples/docker/docker-compose-cli.yml +5 -0
  97. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/wordpress/samples/docker/docker-compose.yml +5 -0
  98. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/wordpress/samples/env/__init__.py +0 -0
  99. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/wordpress/samples/env/dev/__init__.py +0 -0
  100. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/wordpress/samples/env/dev/docker/__init__.py +0 -0
  101. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/wordpress/samples/env/dev/docker/docker-compose.yml +5 -0
  102. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/wordpress/samples/env/local/__init__.py +0 -0
  103. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/wordpress/samples/env/local/wp-cli/.gitkeep +1 -0
  104. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/wordpress/samples/env/local/wp-cli/__init__.py +0 -0
  105. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/wordpress/samples/env/prod/__init__.py +0 -0
  106. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/wordpress/samples/env/prod/docker/__init__.py +0 -0
  107. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/wordpress/samples/env/prod/docker/docker-compose.yml +5 -0
  108. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/services/wordpress/service.yml +6 -0
  109. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/workdir/__init__.py +0 -0
  110. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/workdir/php_package_workdir.py +150 -0
  111. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/workdir/php_packages_suite_workdir.py +27 -0
  112. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/workdir/php_symfony_workdir.py +7 -0
  113. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/workdir/php_workdir.py +132 -0
  114. wexample_wex_addon_dev_php-0.1.0/src/wexample_wex_addon_dev_php/workdir/symfony_workdir.py +33 -0
  115. wexample_wex_addon_dev_php-0.0.41/PKG-INFO +0 -50
  116. wexample_wex_addon_dev_php-0.0.41/README.md +0 -33
@@ -0,0 +1,171 @@
1
+ Metadata-Version: 2.1
2
+ Name: wexample-wex-addon-dev-php
3
+ Version: 0.1.0
4
+ Summary: Python dev addon for wex
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>=0.1.0
15
+ Requires-Dist: wexample-wex-addon-app>=1.0.0
16
+ Requires-Dist: wexample-wex-addon-dev-javascript>=0.1.0
17
+ Provides-Extra: dev
18
+ Requires-Dist: pytest; extra == "dev"
19
+ Requires-Dist: pytest-cov; extra == "dev"
20
+ Description-Content-Type: text/markdown
21
+
22
+ # wex_addon_dev_php
23
+
24
+ Version: 0.1.0
25
+
26
+ Python dev addon for wex
27
+
28
+ ## Table of Contents
29
+
30
+ - [Tests](#tests)
31
+ - [Suite Integration](#suite-integration)
32
+ - [Dependencies](#dependencies)
33
+ - [Versioning](#versioning)
34
+ - [License](#license)
35
+ - [Suite Integration](#suite-integration)
36
+ - [Suite Signature](#suite-signature)
37
+ - [Roadmap](#roadmap)
38
+ - [Status Compatibility](#status-compatibility)
39
+ - [Useful Links](#useful-links)
40
+ - [Migration Notes](#migration-notes)
41
+
42
+ ## Tests
43
+
44
+ This project uses `pytest` for testing and `pytest-cov` for code coverage analysis.
45
+
46
+ ### Installation
47
+
48
+ First, install the required testing dependencies:
49
+ ```bash
50
+ .venv/bin/python -m pip install pytest pytest-cov
51
+ ```
52
+
53
+ ### Basic Usage
54
+
55
+ Run all tests with coverage:
56
+ ```bash
57
+ .venv/bin/python -m pytest --cov --cov-report=html
58
+ ```
59
+
60
+ ### Common Commands
61
+ ```bash
62
+ # Run tests with coverage for a specific module
63
+ .venv/bin/python -m pytest --cov=your_module
64
+
65
+ # Show which lines are not covered
66
+ .venv/bin/python -m pytest --cov=your_module --cov-report=term-missing
67
+
68
+ # Generate an HTML coverage report
69
+ .venv/bin/python -m pytest --cov=your_module --cov-report=html
70
+
71
+ # Combine terminal and HTML reports
72
+ .venv/bin/python -m pytest --cov=your_module --cov-report=term-missing --cov-report=html
73
+
74
+ # Run specific test file with coverage
75
+ .venv/bin/python -m pytest tests/test_file.py --cov=your_module --cov-report=term-missing
76
+ ```
77
+
78
+ ### Viewing HTML Reports
79
+
80
+ After generating an HTML report, open `htmlcov/index.html` in your browser to view detailed line-by-line coverage information.
81
+
82
+ ### Coverage Threshold
83
+
84
+ To enforce a minimum coverage percentage:
85
+ ```bash
86
+ .venv/bin/python -m pytest --cov=your_module --cov-fail-under=80
87
+ ```
88
+
89
+ This will cause the test suite to fail if coverage drops below 80%.
90
+
91
+ ## Integration in the Suite
92
+
93
+ 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.
94
+
95
+ ### Related Packages
96
+
97
+ 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.
98
+
99
+ Visit the [Wexample Suite documentation](https://docs.wexample.com) for the complete package ecosystem.
100
+
101
+ ## Dependencies
102
+
103
+ - attrs: >=23.1.0
104
+ - cattrs: >=23.1.0
105
+ - wexample-filestate-php: >=0.1.0
106
+ - wexample-wex-addon-app: >=1.0.0
107
+ - wexample-wex-addon-dev-javascript: >=0.1.0
108
+
109
+ ## Versioning & Compatibility Policy
110
+
111
+ Wexample packages follow **Semantic Versioning** (SemVer):
112
+
113
+ - **MAJOR**: Breaking changes
114
+ - **MINOR**: New features, backward compatible
115
+ - **PATCH**: Bug fixes, backward compatible
116
+
117
+ We maintain backward compatibility within major versions and provide clear migration guides for breaking changes.
118
+
119
+ ## License
120
+
121
+ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
122
+
123
+ Free to use in both personal and commercial projects.
124
+
125
+ ## Integration in the Suite
126
+
127
+ 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.
128
+
129
+ ### Related Packages
130
+
131
+ 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.
132
+
133
+ Visit the [Wexample Suite documentation](https://docs.wexample.com) for the complete package ecosystem.
134
+
135
+ # About us
136
+
137
+ [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.
138
+
139
+ 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.
140
+
141
+ 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.
142
+
143
+ ## Known Limitations & Roadmap
144
+
145
+ Current limitations and planned features are tracked in the GitHub issues.
146
+
147
+ See the [project roadmap](https://github.com/wexample/python-wex_addon_dev_php/issues) for upcoming features and improvements.
148
+
149
+ ## Status & Compatibility
150
+
151
+ **Maturity**: Production-ready
152
+
153
+ **Python Support**: >=3.10
154
+
155
+ **OS Support**: Linux, macOS, Windows
156
+
157
+ **Status**: Actively maintained
158
+
159
+ ## Useful Links
160
+
161
+ - **Homepage**: https://github.com/wexample/python-wex-addon-dev-php
162
+ - **Documentation**: [docs.wexample.com](https://docs.wexample.com)
163
+ - **Issue Tracker**: https://github.com/wexample/python-wex-addon-dev-php/issues
164
+ - **Discussions**: https://github.com/wexample/python-wex-addon-dev-php/discussions
165
+ - **PyPI**: [pypi.org/project/wex_addon_dev_php](https://pypi.org/project/wex_addon_dev_php/)
166
+
167
+ ## Migration Notes
168
+
169
+ When upgrading between major versions, refer to the migration guides in the documentation.
170
+
171
+ Breaking changes are clearly documented with upgrade paths and examples.
@@ -0,0 +1,150 @@
1
+ # wex_addon_dev_php
2
+
3
+ Version: 0.1.0
4
+
5
+ Python dev addon for wex
6
+
7
+ ## Table of Contents
8
+
9
+ - [Tests](#tests)
10
+ - [Suite Integration](#suite-integration)
11
+ - [Dependencies](#dependencies)
12
+ - [Versioning](#versioning)
13
+ - [License](#license)
14
+ - [Suite Integration](#suite-integration)
15
+ - [Suite Signature](#suite-signature)
16
+ - [Roadmap](#roadmap)
17
+ - [Status Compatibility](#status-compatibility)
18
+ - [Useful Links](#useful-links)
19
+ - [Migration Notes](#migration-notes)
20
+
21
+ ## Tests
22
+
23
+ This project uses `pytest` for testing and `pytest-cov` for code coverage analysis.
24
+
25
+ ### Installation
26
+
27
+ First, install the required testing dependencies:
28
+ ```bash
29
+ .venv/bin/python -m pip install pytest pytest-cov
30
+ ```
31
+
32
+ ### Basic Usage
33
+
34
+ Run all tests with coverage:
35
+ ```bash
36
+ .venv/bin/python -m pytest --cov --cov-report=html
37
+ ```
38
+
39
+ ### Common Commands
40
+ ```bash
41
+ # Run tests with coverage for a specific module
42
+ .venv/bin/python -m pytest --cov=your_module
43
+
44
+ # Show which lines are not covered
45
+ .venv/bin/python -m pytest --cov=your_module --cov-report=term-missing
46
+
47
+ # Generate an HTML coverage report
48
+ .venv/bin/python -m pytest --cov=your_module --cov-report=html
49
+
50
+ # Combine terminal and HTML reports
51
+ .venv/bin/python -m pytest --cov=your_module --cov-report=term-missing --cov-report=html
52
+
53
+ # Run specific test file with coverage
54
+ .venv/bin/python -m pytest tests/test_file.py --cov=your_module --cov-report=term-missing
55
+ ```
56
+
57
+ ### Viewing HTML Reports
58
+
59
+ After generating an HTML report, open `htmlcov/index.html` in your browser to view detailed line-by-line coverage information.
60
+
61
+ ### Coverage Threshold
62
+
63
+ To enforce a minimum coverage percentage:
64
+ ```bash
65
+ .venv/bin/python -m pytest --cov=your_module --cov-fail-under=80
66
+ ```
67
+
68
+ This will cause the test suite to fail if coverage drops below 80%.
69
+
70
+ ## Integration in the Suite
71
+
72
+ 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.
73
+
74
+ ### Related Packages
75
+
76
+ 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.
77
+
78
+ Visit the [Wexample Suite documentation](https://docs.wexample.com) for the complete package ecosystem.
79
+
80
+ ## Dependencies
81
+
82
+ - attrs: >=23.1.0
83
+ - cattrs: >=23.1.0
84
+ - wexample-filestate-php: >=0.1.0
85
+ - wexample-wex-addon-app: >=1.0.0
86
+ - wexample-wex-addon-dev-javascript: >=0.1.0
87
+
88
+ ## Versioning & Compatibility Policy
89
+
90
+ Wexample packages follow **Semantic Versioning** (SemVer):
91
+
92
+ - **MAJOR**: Breaking changes
93
+ - **MINOR**: New features, backward compatible
94
+ - **PATCH**: Bug fixes, backward compatible
95
+
96
+ We maintain backward compatibility within major versions and provide clear migration guides for breaking changes.
97
+
98
+ ## License
99
+
100
+ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
101
+
102
+ Free to use in both personal and commercial projects.
103
+
104
+ ## Integration in the Suite
105
+
106
+ 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.
107
+
108
+ ### Related Packages
109
+
110
+ 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.
111
+
112
+ Visit the [Wexample Suite documentation](https://docs.wexample.com) for the complete package ecosystem.
113
+
114
+ # About us
115
+
116
+ [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.
117
+
118
+ 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.
119
+
120
+ 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.
121
+
122
+ ## Known Limitations & Roadmap
123
+
124
+ Current limitations and planned features are tracked in the GitHub issues.
125
+
126
+ See the [project roadmap](https://github.com/wexample/python-wex_addon_dev_php/issues) for upcoming features and improvements.
127
+
128
+ ## Status & Compatibility
129
+
130
+ **Maturity**: Production-ready
131
+
132
+ **Python Support**: >=3.10
133
+
134
+ **OS Support**: Linux, macOS, Windows
135
+
136
+ **Status**: Actively maintained
137
+
138
+ ## Useful Links
139
+
140
+ - **Homepage**: https://github.com/wexample/python-wex-addon-dev-php
141
+ - **Documentation**: [docs.wexample.com](https://docs.wexample.com)
142
+ - **Issue Tracker**: https://github.com/wexample/python-wex-addon-dev-php/issues
143
+ - **Discussions**: https://github.com/wexample/python-wex-addon-dev-php/discussions
144
+ - **PyPI**: [pypi.org/project/wex_addon_dev_php](https://pypi.org/project/wex_addon_dev_php/)
145
+
146
+ ## Migration Notes
147
+
148
+ When upgrading between major versions, refer to the migration guides in the documentation.
149
+
150
+ Breaking changes are clearly documented with upgrade paths and examples.
@@ -6,7 +6,7 @@ build-backend = "pdm.backend"
6
6
 
7
7
  [project]
8
8
  name = "wexample-wex-addon-dev-php"
9
- version = "0.0.41"
9
+ version = "0.1.0"
10
10
  description = "Python dev addon for wex"
11
11
  authors = [
12
12
  { name = "weeger", email = "contact@wexample.com" },
@@ -18,8 +18,11 @@ classifiers = [
18
18
  "Operating System :: OS Independent",
19
19
  ]
20
20
  dependencies = [
21
- "pydantic>=2,<3",
22
- "wexample-wex-core==6.0.43",
21
+ "attrs>=23.1.0",
22
+ "cattrs>=23.1.0",
23
+ "wexample-filestate-php>=0.1.0",
24
+ "wexample-wex-addon-app>=1.0.0",
25
+ "wexample-wex-addon-dev-javascript>=0.1.0",
23
26
  ]
24
27
 
25
28
  [project.readme]
@@ -35,16 +38,51 @@ homepage = "https://github.com/wexample/python-wex-dev-python"
35
38
  [project.optional-dependencies]
36
39
  dev = [
37
40
  "pytest",
41
+ "pytest-cov",
42
+ ]
43
+
44
+ [tool.setuptools.packages.find]
45
+ include = [
46
+ "*",
47
+ ]
48
+ exclude = [
49
+ "wexample_wex_addon_dev_php.testing*",
38
50
  ]
39
51
 
40
52
  [tool.pdm]
41
53
  distribution = true
42
54
 
43
55
  [tool.pdm.build]
44
- includes = [
45
- "src/wexample_wex_addon_dev_php/py.typed",
46
- ]
47
56
  package-dir = "src"
48
57
  packages = [
49
58
  { include = "wexample_wex_addon_dev_php", from = "src" },
50
59
  ]
60
+
61
+ [tool.pytest.ini_options]
62
+ testpaths = [
63
+ "tests",
64
+ ]
65
+ pythonpath = [
66
+ "src",
67
+ ]
68
+
69
+ [tool.coverage.run]
70
+ source = [
71
+ "wexample_wex_addon_dev_php",
72
+ ]
73
+ omit = [
74
+ "*/tests/*",
75
+ "*/.venv/*",
76
+ "*/venv/*",
77
+ ]
78
+
79
+ [tool.coverage.report]
80
+ exclude_lines = [
81
+ "pragma: no cover",
82
+ "def __repr__",
83
+ "raise AssertionError",
84
+ "raise NotImplementedError",
85
+ "if __name__ == .__main__.:",
86
+ "if TYPE_CHECKING:",
87
+ "@abstractmethod",
88
+ ]
@@ -0,0 +1,14 @@
1
+ from __future__ import annotations
2
+
3
+ from wexample_helpers.decorator.base_class import base_class
4
+ from wexample_wex_addon_app.config_value.app_readme_config_value import (
5
+ AppReadmeConfigValue,
6
+ )
7
+
8
+
9
+ @base_class
10
+ class PhpPackageReadmeContentConfigValue(AppReadmeConfigValue):
11
+ """README generation for Php packages."""
12
+
13
+ def _get_app_description(self) -> str:
14
+ return self.workdir.get_app_config().get("description", "")
@@ -0,0 +1,76 @@
1
+ from __future__ import annotations
2
+
3
+ from wexample_filestate.item.file.json_file import JsonFile
4
+ from wexample_helpers.decorator.base_class import base_class
5
+ from wexample_wex_addon_app.item.file.mixin.app_dependencies_config_file_mixin import (
6
+ AppDependenciesConfigFileMixin,
7
+ )
8
+
9
+
10
+ @base_class
11
+ class PhpComposerJsonFile(AppDependenciesConfigFileMixin, JsonFile):
12
+ def add_dependency(
13
+ self,
14
+ # In composer, no operator says ==
15
+ operator: str = "",
16
+ **kwargs,
17
+ ) -> bool:
18
+ return super().add_dependency(operator=operator, **kwargs)
19
+
20
+ def add_dependency_from_string(
21
+ self,
22
+ package_name: str,
23
+ version: str,
24
+ operator: str = "",
25
+ optional: bool = False,
26
+ group: None | str = None,
27
+ ) -> bool:
28
+ """
29
+ Add or update a Composer dependency using raw package name + version.
30
+ Returns True if the dependency list changed.
31
+ """
32
+ # Composer group
33
+ group_key = "require-dev" if group == "dev" else "require"
34
+
35
+ # Composer uses simple version constraints (no pip-style operators)
36
+ constraint = f"{operator}{version}".strip()
37
+
38
+ config = self.read_config()
39
+
40
+ # Extract or create dependency dictionary
41
+ deps_node = config.search(path=group_key, default={})
42
+ deps = deps_node.to_dict() if deps_node else {}
43
+
44
+ old = deps.get(package_name)
45
+
46
+ # No change needed
47
+ if old == constraint:
48
+ return False
49
+
50
+ # Apply change
51
+ deps[package_name] = constraint
52
+
53
+ config.update_nested({group_key: deps})
54
+ self.write_config(config)
55
+
56
+ return True
57
+
58
+ def dumps(self, content: dict | None = None) -> str:
59
+ content = content or self.read_parsed()
60
+
61
+ workdir = self.get_parent_item()
62
+ content["name"] = workdir.get_package_name()
63
+ content["version"] = workdir.get_project_version()
64
+
65
+ return super().dumps(content or {})
66
+
67
+ def get_dependencies_versions(
68
+ self, optional: bool = False, group: str = "dev"
69
+ ) -> dict[str, str]:
70
+ # Default values is not well managed in nested config value, for now.
71
+ require = self.read_config().search(path="require")
72
+
73
+ if not require:
74
+ return {}
75
+
76
+ return require.get_dict_or_default(default={})
@@ -0,0 +1,13 @@
1
+ from __future__ import annotations
2
+
3
+ from typing import Any
4
+
5
+ from wexample_wex_core.common.abstract_addon_manager import AbstractAddonManager
6
+
7
+
8
+ class PhpAddonManager(AbstractAddonManager):
9
+ @classmethod
10
+ def get_package_module(cls) -> Any:
11
+ import wexample_wex_addon_dev_php
12
+
13
+ return wexample_wex_addon_dev_php
@@ -0,0 +1,22 @@
1
+ FROM php:8.4-cli
2
+
3
+ RUN apt-get update && apt-get install -y \
4
+ git \
5
+ unzip \
6
+ libicu-dev \
7
+ && rm -rf /var/lib/apt/lists/* \
8
+ && docker-php-ext-install bcmath intl
9
+
10
+ RUN groupadd -g 1000 appuser && \
11
+ useradd -m -u 1000 -g 1000 -s /bin/bash appuser
12
+
13
+ COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
14
+
15
+ USER appuser
16
+ RUN composer global require roave/backward-compatibility-check
17
+
18
+ ENV PATH="/home/appuser/.composer/vendor/bin:${PATH}"
19
+
20
+ WORKDIR /var/www/html
21
+
22
+ CMD ["tail", "-f", "/dev/null"]
@@ -0,0 +1,6 @@
1
+ services:
2
+ laravel:
3
+ container_name: ${APP_PROJECT_NAME}_laravel
4
+ extends:
5
+ file: ${SERVICE_PHP_COMPOSE}
6
+ service: php
@@ -0,0 +1,5 @@
1
+ services:
2
+ laravel:
3
+ extends:
4
+ file: ${SERVICE_LARAVEL_COMPOSE}
5
+ service: laravel
@@ -0,0 +1,5 @@
1
+ services:
2
+ laravel:
3
+ environment:
4
+ - LETSENCRYPT_HOST=${APP_DOMAINS_STRING}
5
+ - LETSENCRYPT_EMAIL=${APP_EMAIL}
@@ -0,0 +1,5 @@
1
+ services:
2
+ laravel:
3
+ environment:
4
+ - LETSENCRYPT_HOST=${APP_DOMAINS_STRING}
5
+ - LETSENCRYPT_EMAIL=${APP_EMAIL}
@@ -0,0 +1,6 @@
1
+ name: laravel
2
+ extends: php
3
+ dependencies:
4
+ - mysql
5
+ docker:
6
+ compose: docker/docker-compose.yml
@@ -0,0 +1,19 @@
1
+ services:
2
+ php:
3
+ container_name: ${APP_PROJECT_NAME}_php
4
+ image: wexample/php-8.2:latest
5
+ expose:
6
+ - 80
7
+ environment:
8
+ - VIRTUAL_HOST=${APP_DOMAINS_STRING}
9
+ - VIRTUAL_PORT=80
10
+ volumes:
11
+ - /var/www/html/.git
12
+ - /var/www/html/.wex
13
+ - ${APP_PATH}:/var/www/html
14
+ - ${BIND_WEB_PHP_INI}:/usr/local/etc/php/conf.d/web.ini:ro
15
+ - ${BIND_WEB_APACHE_CONF}:/etc/apache2/sites-enabled/000-default.conf:ro
16
+ - ${APP_SETUP_PATH}env/${APP_ENV}/cron/default.cron:/var/default.cron
17
+ extends:
18
+ file: ${SERVICE_DEFAULT_COMPOSE}
19
+ service: default
@@ -0,0 +1,13 @@
1
+ <VirtualHost *:80>
2
+ DocumentRoot "/var/www/html"
3
+
4
+ <Directory "/var/www/html">
5
+ Options Indexes FollowSymLinks
6
+ AllowOverride All
7
+ Require all granted
8
+ </Directory>
9
+
10
+ <FilesMatch ".php$">
11
+ SetHandler "proxy:unix:/var/run/php/php8.2-fpm.sock|fcgi://localhost/"
12
+ </FilesMatch>
13
+ </VirtualHost>
@@ -0,0 +1,5 @@
1
+ services:
2
+ php:
3
+ extends:
4
+ file: ${SERVICE_PHP_COMPOSE}
5
+ service: php
@@ -0,0 +1 @@
1
+ #* * * * * echo "Hello world" > /var/log/cron.log 2>&1