diff --git a/.github/workflows/cypress.yml b/.github/workflows/cypress.yml index cc77f060..1ff0f712 100644 --- a/.github/workflows/cypress.yml +++ b/.github/workflows/cypress.yml @@ -23,7 +23,8 @@ jobs: fail-fast: false matrix: php-versions: [ '8.1', '8.2', '8.3' ] - name: MyAAC on PHP ${{ matrix.php-versions }} + ots: ['tfs-1.4', 'canary-3.1.2'] # TODO: add 'tfs-master' (actually doesn't work cause AAC doesn't support reading .env configuration) + name: Cypress (PHP ${{ matrix.php-versions }}, ${{ matrix.ots }}) steps: - name: 📌 MySQL Start & init & show db run: | @@ -36,43 +37,77 @@ jobs: with: ref: develop + - uses: actions/setup-node@v4 + with: + node-version: 18 + - run: npm ci + - name: Checkout TFS uses: actions/checkout@v4 + if: matrix.ots == 'tfs-1.4' with: repository: otland/forgottenserver ref: 1.4 - path: tfs + path: ots - - name: Import TFS Schema + - name: Checkout TFS + uses: actions/checkout@v4 + if: matrix.ots == 'tfs-master' + with: + repository: otland/forgottenserver + ref: master + path: ots + + - name: Checkout Canary + uses: actions/checkout@v4 + if: matrix.ots == 'canary-3.1.2' + with: + repository: opentibiabr/canary + ref: v3.1.2 + path: ots + + - name: Import OTS Schema run: | - mysql -uroot -proot myaac < tfs/schema.sql + mysql -uroot -proot myaac < ots/schema.sql - name: Rename config.lua - run: mv tfs/config.lua.dist tfs/config.lua + run: mv ots/config.lua.dist ots/config.lua - - name: Replace mysqlUser - uses: jacobtomlinson/gha-find-replace@v2 + - name: Replace mysqlUser (TFS 1.4) + uses: jacobtomlinson/gha-find-replace@v3 + if: matrix.ots == 'tfs-1.4' with: find: 'mysqlUser = "forgottenserver"' replace: 'mysqlUser = "root"' regex: false - include: 'tfs/config.lua' + include: 'ots/config.lua' - - name: Replace mysqlPass - uses: jacobtomlinson/gha-find-replace@v2 + - name: Replace mysqlPass (TFS 1.4) + uses: jacobtomlinson/gha-find-replace@v3 + if: matrix.ots == 'tfs-1.4' with: find: 'mysqlPass = ""' replace: 'mysqlPass = "root"' regex: false - include: 'tfs/config.lua' + include: 'ots/config.lua' - - name: Replace mysqlDatabase - uses: jacobtomlinson/gha-find-replace@v2 + - name: Replace mysqlDatabase (TFS 1.4) + uses: jacobtomlinson/gha-find-replace@v3 + if: matrix.ots == 'tfs-1.4' with: find: 'mysqlDatabase = "forgottenserver"' replace: 'mysqlDatabase = "myaac"' regex: false - include: 'tfs/config.lua' + include: 'ots/config.lua' + + - name: Replace mysqlDatabase (Canary) + uses: jacobtomlinson/gha-find-replace@v3 + if: matrix.ots == 'canary-3.1.2' + with: + find: 'mysqlDatabase = "otservbr-global"' + replace: 'mysqlDatabase = "myaac"' + regex: false + include: 'ots/config.lua' - name: Setup PHP uses: shivammathur/setup-php@v2 @@ -91,7 +126,7 @@ jobs: # Use composer.json for key, if composer.lock is not committed. key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} #key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: ${{ runner.os }}-composer- + restore-keys: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} - name: Install Composer dependencies run: composer install --no-progress --prefer-dist --optimize-autoloader @@ -103,25 +138,25 @@ jobs: uses: cypress-io/github-action@v6 env: CYPRESS_URL: http://localhost:8080 - CYPRESS_SERVER_PATH: /home/runner/work/myaac/myaac/tfs + CYPRESS_SERVER_PATH: /home/runner/work/myaac/myaac/ots - name: Save screenshots uses: actions/upload-artifact@v4 if: always() with: - name: cypress-screenshots-${{ matrix.php-versions }} + name: cypress-screenshots-${{ matrix.php-versions }}-${{ matrix.ots }} path: cypress/screenshots - name: Upload Cypress Videos uses: actions/upload-artifact@v4 if: always() with: - name: cypress-videos-${{ matrix.php-versions }} + name: cypress-videos-${{ matrix.php-versions }}-${{ matrix.ots }} path: cypress/videos - name: Upload PHP Logs uses: actions/upload-artifact@v4 if: always() with: - name: php-log-${{ matrix.php-versions }} + name: php-log-${{ matrix.php-versions }}-${{ matrix.ots }} path: php.log diff --git a/.gitignore b/.gitignore index 1cffccfe..375f475f 100644 --- a/.gitignore +++ b/.gitignore @@ -12,10 +12,12 @@ vendor # npm node_modules +tools/ext # cypress cypress.env.json cypress/e2e/2-advanced-examples +cypress/screenshots # created by release.sh releases diff --git a/CHANGELOG.md b/CHANGELOG.md index cc04b286..7327c8ff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,10 +22,10 @@ Minimum PHP version for this release is 8.1. * list of open source libraries used in project page * auto-loading of themes, commands & pages from plugins/ folder. You need just to place them in correct folder and they will be loaded automatically - this allows better customization, without interfering with core AAC folders. This will allow in the future automatic updates for plugins as well the AAC as whole. * config.php moved to Admin Panel -> Settings page -* new console script: ma (comes from MyAAC) - using symfony/console - * usage: `php ma` (will list all commands by default) - * example: `php ma cache:clear` - * example: `php ma plugin:install theme-example.zip` +* new console script: aac (comes from MyAAC) - using symfony/console + * usage: `php aac` (will list all commands by default) + * example: `php aac cache:clear` + * example: `php aac plugin:install theme-example.zip` * replace POT Query Builder to Eloquent ORM. Not 100% yet - in some places there is still old $db approach used (@gpedro) (https://github.com/slawkens/myaac/pull/230) * brand new charming installation page (by @fernandomatos) * using Bootstrap diff --git a/README.md b/README.md index 3597df17..dc0bbff6 100644 --- a/README.md +++ b/README.md @@ -10,21 +10,20 @@ Official website: https://my-aac.org [](https://discord.gg/2J39Wus) [](https://github.com/slawkens/myaac/issues?q=is%3Aissue+is%3Aclosed) -| Version | Status | Branch | Requirements | -|:-----------|:------------------------------------------|:--------|:---------------| -| **0.10.x** | **Active development** | develop | **PHP >= 8.0** | -| 0.9.x | Active support | 0.9 | PHP >= 7.2.5 | -| 0.8.x | Active support | master | PHP >= 7.2.5 | -| 0.7.x | End Of Life | 0.7 | PHP >= 5.3.3 | +| Version | Status | Branch | Requirements | +|:--------|:-----------------------|:--------|:---------------| +| **1.x** | **Active development** | develop | **PHP >= 8.1** | +| 0.9.x | Not developed anymore | 0.9 | PHP >= 7.2.5 | +| 0.8.x | Active support | master | PHP >= 7.2.5 | +| 0.7.x | End Of Life | 0.7 | PHP >= 5.3.3 | ### Requirements - - PHP 8.0 or later - MySQL database - - PDO PHP Extension - - XML PHP Extension - - (optional) ZIP PHP Extension - - (optional) mod_rewrite to use friendly_urls + - PHP Extensions: pdo, xml, json + - (optional) apache2 mod_rewrite (to use friendly_urls) + - (optional) zip PHP Extension (to install plugins) + - (optional) gd PHP Extension (for generating signature images) ### Installation @@ -48,7 +47,8 @@ Official website: https://my-aac.org ### Configuration -Check *config.php* to get more informations. +Check *config.php* to get more informations. (Notice: MyAAC 1.0+ doesn't use config.php anymore, it has been moved to Admin Panel - Settings page). + Use *config.local.php* for your local configuration changes. ### Branches diff --git a/admin/template/template.php b/admin/template/template.php index d147053f..feacb01b 100644 --- a/admin/template/template.php +++ b/admin/template/template.php @@ -6,7 +6,7 @@