From dda2e5f7932bd486af4f6f3021ac8367ba20e668 Mon Sep 17 00:00:00 2001 From: Shift Date: Wed, 19 Feb 2025 04:59:11 +0000 Subject: [PATCH 1/2] Bump dependencies for Laravel 12 --- composer.json | 216 +++++++++++++++++++++++++------------------------- 1 file changed, 108 insertions(+), 108 deletions(-) diff --git a/composer.json b/composer.json index da57f4307..78e3ef8d1 100644 --- a/composer.json +++ b/composer.json @@ -1,112 +1,112 @@ { - "name": "area17/twill", - "type": "library", - "license": "Apache-2.0", - "description": "Twill is an open source CMS toolkit for Laravel that helps developers rapidly create a custom admin console that is intuitive, powerful and flexible.", - "keywords": [ - "A17", - "twill", - "laravel", - "cms" - ], - "homepage": "https://twillcms.com", - "authors": [ - { - "name": "AREA 17", - "email": "hello@twill.io", - "homepage": "https://area17.com" - } - ], - "support": { - "issues": "https://github.com/area17/twill/issues/", - "docs": "https://twillcms.com/docs/", - "chat": "https://discord.gg/cnWk7EFv8R" - }, - "require": { - "php": "^8.0", - "ext-json": "*", - "ext-pdo": "*", - "astrotomic/laravel-translatable": "^v11.12", - "cartalyst/tags": "^12.0 || ^13.0 || ^14.0", - "doctrine/dbal": "^3.0 || ^4.0", - "guzzlehttp/guzzle": "^7.0", - "imgix/imgix-php": "^3.0", - "kalnoy/nestedset": "^6.0", - "laravel/framework": "^9.0 || ^10.0 || ^11.0", - "laravel/socialite": "^5.3", - "laravel/ui": "^4.0", - "league/flysystem-aws-s3-v3": "^3.0", - "league/glide-symfony": "^1.0 || ^2.0", - "matthewbdaly/laravel-azure-storage": "^2.0", - "myclabs/php-enum": "^1.5", - "pragmarx/google2fa-qrcode": "^2.0", - "spatie/laravel-activitylog": "^4.0", - "spatie/laravel-analytics": "^4.0 || ^5.0", - "spatie/once": "^3.0" - }, - "require-dev": { - "area17/phptorch": "dev-main", - "chillerlan/php-qrcode": "~4.0", - "friendsofphp/php-cs-fixer": "^3.0", - "nette/php-generator": "^4.0.3", - "nunomaduro/collision": "^6.0 || ^7.0 || ^8.0", - "nunomaduro/larastan": "^2.0", - "orchestra/testbench": "^7.8 || ^8.0 || ^9.0", - "orchestra/testbench-dusk": "^7.8 || ^8.0 || ^9.0", - "phpunit/php-invoker": "^3.1 || ^4.0", - "phpunit/phpunit": "~9.0 || ~10.0", - "rector/rector": "^0.19.2 || ^1.0 ", - "spatie/invade": "^1.1", - "squizlabs/php_codesniffer": "*" - }, - "autoload": { - "psr-4": { - "A17\\Twill\\": "src/" - } - }, - "autoload-dev": { - "psr-4": { - "A17\\Twill\\Tests\\Unit\\": "tests/unit", - "A17\\Twill\\Tests\\Integration\\": "tests/integration", - "A17\\Twill\\Tests\\Browser\\": "tests/Browser", - "A17\\Docs\\": "docs/generator", - "App\\": "vendor/orchestra/testbench-dusk/laravel/app" - } - }, - "scripts": { - "test:phpunit": "vendor/bin/phpunit", - "test:analyse": "php -d memory_limit=-1 vendor/bin/phpstan analyse", - "test:syntax": "vendor/bin/php-cs-fixer --dry-run fix src", - "test": [ - "@test:syntax", - "@test:phpunit" + "name": "area17/twill", + "type": "library", + "license": "Apache-2.0", + "description": "Twill is an open source CMS toolkit for Laravel that helps developers rapidly create a custom admin console that is intuitive, powerful and flexible.", + "keywords": [ + "A17", + "twill", + "laravel", + "cms" ], - "post-autoload-dump": [ - "@php ./vendor/bin/testbench package:discover --ansi" - ] - }, - "extra": { - "laravel": { - "providers": [ - "A17\\Twill\\TwillServiceProvider" - ], - "aliases": { - "TwillCapsules": "A17\\Twill\\Facades\\TwillCapsules", - "TwillRoutes": "A17\\Twill\\Facades\\TwillRoutes", - "TwillBlocks": "A17\\Twill\\Facades\\TwillBlocks", - "TwillUtil": "A17\\Twill\\Facades\\TwillUtil", - "TwillAppSettings": "A17\\Twill\\Facades\\TwillAppSettings", - "TwillNavigation": "A17\\Twill\\Facades\\TwillNavigation", - "TwillPermissions": "A17\\Twill\\Facades\\TwillPermissions" - } - } - }, - "minimum-stability": "dev", - "prefer-stable": true, - "config": { - "sort-packages": true, - "allow-plugins": { - "cweagans/composer-patches": true + "homepage": "https://twillcms.com", + "authors": [ + { + "name": "AREA 17", + "email": "hello@twill.io", + "homepage": "https://area17.com" + } + ], + "support": { + "issues": "https://github.com/area17/twill/issues/", + "docs": "https://twillcms.com/docs/", + "chat": "https://discord.gg/cnWk7EFv8R" + }, + "require": { + "php": "^8.0", + "ext-json": "*", + "ext-pdo": "*", + "astrotomic/laravel-translatable": "^v11.12", + "cartalyst/tags": "^12.0 || ^13.0 || ^14.0", + "doctrine/dbal": "^3.0 || ^4.0", + "guzzlehttp/guzzle": "^7.0", + "imgix/imgix-php": "^3.0 || ^4.1", + "kalnoy/nestedset": "^6.0", + "laravel/framework": "^9.0 || ^10.0 || ^11.0 || ^12.0", + "laravel/socialite": "^5.3", + "laravel/ui": "^4.0", + "league/flysystem-aws-s3-v3": "^3.0", + "league/glide-symfony": "^1.0 || ^2.0", + "matthewbdaly/laravel-azure-storage": "^2.0", + "myclabs/php-enum": "^1.5", + "pragmarx/google2fa-qrcode": "^2.0 || ^3.0", + "spatie/laravel-activitylog": "^4.0", + "spatie/laravel-analytics": "^4.0 || ^5.0", + "spatie/once": "^3.0" + }, + "require-dev": { + "area17/phptorch": "dev-main", + "chillerlan/php-qrcode": "~4.0 || ^5.0", + "friendsofphp/php-cs-fixer": "^3.0", + "nette/php-generator": "^4.0.3", + "nunomaduro/collision": "^6.0 || ^7.0 || ^8.0", + "nunomaduro/larastan": "^2.0", + "orchestra/testbench": "^7.8 || ^8.0 || ^9.0 || ^10.0", + "orchestra/testbench-dusk": "^7.8 || ^8.0 || ^9.0 || ^10.0", + "phpunit/php-invoker": "^3.1 || ^4.0 || ^6.0", + "phpunit/phpunit": "~9.0 || ~10.0 || ^11.5.3", + "rector/rector": "^0.19.2 || ^1.0 || ^2.0", + "spatie/invade": "^1.1 || ^2.1", + "squizlabs/php_codesniffer": "*" + }, + "autoload": { + "psr-4": { + "A17\\Twill\\": "src/" + } + }, + "autoload-dev": { + "psr-4": { + "A17\\Twill\\Tests\\Unit\\": "tests/unit", + "A17\\Twill\\Tests\\Integration\\": "tests/integration", + "A17\\Twill\\Tests\\Browser\\": "tests/Browser", + "A17\\Docs\\": "docs/generator", + "App\\": "vendor/orchestra/testbench-dusk/laravel/app" + } + }, + "scripts": { + "test:phpunit": "vendor/bin/phpunit", + "test:analyse": "php -d memory_limit=-1 vendor/bin/phpstan analyse", + "test:syntax": "vendor/bin/php-cs-fixer --dry-run fix src", + "test": [ + "@test:syntax", + "@test:phpunit" + ], + "post-autoload-dump": [ + "@php ./vendor/bin/testbench package:discover --ansi" + ] + }, + "extra": { + "laravel": { + "providers": [ + "A17\\Twill\\TwillServiceProvider" + ], + "aliases": { + "TwillCapsules": "A17\\Twill\\Facades\\TwillCapsules", + "TwillRoutes": "A17\\Twill\\Facades\\TwillRoutes", + "TwillBlocks": "A17\\Twill\\Facades\\TwillBlocks", + "TwillUtil": "A17\\Twill\\Facades\\TwillUtil", + "TwillAppSettings": "A17\\Twill\\Facades\\TwillAppSettings", + "TwillNavigation": "A17\\Twill\\Facades\\TwillNavigation", + "TwillPermissions": "A17\\Twill\\Facades\\TwillPermissions" + } + } + }, + "minimum-stability": "dev", + "prefer-stable": true, + "config": { + "sort-packages": true, + "allow-plugins": { + "cweagans/composer-patches": true + } } - } } From 67fefea817ff96b2c7d98a4615d8ca822ccf7541 Mon Sep 17 00:00:00 2001 From: Shift Date: Wed, 19 Feb 2025 04:59:11 +0000 Subject: [PATCH 2/2] Update GitHub Actions for Laravel 12 --- .github/workflows/main.yml | 43 ++++++++++++++++++++++++++++++++++---- 1 file changed, 39 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 521f661ee..1caff824d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -8,11 +8,15 @@ on: jobs: lint: + runs-on: ubuntu-latest + + steps: - name: Checkout code uses: actions/checkout@v2 + - name: Checking for prtodo's. run: | if grep --exclude-dir={.git,.github,vendor} -rE "PRtodo"; then @@ -21,6 +25,7 @@ jobs: echo "All good" fi + - name: Checking for leftover "ray" usages. run: | if grep --exclude-dir={.git,.github,vendor} -rE "ray("; then @@ -29,6 +34,7 @@ jobs: echo "All good" fi + - name: Setup PHP uses: shivammathur/setup-php@v2 with: @@ -36,21 +42,27 @@ jobs: extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo coverage: none + - name: Install dependencies run: | composer require "laravel/framework:11.*" --no-interaction --no-update composer install + - name: Execute tests run: vendor/bin/phpstan + - name: Check code style run: vendor/bin/phpcs test: name: PHP ${{ matrix.php }} - LARAVEL ${{ matrix.laravel }} - DBAL ${{ matrix.dbal }} + timeout-minutes: 30 + runs-on: ${{ matrix.os }} + services: mysql: image: mysql:latest @@ -61,13 +73,14 @@ jobs: ports: - 3306/tcp options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 + strategy: fail-fast: false matrix: os: [ubuntu-latest] php: [8.3, 8.2, 8.1] - laravel: [10.*, 11.*] - dbal: [3.*, 4.*] + laravel: ['10.*', '11.*', '12.*'] + dbal: ['3.*', '4.*'] exclude: - laravel: 10.* dbal: 4.* @@ -75,21 +88,28 @@ jobs: php: 8.1 - laravel: 11.* dbal: 3.* + - laravel: 12.* + php: 8.1 include: - laravel: 10.* testbench: 8.* - laravel: 11.* testbench: 9.* + - laravel: 12.* + testbench: 10.* + steps: - name: Set timezone? uses: szenius/set-timezone@v1.0 with: - timezoneLinux: "Europe/Paris" + timezoneLinux: Europe/Paris + - name: Checkout code uses: actions/checkout@v2 + - name: Setup PHP uses: shivammathur/setup-php@v2 with: @@ -99,15 +119,18 @@ jobs: env: COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Setup problem matchers run: | echo "::add-matcher::${{ runner.tool_cache }}/php.json" echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" + - name: Get Composer Cache Directory id: composer-cache run: | echo "::set-output name=dir::$(composer config cache-files-dir)" + - uses: actions/cache@v2 with: path: ${{ steps.composer-cache.outputs.dir }} @@ -115,38 +138,47 @@ jobs: restore-keys: | ${{ matrix.os }}-${{ matrix.laravel }}-${{ matrix.php }}-${{ matrix.dbal }}-composer- + - name: Install dependencies run: | composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "doctrine/dbal:${{ matrix.dbal }}" --no-interaction --no-update composer install --prefer-dist --no-interaction --no-plugins + - name: Setup Node.js uses: actions/setup-node@v1 with: - node-version: '20.x' + node-version: 20.x + - name: Build npm dependencies. run: | npm ci + - name: Create blocks dir run: | mkdir ./frontend/js/components/blocks/customs + - name: Build twill. run: ./vendor/bin/testbench twill:build --forTesting env: CACHE_STORE: array + - name: Upgrade Chrome uses: browser-actions/setup-chrome@latest + - name: Upgrade Chrome Driver run: ./vendor/bin/testbench dusk:chrome-driver --detect + - name: Prepare Testbench Dusk run: ./vendor/bin/testbench-dusk package:discover + - name: Execute all tests run: vendor/bin/phpunit --stop-on-error env: @@ -156,17 +188,20 @@ jobs: with: files: .github/clover.xml + - name: Replace asterisks in Laravel run: echo "REPLACED_LARAVEL=${MATRIX_LARAVEL//\*/_}" >> $GITHUB_ENV env: MATRIX_LARAVEL: ${{ matrix.laravel }} + - name: Replace asterisks in DBAL id: replace_dbal run: echo "REPLACED_DBAL=${MATRIX_DBAL//\*/_}" >> $GITHUB_ENV env: MATRIX_DBAL: ${{ matrix.dbal }} + - name: Upload artifact uses: actions/upload-artifact@v4 with: