Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
d737fb0
Implemented: generate_composer_lock_files.sh and install_dev_select_g…
SergeyKleyman Nov 5, 2025
0e92560
Merge branch 'main' into Safer_PHP_8.1_reqs
SergeyKleyman Nov 5, 2025
7b46c88
Implemented PackagesPhpRequirementTest
SergeyKleyman Nov 6, 2025
943f04a
Fixed unbound variable issues
SergeyKleyman Nov 6, 2025
43f05a4
Fixed failing test
SergeyKleyman Nov 6, 2025
2445b27
Fixed ELASTIC_OTEL_PHP_TESTS_FILTER: unbound variable
SergeyKleyman Nov 6, 2025
b9115c5
Fixed issues with opcache
SergeyKleyman Nov 7, 2025
691efb7
Fixed incorrect default for ELASTIC_OTEL_PHP_DEV_INTERNAL_MODE_IS_DEV
SergeyKleyman Nov 7, 2025
7ca1941
Allow access from docker's host under non-root user to files created …
SergeyKleyman Nov 7, 2025
b7ca8a2
Fixed ELASTIC_OTEL_PHP_TESTS_EXTERNAL_SERVICES_ENV_VARS_ARE_SET: unbo…
SergeyKleyman Nov 7, 2025
a02724d
Safer_PHP_8.1_reqs next part
SergeyKleyman Nov 7, 2025
772cf8e
Merge branch 'PackagesPhpRequirementTest' into Safer_PHP_8.1_reqs
SergeyKleyman Nov 7, 2025
c9737fb
Fixed main merge
SergeyKleyman Nov 7, 2025
71b1be4
Minor fix for tools/build/build_packages.sh
SergeyKleyman Nov 7, 2025
57c0452
Fixed typos
SergeyKleyman Nov 7, 2025
050cddf
Merge branch 'PackagesPhpRequirementTest' into Safer_PHP_8.1_reqs
SergeyKleyman Nov 7, 2025
51b68ec
Finished implementation
SergeyKleyman Nov 9, 2025
8e26667
Fixed compilation error
SergeyKleyman Nov 9, 2025
1fd2cac
Merge branch 'main' into Safer_PHP_8.1_reqs
SergeyKleyman Nov 9, 2025
e084d07
Fixed issues with generated PHP source files missing
SergeyKleyman Nov 9, 2025
0607a71
Fixed issues with generated PHP source files missing for dev
SergeyKleyman Nov 9, 2025
9d2d5f8
Marked script executable
SergeyKleyman Nov 9, 2025
38a4750
Fixed order of configure_php_templates.sh and .php scripts
SergeyKleyman Nov 9, 2025
628a75f
Reverted to simpler vendor_<PHP version> structure
SergeyKleyman Nov 10, 2025
c474d8d
Fixed PackagesPhpRequirementTest
SergeyKleyman Nov 10, 2025
d2938f7
Fixed .github/workflows/test-php-static-and-unit.yml
SergeyKleyman Nov 10, 2025
9b13ed2
Fixed "Generate NOTICE" step
SergeyKleyman Nov 10, 2025
cf50a42
Fixed missing configure_php_templates.sh in test_packages_one_matrix_…
SergeyKleyman Nov 10, 2025
f9b2b4b
Minor fixes
SergeyKleyman Nov 10, 2025
ca59241
Added static check on prod (without dev only dependencies)
SergeyKleyman Nov 11, 2025
c9b307e
Renamed AdaptPackagesToPhp81 to AdaptPhpDepsTo81
SergeyKleyman Nov 11, 2025
b710899
Split off composer_prod.json
SergeyKleyman Nov 14, 2025
2a4a2cf
Added StaticCheckProd
SergeyKleyman Nov 14, 2025
30db662
Merge branch 'main' into Scope_deps
SergeyKleyman Nov 14, 2025
e283c6d
Re-generated composer lock files
SergeyKleyman Nov 14, 2025
5557e8b
Fixed build_php_deps.sh
SergeyKleyman Nov 14, 2025
749a55c
Marked ./tools/build/scope_PHP_deps.sh executable
SergeyKleyman Nov 14, 2025
a6dd626
Refactored scripts
SergeyKleyman Nov 15, 2025
4ef8876
Added copy_repo_exclude_generated.sh
SergeyKleyman Nov 15, 2025
e30d182
Minor refactor in snyk_scan.sh
SergeyKleyman Nov 15, 2025
7a2b9cc
Fixed "unbound variable" errors
SergeyKleyman Nov 16, 2025
6f02c56
Fixed tools/copy_repo_exclude_generated.sh
SergeyKleyman Nov 16, 2025
37d79c6
Fixed tools/build/configure_php_templates_if_not_done_yet.sh
SergeyKleyman Nov 16, 2025
930354c
Reverted to --optimize instead of --optimize-autoloader for compose…
SergeyKleyman Nov 16, 2025
3c5cc71
Fixed tools/test/component/test_packages_one_matrix_row_in_docker.sh
SergeyKleyman Nov 16, 2025
d6a87ee
Temporarily pinned "psr/http-message" to "1.1" in composer_prod.json
SergeyKleyman Nov 16, 2025
169ebc8
Fixed NCPU: unbound variable
SergeyKleyman Nov 16, 2025
5de35ad
Fixed SKIP_UNIT_TESTS: unbound variable
SergeyKleyman Nov 16, 2025
372cf09
Run ./tools/build/install_PHP_deps_in_dev_env.sh under temp repo
SergeyKleyman Nov 16, 2025
dc021b0
Fixed usage of GITHUB_SHA
SergeyKleyman Nov 16, 2025
e71a0aa
Cleaned up tools/build/build_native.sh
SergeyKleyman Nov 16, 2025
e3b8d49
Reverted back setting -u based on GITHUB_ACTIONS intools/build/build_…
SergeyKleyman Nov 16, 2025
d8f2035
Switched to one composer.json
SergeyKleyman Nov 17, 2025
cd95f40
Added verifyDevProdOnlyPackages
SergeyKleyman Nov 17, 2025
f38f507
Working on verify
SergeyKleyman Nov 24, 2025
af106b5
Refactor
SergeyKleyman Dec 8, 2025
6781cea
Merge branch 'main' into Scope_deps
SergeyKleyman Mar 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ prod/php/ElasticOTel/Log/LogFeature.php
composer.lock
composer.phar
vendor/
vendor_prod/
prod/php/vendor_*/

