Skip to content

Commit

Permalink
Merge branch '1.x' into 9.x
Browse files Browse the repository at this point in the history
Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
  • Loading branch information
crynobone committed Nov 7, 2023
2 parents 2885640 + 67b2c77 commit 000ad0b
Show file tree
Hide file tree
Showing 12 changed files with 19 additions and 64 deletions.
1 change: 0 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
/phpstan.neon.dist export-ignore
/phpunit.xml export-ignore
/pint.json export-ignore
/sync.sh export-ignore
/testbench.yaml export-ignore
/CHANGELOG-*.md export-ignore
/CODE_OF_CONDUCT.md export-ignore
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/analyse.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/audits.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ name: audits
on:
push:
pull_request:
schedule:
- cron: '0 0 1 * *'
workflow_dispatch:

jobs:
audit-dependencies:
Expand All @@ -15,7 +14,6 @@ jobs:
os:
- "ubuntu-latest"
php:
- 8.1
- 8.2
- 8.3
experimental:
Expand All @@ -25,7 +23,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/coveralls.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-on-windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: tests-on-windows
on:
push:
pull_request:
workflow_dispatch:

jobs:
tests:
Expand All @@ -13,7 +14,6 @@ jobs:
os:
- "windows-latest"
php:
- 8.1
- 8.2
- 8.3
dependencies:
Expand All @@ -26,7 +26,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand Down
53 changes: 2 additions & 51 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ name: tests
on:
push:
pull_request:
workflow_dispatch:

jobs:
tests-on-laravel-11:
tests:
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental }}
strategy:
Expand Down Expand Up @@ -34,56 +35,6 @@ jobs:
extensions: dom, curl, libxml, mbstring, zip, pcntl, sqlite3, pdo_sqlite, bcmath, fileinfo
coverage: none

- name: Install Laravel 11
run: |
composer require "illuminate/contracts:11.x" --no-interaction --no-update
- name: Install dependencies
uses: "ramsey/composer-install@v2"
with:
dependency-versions: "${{ matrix.dependencies }}"
composer-options: "--prefer-dist --no-cache"

- name: Installed dependencies
run: composer show -D

- name: Execute tests
run: vendor/bin/phpunit --testdox

tests-on-laravel-10:
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental }}
strategy:
matrix:
os:
- "ubuntu-latest"
php:
- 8.1
- 8.2
- 8.3
dependencies:
- "highest"
- "lowest"
experimental:
- false

name: PHP${{ matrix.php }}-${{ matrix.os }} (${{ matrix.dependencies }})

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, sqlite3, pdo_sqlite, bcmath, fileinfo
coverage: none

- name: Install Laravel 10
run: |
composer require "illuminate/contracts:10.x" --no-interaction --no-update
- name: Install dependencies
uses: "ramsey/composer-install@v2"
with:
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG-1.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This changelog references the relevant changes (bug and security fixes) done to

## 1.0.0

Unreleased
Released: 2023-10-24

### Added

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ $ vendor/bin/phpunit

If the test suite passes on your local machine you should be good to go.

When you make a pull request, the tests will automatically be run again by [Travis CI](https://travis-ci.org/) on multiple php versions and hhvm.
When you make a pull request, the tests will automatically be run again by [GitHub Actions](https://github.com/orchestral/workbench/actions) on multiple php versions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (C) 2023 Mior Muhammad Zaki <http://git.io/crynobone>
Copyright (C) 2023 Mior Muhammad Zaki <https://github.com/crynobone>

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
Expand Down
2 changes: 1 addition & 1 deletion src/Composer.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function modify(callable $callback): void

file_put_contents(
$composerFile,
json_encode($composer, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE)
json_encode($composer, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_THROW_ON_ERROR)
);
}
}
1 change: 1 addition & 0 deletions src/Console/InstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ protected function appendScriptsToComposer(array $content, Filesystem $filesyste

$content['scripts']['build'] = '@php vendor/bin/testbench workbench:build --ansi';
$content['scripts']['serve'] = [
'Composer\\Config::disableProcessTimeout',
'@build',
'@php vendor/bin/testbench serve',
];
Expand Down
6 changes: 6 additions & 0 deletions src/WorkbenchServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@

namespace Orchestra\Workbench;

use Composer\InstalledVersions;
use Illuminate\Contracts\Events\Dispatcher as EventDispatcher;
use Illuminate\Contracts\Foundation\Application;
use Illuminate\Contracts\Http\Kernel as HttpKernel;
use Illuminate\Foundation\Console\AboutCommand;
use Illuminate\Support\ServiceProvider;
use Orchestra\Canvas\Core\PresetManager;
use Orchestra\Testbench\Foundation\Events\ServeCommandEnded;
Expand All @@ -29,6 +31,10 @@ public function register(): void

$manager->setDefaultDriver('workbench');
});

AboutCommand::add('Workbench', fn () => array_filter([
'Version' => InstalledVersions::getPrettyVersion('orchestra/workbench'),
]));
}

/**
Expand Down

0 comments on commit 000ad0b

Please sign in to comment.