Repository: pinpoint-apm/pinpoint-c-agent (language: python)

Issue:
PHP apcu library
**Is your feature request related to a problem? Please describe.**

https://www.php.net/manual/en/book.apcu.php

**Describe the solution you'd like**

Use pinpoint_join_cut 



Discussion / hints:

Fix patch:
diff --git a/DOC/PHP/Readme.md b/DOC/PHP/Readme.md
index 8156a4ce..44c7e117 100644
--- a/DOC/PHP/Readme.md
+++ b/DOC/PHP/Readme.md
@@ -1,27 +1,6 @@
 ## Supported
 
-<details> <summary>Libraries</summary>
-
-Type|Name|Version
----|---|---
-Built-in | curl| 
-||memcached|`3.2.0`
-||mysqli|
-||pdo|
-||phpredis|`6.0.2`
-|User |guzzlehttp| `8.0.x-dev`
-||predis|`3.0`
-||mongodb|`v1.19.x`
-</details> 
-
-<details> <summary>Frameworks</summary>
- 
-Name|Version|
-|---|---|
-|Yii2||
-|wordpress||
-
-</details>
+[pinpoint-apm/pinpoint-php-aop#supported-librariesframework ](https://github.com/pinpoint-apm/pinpoint-php-aop?tab=readme-ov-file#supported-librariesframework)
 
 ## Get Started
 


Test patch:
diff --git a/testapps/SimplePHP/composer.lock b/testapps/SimplePHP/composer.lock
index 5bb3bedb..ec5cd486 100644
--- a/testapps/SimplePHP/composer.lock
+++ b/testapps/SimplePHP/composer.lock
@@ -141,11 +141,11 @@
         },
         {
             "name": "pinpoint-apm/pinpoint-php-aop",
-            "version": "dev-fix-expose-autoload",
+            "version": "dev-feat-tp8-plugins",
             "dist": {
                 "type": "path",
                 "url": "/home/pinpoint/pinpoint-php-aop",
-                "reference": "f786f0818e9538b33e197e66337513780b2f3615"
+                "reference": "20239d4f8db5b751762686b9a6e0cfc08142fc51"
             },
             "require": {
                 "ext-json": "*",
diff --git a/testapps/SimplePHP/php.ini b/testapps/SimplePHP/php.ini
index fa2f61b3..25c8523b 100644
--- a/testapps/SimplePHP/php.ini
+++ b/testapps/SimplePHP/php.ini
@@ -12,3 +12,8 @@ pinpoint_php.DebugReport=true
 error_reporting = E_ALL | E_STRICT
 log_errors= On
 
+
+[apcu]
+extension=apcu.so
+apc.enabled=1
+apc.enable_cli=1
diff --git a/testapps/SimplePHP/run.php b/testapps/SimplePHP/run.php
index a164d6be..381e7196 100644
--- a/testapps/SimplePHP/run.php
+++ b/testapps/SimplePHP/run.php
@@ -188,6 +188,25 @@ function call_memcached()
     var_dump($Memcached->deleteMulti(["test_add", "a", "b", "c"]));  // int 0 which is Memcached::RES_SUCCESS
 }
 
+function call_apc()
+{
+    $bar = 'BAR';
+    apcu_add('foo', $bar);
+    var_dump(apcu_fetch('foo'));
+    echo "\n";
+    $bar = 'NEVER GETS SET';
+    apcu_add('foo', $bar);
+    var_dump(apcu_fetch('foo'));
+
+
+    apcu_store('cas', 2);
+    apcu_cas("cas", 1, 2);
+    apcu_cas("cas", 2, 1);
+    apcu_inc("cas");
+    var_dump(apcu_fetch("cas"));
+    apcu_clear_cache();
+}
+
 function main()
 {
     call_mysql();
@@ -197,6 +216,7 @@ function main()
     call_curl();
     call_redis();
     call_memcached();
+    call_apc();
 }
 
 main();
diff --git a/testapps/SimplePHP/simplephp.dockerfile b/testapps/SimplePHP/simplephp.dockerfile
index 09cce201..12bb232b 100644
--- a/testapps/SimplePHP/simplephp.dockerfile
+++ b/testapps/SimplePHP/simplephp.dockerfile
@@ -12,6 +12,7 @@ RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local
 RUN git clone --recurse-submodules --depth 1 --branch 1.18.1 https://github.com/mongodb/mongo-php-driver.git && cd mongo-php-driver && phpize && ./configure && make -j && make install 
 RUN cd /tmp/ && git clone https://github.com/phpredis/phpredis.git && cd phpredis && phpize && ./configure &&  make install
 RUN cd /tmp/ && git clone https://github.com/php-memcached-dev/php-memcached.git && cd php-memcached && phpize && ./configure &&  make install
+RUN cd /tmp/ && git clone https://github.com/krakjoe/apcu.git && cd apcu && phpize && ./configure &&  make install
 COPY config.m4 /pinpoint-c-agent/config.m4 
 COPY src/PHP /pinpoint-c-agent/src/PHP
 COPY common /pinpoint-c-agent/common
@@ -19,6 +20,6 @@ COPY tests /pinpoint-c-agent/tests
 
 RUN cd /pinpoint-c-agent/ && phpize && ./configure && make && make install
 
-RUN COMPOSER_ALLOW_SUPERUSER=1 composer update
+RUN COMPOSER_ALLOW_SUPERUSER=1 composer require pinpoint-apm/pinpoint-php-aop
 
 CMD [ "php" ,"/workspace/run.php" ]
diff --git a/testapps/cachethq/cachethq.dockerfile b/testapps/cachethq/cachethq.dockerfile
index 22877b34..8a6e712b 100644
--- a/testapps/cachethq/cachethq.dockerfile
+++ b/testapps/cachethq/cachethq.dockerfile
@@ -16,5 +16,5 @@ COPY testapps/cachethq/index.php /var/www/html/public/index.php
 # COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer
 RUN /bin/composer.phar self-update
 USER 1001
-RUN cd /var/www/html/ && php -d memory_limit=-1 /bin/composer.phar require  pinpoint-apm/pinpoint-php-aop:v3.0.1
+RUN cd /var/www/html/ && php -d memory_limit=-1 /bin/composer.phar require  pinpoint-apm/pinpoint-php-aop
 # USER root
\ No newline at end of file