# PHP_CodeSniffer
Expand Down
13 changes: 10 additions & 3 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ https://artifactory.elastic.dev/ui/repos/tree/General/apm-agent-php-dev
and in "raw" format here:
https://artifactory.elastic.dev/ui/native/apm-agent-php-dev/

# Managing PHP 3rd party dependencies
# To manage PHP 3rd party dependencies
This documentation section describes how to manage PHP 3rd party dependencies
i.e., `vendor` directory, `composer.json` and `composer.lock`

Expand All @@ -239,7 +239,7 @@ versions of dependencies are used for each build of the source code repository s
To achieve this, we committed `composer.lock` files to version control.
There are multiple `composer.lock` files - one for each supported major.minor PHP version.

## To install dependencies
## To install dependencies in development environment

Run
```
Expand All @@ -252,7 +252,7 @@ copy it to `<repo root>/composer.lock`and install the packages using that `compo
## To check which dependencies can be updated
Run
```
composer outdated
./tools/build/show_outdated_PHP_deps.sh
```

## To update dependencies
Expand All @@ -264,6 +264,13 @@ composer outdated
instead of the usual `composer update`
3) Commit the changes to the composer's lock files

## Development tools configuration
| Environment variable name | Description | Value type | Valid values | Default value |
|---------------------------|-------------|------------|--------------|---------------|
| `ELASTIC_OTEL_PHP_TOOLS_LOG_LEVEL` | Logging level for tools used during build, etc. | string | `OFF`, `CRITICAL`, `ERROR`, `WARNING`, `INFO`, `DEBUG`, `TRACE` | `INFO` |
| `ELASTIC_OTEL_PHP_TOOLS_KEEP_TEMP_FILES` | Should temporary files and directories be kept or deleted after use? | boolean | `true`, `false` | `false` (i.e., temporary files and directories are deleted after use) |


# Documentation

The official documentation is available at:
Expand Down
14 changes: 5 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
],
"require": {
"php": "8.1.*||8.2.*||8.3.*||8.4.*",
"nyholm/psr7-server": "^1.1",
"open-telemetry/exporter-otlp": "1.2.1",
"open-telemetry/opentelemetry-auto-curl": "0.0.3",
"open-telemetry/opentelemetry-auto-http-async": "1.1.0",
Expand All @@ -20,8 +21,7 @@
"open-telemetry/opentelemetry-auto-slim": "1.1.0",
"open-telemetry/sdk": "1.9.0",
"open-telemetry/sem-conv": "1.32.0",
"php-http/guzzle7-adapter": "^1.0",
"nyholm/psr7-server": "^1.1"
"php-http/guzzle7-adapter": "^1.0"
},
"provide": {
"laravel/framework": "*",
Expand Down Expand Up @@ -52,7 +52,7 @@
"psr-4": {
"Elastic\\OTel\\": "./prod/php/ElasticOTel/",
"ElasticOTelTests\\": "./tests/ElasticOTelTests/",
"ElasticOTelTools\\Build\\": "./tools/build/"
"ElasticOTelTools\\": "./tools/"
}
},
"config": {
Expand All @@ -66,14 +66,10 @@
},
"scripts": {
"pre-install-cmd": [
"php tools/build/direct_composer_install_update_not_allowed.php install"
"php ./tools/build/direct_composer_install_update_not_allowed.php install"
],
"pre-update-cmd": [
"php tools/build/direct_composer_install_update_not_allowed.php update"
],
"generate_lock_use_current_json": [
"@putenv ELASTIC_OTEL_PHP_TOOLS_ALLOW_DIRECT_COMPOSER_COMMAND=true",
"composer --ignore-platform-req=ext-mysqli --ignore-platform-req=ext-pgsql --ignore-platform-req=ext-opentelemetry --no-interaction --no-plugins --no-scripts --no-install update"
"php ./tools/build/direct_composer_install_update_not_allowed.php update"
],
"parallel-lint": [
"@putenv ELASTIC_OTEL_ENABLED=false",
Expand Down
136 changes: 0 additions & 136 deletions generated_composer_lock_files/dev.json

This file was deleted.

Loading
Loading