Skip to content

Commit

Permalink
refactor(builder): refactor from zephir.
Browse files Browse the repository at this point in the history
  • Loading branch information
noone-silent committed Jul 30, 2024
1 parent 81e5a0a commit 7f37bbf
Show file tree
Hide file tree
Showing 14 changed files with 321 additions and 457 deletions.
255 changes: 130 additions & 125 deletions composer.lock

Large diffs are not rendered by default.

82 changes: 0 additions & 82 deletions docker/8.3/.bashrc

This file was deleted.

107 changes: 0 additions & 107 deletions docker/8.3/Dockerfile

This file was deleted.

9 changes: 0 additions & 9 deletions docker/8.3/extra.ini

This file was deleted.

4 changes: 3 additions & 1 deletion resources/docker/8.1/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ RUN set -eux && \

# Update
RUN apt update -y && \
apt install -y \
apt install -y --no-install-recommends \
apt-utils \
gettext \
git \
Expand Down Expand Up @@ -105,4 +105,6 @@ COPY --from=composer /usr/bin/composer /usr/local/bin/composer
# Bash script with helper aliases
COPY ./.bashrc /root/.bashrc

USER $MY_USER

CMD ["php-fpm"]
4 changes: 3 additions & 1 deletion resources/docker/8.2/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ RUN set -eux && \

# Update
RUN apt update -y && \
apt install -y \
apt install -y --no-install-recommends \
apt-utils \
gettext \
git \
Expand Down Expand Up @@ -105,4 +105,6 @@ COPY --from=composer /usr/bin/composer /usr/local/bin/composer
# Bash script with helper aliases
COPY ./.bashrc /root/.bashrc

USER $MY_USER

CMD ["php-fpm"]
4 changes: 3 additions & 1 deletion resources/docker/8.3/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ RUN set -eux && \

# Update
RUN apt update -y && \
apt install -y \
apt install -y --no-install-recommends \
apt-utils \
gettext \
git \
Expand Down Expand Up @@ -105,4 +105,6 @@ COPY --from=composer /usr/bin/composer /usr/local/bin/composer
# Bash script with helper aliases
COPY ./.bashrc /root/.bashrc

USER $MY_USER

CMD ["php-fpm"]
13 changes: 13 additions & 0 deletions src/Mvc/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -6315,6 +6315,19 @@ private static function getPreparedQuery(
$builder->limit($params['limit'], $params['offset'] ?? null);
}

if (isset($params['columns']) && (is_array($params['columns']) || is_string($params['columns']))) {
$builder->columns($params['columns']);
}

if (isset($params['group']) && (is_array($params['group']) || is_string($params['group']))) {
$builder->groupBy($params['group']);
}

if (isset($params['order']) && (is_array($params['order']) || is_string($params['order']))) {
$builder->orderBy($params['order']);
}


$query = $builder->getQuery();

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Mvc/Model/Criteria.php
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ public function createBuilder(): BuilderInterface
*/
$builder = $manager->createBuilder($this->params);

$builder->from($this->model);
$builder->from((string)$this->model);

return $builder;
}
Expand Down
Loading

0 comments on commit 7f37bbf

Please sign in to comment.