Skip to content

Commit 4d48d13

Browse files
committed
Fix triggers
1 parent 09f02e2 commit 4d48d13

File tree

4 files changed

+13
-25
lines changed

4 files changed

+13
-25
lines changed

Dockerfile

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -57,16 +57,6 @@ RUN \
5757
&& ./configure --enable-http2 \
5858
&& make && make install
5959

60-
## MongoDB Extension
61-
FROM compile AS mongodb
62-
RUN \
63-
git clone --depth 1 --branch $PHP_MONGO_VERSION https://github.com/mongodb/mongo-php-driver.git \
64-
&& cd mongo-php-driver \
65-
&& git submodule update --init \
66-
&& phpize \
67-
&& ./configure \
68-
&& make && make install
69-
7060
## PCOV Extension
7161
FROM compile AS pcov
7262
RUN \
@@ -96,7 +86,6 @@ WORKDIR /usr/src/code
9686

9787
RUN echo extension=redis.so >> /usr/local/etc/php/conf.d/redis.ini
9888
RUN echo extension=swoole.so >> /usr/local/etc/php/conf.d/swoole.ini
99-
RUN echo extension=mongodb.so >> /usr/local/etc/php/conf.d/mongodb.ini
10089
RUN echo extension=pcov.so >> /usr/local/etc/php/conf.d/pcov.ini
10190
RUN echo extension=xdebug.so >> /usr/local/etc/php/conf.d/xdebug.ini
10291

@@ -109,7 +98,6 @@ RUN echo "memory_limit=1024M" >> $PHP_INI_DIR/php.ini
10998
COPY --from=composer /usr/local/src/vendor /usr/src/code/vendor
11099
COPY --from=swoole /usr/local/lib/php/extensions/no-debug-non-zts-20230831/swoole.so /usr/local/lib/php/extensions/no-debug-non-zts-20230831/
111100
COPY --from=redis /usr/local/lib/php/extensions/no-debug-non-zts-20230831/redis.so /usr/local/lib/php/extensions/no-debug-non-zts-20230831/
112-
COPY --from=mongodb /usr/local/lib/php/extensions/no-debug-non-zts-20230831/mongodb.so /usr/local/lib/php/extensions/no-debug-non-zts-20230831/
113101
COPY --from=pcov /usr/local/lib/php/extensions/no-debug-non-zts-20230831/pcov.so /usr/local/lib/php/extensions/no-debug-non-zts-20230831/
114102
COPY --from=xdebug /usr/local/lib/php/extensions/no-debug-non-zts-20230831/xdebug.so /usr/local/lib/php/extensions/no-debug-non-zts-20230831/
115103

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,10 @@ The database document interface only supports primitives types (`strings`, `inte
4949
Below is a list of supported databases, and their compatibly tested versions alongside a list of supported features and relevant limits.
5050

5151
| Adapter | Status | Version |
52-
| -------- | ------ | ------- |
52+
|----------|--------|---------|
5353
| MariaDB || 10.5 |
5454
| MySQL || 8.0 |
5555
| Postgres || 13.0 |
56-
| MongoDB || 5.0 |
5756
| SQLite || 3.38 |
5857

5958
` ✅ - supported `

docker-compose.yml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -70,17 +70,6 @@ services:
7070
- "8704:3306"
7171
environment:
7272
- MYSQL_ROOT_PASSWORD=password
73-
74-
mongo:
75-
image: mongo:5.0
76-
container_name: utopia-mongo
77-
networks:
78-
- database
79-
ports:
80-
- "8705:27017"
81-
environment:
82-
MONGO_INITDB_ROOT_USERNAME: root
83-
MONGO_INITDB_ROOT_PASSWORD: example
8473

8574
mysql:
8675
image: mysql:8.0.33

src/Database/Adapter/Pool.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,18 @@ public function delegate(string $method, array $args): mixed
5959
});
6060
}
6161

62+
public function before(string $event, string $name = '', ?callable $callback = null): static
63+
{
64+
$this->delegate(__FUNCTION__, \func_get_args());
65+
66+
return $this;
67+
}
68+
69+
protected function trigger(string $event, mixed $query): mixed
70+
{
71+
return $this->delegate(__FUNCTION__, \func_get_args());
72+
}
73+
6274
public function setTimeout(int $milliseconds, string $event = Database::EVENT_ALL): void
6375
{
6476
$this->delegate(__FUNCTION__, \func_get_args());

0 commit comments

Comments
 (0)