Skip to content

Commit

Permalink
upgrade to symfony 7.2
Browse files Browse the repository at this point in the history
  • Loading branch information
ad3n committed Jan 31, 2025
1 parent b67b9f1 commit 80e66a8
Show file tree
Hide file tree
Showing 158 changed files with 18,291 additions and 17,628 deletions.
6 changes: 2 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
FROM openswoole/swoole:latest-alpine

MAINTAINER Muhammad Surya Ihsanuddin<[email protected]>

# Install Dependencies
RUN apk update
RUN apk add --no-cache supervisor vim autoconf gcc make g++ inotify-tools bash git
Expand All @@ -15,8 +13,8 @@ RUN pecl bundle redis && cd redis && phpize && ./configure --enable-redis-igbina
RUN docker-php-ext-enable igbinary redis inotify amqp apcu

# Install PHP Core Extensions
RUN docker-php-ext-install curl intl mbstring zip bcmath imap opcache gd pdo_pgsql pcntl iconv sockets
RUN docker-php-ext-enable curl intl mbstring zip bcmath imap opcache gd pdo_pgsql pcntl iconv sockets
RUN docker-php-ext-install curl intl mbstring zip bcmath imap opcache gd pdo_pgsql pcntl sockets
RUN docker-php-ext-enable curl intl mbstring zip bcmath imap opcache gd pdo_pgsql pcntl sockets

