Skip to content

Commit 692567b

Browse files
authored
Merge pull request #194 from xendit/feat/bump-to-support-php84
feat: magento module support php8.4
2 parents e6128e0 + 93c37f7 commit 692567b

5 files changed

Lines changed: 21 additions & 13 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
# CHANGELOG
2+
3+
## 12.1.1 (2025-10-08)
4+
- support php 8.4
5+
26
## 12.1.0 (2025-10-08)
37
- single xendit button for checkout
48
- cleanup cc and cc subscriptions and promo
@@ -75,7 +79,7 @@ Features:
7579
- Add new IDR payment Akulaku
7680

7781
Improvements:
78-
- Webhook update order status improvements
82+
- Webhook update order status improvements
7983

8084
## 4.0.1 (2022-08-01)
8185
Improvements:

DEV.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@
44

55
## 1. Machine Setup
66
1. Use Mac with Silicon
7-
2. Install `php@8.3`
8-
1. Run `brew install php@8.3`
7+
2. Install `php@8.4`
8+
1. Run `brew install php@8.4`
99
2. Bonus: `brew install brew-php-switcher` for easy php version switching
1010
3. Use `orbstack` for running docker containers
11-
1. Why? because `webdevops/php-apache-dev:8.3` doesn't work on ARM64 because of its apached ssl failing. [see this issue](https://github.com/webdevops/Dockerfile/issues/433). Weirdly, testing in orbstack works.
11+
1. Why? because `webdevops/php-apache-dev:8.4` doesn't work on ARM64 because of its apached ssl failing. [see this issue](https://github.com/webdevops/Dockerfile/issues/433). Weirdly, testing in orbstack works.
1212
2. Run `brew install orbstack`
1313
3. Run `Orbstack` in Application
1414
## 2. Local Magento2.4 Setup w/ Xendit Module
1515
1. Clone `magento2` in `./docker-magento/`
1616
1. Run `git clone https://github.com/magento/magento2.git`
17-
2. `git checkout 2.4`
17+
2. `git checkout 2.4.8`
1818
3. This will take some time
1919
2. Add local domain
2020
1. Why? this is needed to match the `base-url-secure` later on magento installation.
@@ -127,7 +127,7 @@ php bin/magento setup:install \
127127
--admin-use-security-key=1 \
128128
--session-save=files \
129129
--use-sample-data \
130-
--search-engine=elasticsearch7 \
130+
--search-engine=elasticsearch8 \
131131
--elasticsearch-host=elasticsearch \
132132
--elasticsearch-port=9200
133133
```

Logger/Handler.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
use Magento\Framework\Logger\Handler\Base;
77
use Magento\Store\Model\ScopeInterface;
88
use Monolog\Logger;
9+
use Monolog\LogRecord;
910

1011
/**
1112
* Class Handler
@@ -32,16 +33,17 @@ public function __construct(
3233
}
3334

3435
/**
35-
* @param array $record
36+
* @param array|LogRecord $record
3637
* @return bool
3738
*/
38-
public function isHandling(array $record): bool
39+
public function isHandling(array|LogRecord $record): bool
3940
{
4041
$isDebugEnabled = (bool)$this->scopeConfig->getValue("payment/xendit/debug", ScopeInterface::SCOPE_STORE);
4142
if ($isDebugEnabled) {
4243
return true;
4344
}
4445

45-
return $record['level'] >= \Monolog\Logger::WARNING;
46+
$level = $record instanceof LogRecord ? $record->level->value : $record['level'];
47+
return $level >= \Monolog\Logger::WARNING;
4648
}
4749
}

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"GPL-3.0"
88
],
99
"require": {
10-
"php": "~7.1.3||~7.2.0||~7.3.0||~7.4.0||~8.1.0||~8.2.0||~8.3.0",
10+
"php": "~7.1.3||~7.2.0||~7.3.0||~7.4.0||~8.1.0||~8.2.0||~8.3.0||~8.4.0",
1111
"magento/module-sales": ">=102.0.3",
1212
"magento/module-checkout": ">=100.3.3",
1313
"magento/module-payment": ">=100.3.3",

docker-magento/docker-compose.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
version: '3'
22
services:
33
web:
4-
image: webdevops/php-apache-dev:8.3
4+
image: webdevops/php-apache-dev:8.4
55
container_name: web
66
restart: always
77
user: root
@@ -49,15 +49,17 @@ services:
4949
depends_on:
5050
- mysql
5151
elasticsearch:
52-
image: docker.elastic.co/elasticsearch/elasticsearch:7.6.2
52+
image: docker.elastic.co/elasticsearch/elasticsearch:8.11.3
5353
container_name: elasticsearch
5454
ports:
5555
- "9200:9200"
5656
environment:
5757
- discovery.type=single-node
58-
- network.host=0.0.0.0 # Changed from localhost
58+
- network.host=0.0.0.0
5959
- http.port=9200
6060
- cluster.name=elasticsearch
61+
- xpack.security.enabled=false
62+
- xpack.security.http.ssl.enabled=false
6163
volumes:
6264
- elasticsearch_data:/var/lib/elastisearch
6365
volumes:

0 commit comments

Comments
 (0)