# Install Composer
ADD docker/composer.sh /composer.sh
Expand Down
40 changes: 20 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -444,37 +444,37 @@ Secara default, SemartApiSkeleton akan mengubah `bool` menjadi `string` (direpre
Kita dapat mengubahnya melalui file `templates/todo/all.html.twig` sebagai berikut:

```twig
{% for property in properties %}
{% if 'id' != property.name %}
{%- for property in properties -%}
{%- if 'id' != property.name -%}
<tr>
<td style="width: 149px;">{{ ('sas.table.column.' ~ context ~ '.' ~ property.name) | trans({}, 'tables') }}</td>
<td style="width: 149px;">{{- ('sas.table.column.' ~ context ~ '.' ~ property.name) | trans({}, 'tables') -}}</td>
<td style="width: 7px;">:</td>
{% if 'done' == property.name %}
<td>{% if todo.done %}Selesai{% else %}Belum Selesai{% endif %}</td>
{% else %}
<td>{{ semart_print(attribute(data, property.name)) }}</td>
{% endif %}
{%- if 'done' == property.name -%}
<td>{%- if todo.done -%} Selesai{%- else -%} Belum Selesai{%- endif -%} </td>
{%- else -%}
<td>{{- semart_print(attribute(data, property.name)) -}}</td>
{%- endif -%}
</tr>
{% endif %}
{% endfor %}
{%- endif -%}
{%- endfor -%}
```

Selain itu, kita juga perlu mengubah file `templates/todo/view.html.twig` sebagai berikut:

```twig
{% for property in properties %}
{% if 'id' != property.name %}
{%- for property in properties -%}
{%- if 'id' != property.name -%}
<tr>
<td style="width: 149px;">{{ ('sas.table.column.' ~ context ~ '.' ~ property.name) | trans({}, 'tables') }}</td>
<td style="width: 149px;">{{- ('sas.table.column.' ~ context ~ '.' ~ property.name) | trans({}, 'tables') -}}</td>
<td style="width: 7px;">:</td>
{% if 'done' == property.name %}
<td>{% if data.done %}Selesai{% else %}Belum Selesai{% endif %}</td>
{% else %}
<td>{{ semart_print(attribute(data, property.name)) }}</td>
{% endif %}
{%- if 'done' == property.name -%}
<td>{%- if data.done -%} Selesai{%- else -%} Belum Selesai{%- endif -%} </td>
{%- else -%}
<td>{{- semart_print(attribute(data, property.name)) -}}</td>
{%- endif -%}
</tr>
{% endif %}
{% endfor %}
{%- endif -%}
{%- endfor -%}
```

Untuk lebih jelas tentang Twig Template, kamu dapat membaca dokumentasi resmi [Twig Template](https://twig.symfony.com)
Expand Down
2 changes: 1 addition & 1 deletion Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ tasks:
- docker compose -f docker-compose.yml up --remove-orphans
start:
cmds:
- docker compose -f docker-compose.yml up --remove-orphans
- docker compose -f docker-compose.yml up -d --remove-orphans
stop:
cmds:
- docker compose -f docker-compose.yml stop
Expand Down
121 changes: 60 additions & 61 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,74 +16,73 @@
}
],
"require": {
"php": ">=8.1",
"php": "^8.4",
"ext-ctype": "*",
"ext-iconv": "*",
"ext-json": "*",
"ext-openssl": "*",
"ext-pdo": "*",
"ext-redis": "*",
"composer/composer": ">=2.0",
"cron/cron": ">=1.4",
"damienharper/auditor-bundle": ">=4.0",
"doctrine/annotations": ">=1.13",
"doctrine/dbal": "^2.13.6",
"doctrine/doctrine-bundle": ">=2.4",
"doctrine/orm": ">=2.9",
"friendsofphp/proxy-manager-lts": ">=1.0",
"friendsofsymfony/rest-bundle": ">=3.0",
"gesdinet/jwt-refresh-token-bundle": ">=v1.0.0",
"lexik/jwt-authentication-bundle": ">=2.11",
"nelmio/api-doc-bundle": ">=v4.0.1",
"nelmio/cors-bundle": ">=2.2",
"phpdocumentor/reflection-docblock": ">=5.2",
"ramsey/uuid-doctrine": ">=1.6",
"runtime/swoole": ">=0.2.1",
"snc/redis-bundle": ">=3.0",
"stof/doctrine-extensions-bundle": ">=1.4",
"symfony/amqp-messenger": ">=5.4",
"symfony/asset": ">=5.4",
"symfony/console": ">=5.4",
"symfony/doctrine-messenger": ">=5.4",
"symfony/dotenv": ">=5.4",
"symfony/flex": ">=1.3.1",
"symfony/form": ">=5.4",
"symfony/framework-bundle": ">=5.4",
"symfony/http-client": ">=5.4",
"symfony/lock": ">=5.4",
"symfony/messenger": ">=5.4",
"symfony/mime": ">=5.4",
"symfony/monolog-bundle": ">=3.5",
"symfony/property-access": ">=5.4",
"symfony/property-info": ">=5.4",
"symfony/rate-limiter": ">=5.4",
"symfony/runtime": ">=5.4",
"symfony/serializer": ">=5.4",
"symfony/string": ">=5.4",
"symfony/twig-bundle": ">=5.4",
"symfony/validator": ">=5.4",
"symfony/web-link": ">=5.4",
"symfony/yaml": ">=5.4",
"twig/extra-bundle": ">=3.0",
"twig/twig": ">=3.0",
"vich/uploader-bundle": ">=1.13"
"composer/composer": "^2.8",
"ad3n/cron": "^1.0",
"damienharper/auditor-bundle": "^6.2",
"doctrine/annotations": "^2.0",
"doctrine/dbal": "^4.2",
"doctrine/doctrine-bundle": "^2.13",
"doctrine/orm": "^3.3",
"friendsofphp/proxy-manager-lts": "^1.0",
"friendsofsymfony/rest-bundle": "^3.8",
"lexik/jwt-authentication-bundle": "^3.1",
"nelmio/api-doc-bundle": "^4.36",
"nelmio/cors-bundle": "^2.5",
"phpdocumentor/reflection-docblock": "^5.6",
"ramsey/uuid-doctrine": "^2.1",
"runtime/swoole": "^0.4",
"snc/redis-bundle": "^4.8",
"stof/doctrine-extensions-bundle": "^1.13",
"symfony/amqp-messenger": "^7.2",
"symfony/asset": "^7.2",
"symfony/console": "^7.2",
"symfony/doctrine-messenger": "^7.2",
"symfony/dotenv": "^7.2",
"symfony/flex": "^2.4",
"symfony/form": "^7.2",
"symfony/framework-bundle": "^7.2",
"symfony/http-client": "^7.2",
"symfony/lock": "^7.2",
"symfony/messenger": "^7.2",
"symfony/mime": "^7.2",
"symfony/monolog-bundle": "^3.10",
"symfony/property-access": "^7.2",
"symfony/property-info": "^7.2",
"symfony/rate-limiter": "^7.2",
"symfony/runtime": "^7.2",
"symfony/serializer": "^7.2",
"symfony/string": "^7.2",
"symfony/twig-bundle": "^7.2",
"symfony/validator": "^7.2",
"symfony/web-link": "^7.2",
"symfony/yaml": "^7.2",
"twig/extra-bundle": "^3.19",
"twig/twig": "^3.19",
"vich/uploader-bundle": "^2.5"
},
"require-dev": {
"dg/bypass-finals": ">=1.3",
"doctrine/doctrine-fixtures-bundle": ">=3.3",
"friendsofphp/php-cs-fixer": ">=2.16",
"nunomaduro/phpinsights": ">=2.0",
"phpstan/phpstan": ">=1.1",
"phpunit/phpunit": ">=9.5",
"rector/rector": ">=0.12.7",
"swoole/ide-helper": ">=4.7",
"symfony/browser-kit": ">=5.4",
"symfony/css-selector": ">=5.4",
"symfony/debug-bundle": ">=5.4",
"symfony/maker-bundle": ">=1.19",
"symfony/phpunit-bridge": ">=5.4",
"symfony/stopwatch": ">=5.4",
"symfony/web-profiler-bundle": ">=5.4"
"dg/bypass-finals": "^1.9",
"doctrine/doctrine-fixtures-bundle": "^4.0",
"friendsofphp/php-cs-fixer": "^3.68",
"nunomaduro/phpinsights": "^2.12",
"phpstan/phpstan": "^2.1",
"phpunit/phpunit": "^11.5",
"rector/rector": "^2.0",
"swoole/ide-helper": "^6.0",
"symfony/browser-kit": "^7.2",
"symfony/css-selector": "^7.2",
"symfony/debug-bundle": "^7.2",
"symfony/maker-bundle": "^1.62",
"symfony/phpunit-bridge": "^7.2",
"symfony/stopwatch": "^7.2",
"symfony/web-profiler-bundle": "^7.2"
},
"config": {
"preferred-install": {
Expand Down Expand Up @@ -138,7 +137,7 @@
"extra": {
"symfony": {
"allow-contrib": true,
"require": ">=5.4"
"require": "^7.2"
}
}
}
Loading

0 comments on commit 80e66a8

Please sign in to comment.