Skip to content

Commit

Permalink
Adds Laravel 11 support
Browse files Browse the repository at this point in the history
  • Loading branch information
nunomaduro committed Dec 12, 2023
1 parent a978f6e commit c94da7f
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 53 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,14 @@ jobs:
fail-fast: true
matrix:
php: [8.0, 8.1, 8.2, 8.3]
laravel: [8, 9, 10]
laravel: [8, 9, 10, 11]
exclude:
- php: '8.0'
laravel: 10
- php: '8.0'
laravel: 11
- php: 8.1
laravel: 11
- php: 8.2
laravel: 8
- php: 8.3
Expand Down
8 changes: 2 additions & 6 deletions UPGRADE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,8 @@ With every upgrade, make sure to publish Telescope's assets and clear the view c

php artisan view:clear

## Upgrading To 4.0 From 3.x
## Upgrading To 5.0 From 4.x

### Minimum PHP Version

PHP 7.3 is now the minimum required version.

### Minimum Laravel Version

Laravel 8.0 is now the minimum required version.
PHP 8.0 is now the minimum required version.
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@
"require": {
"php": "^8.0",
"ext-json": "*",
"laravel/framework": "^8.37|^9.0|^10.0",
"symfony/var-dumper": "^5.0|^6.0"
"laravel/framework": "^8.37|^9.0|^10.0|^11.0",
"symfony/var-dumper": "^5.0|^6.0|^7.0"
},
"require-dev": {
"ext-gd": "*",
"guzzlehttp/guzzle": "^6.0|^7.0",
"laravel/octane": "^1.4",
"orchestra/testbench": "^6.0|^7.0|^8.0",
"orchestra/testbench": "^6.0|^7.0|^8.0|9.0",
"phpstan/phpstan": "^1.10",
"phpunit/phpunit": "^9.0"
"phpunit/phpunit": "^9.0|^10.4"
},
"autoload": {
"psr-4": {
Expand Down
19 changes: 0 additions & 19 deletions src/Telescope.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,6 @@ class Telescope
*/
public static $shouldRecord = false;

/**
* Indicates if Telescope migrations will be run.
*
* @var bool
*/
public static $runsMigrations = true;

/**
* Register the Telescope watchers and start recording if necessary.
*
Expand Down Expand Up @@ -819,16 +812,4 @@ public static function scriptVariables()
'recording' => ! cache('telescope:pause-recording'),
];
}

/**
* Configure Telescope to not register its migrations.
*
* @return static
*/
public static function ignoreMigrations()
{
static::$runsMigrations = false;

return new static;
}
}
23 changes: 0 additions & 23 deletions src/TelescopeServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ class TelescopeServiceProvider extends ServiceProvider
*/
public function boot()
{
$this->registerMigrations();
$this->registerCommands();
$this->registerPublishing();

Expand Down Expand Up @@ -62,18 +61,6 @@ protected function registerResources()
$this->loadViewsFrom(__DIR__.'/../resources/views', 'telescope');
}

/**
* Register the package's migrations.
*
* @return void
*/
protected function registerMigrations()
{
if ($this->app->runningInConsole() && $this->shouldMigrate()) {
$this->loadMigrationsFrom(__DIR__.'/../database/migrations');
}
}

/**
* Register the package's publishable resources.
*
Expand Down Expand Up @@ -174,14 +161,4 @@ protected function registerDatabaseDriver()
->needs('$chunkSize')
->give(config('telescope.storage.database.chunk'));
}

/**
* Determine if we should register the migrations.
*
* @return bool
*/
protected function shouldMigrate()
{
return Telescope::$runsMigrations && config('telescope.driver') === 'database';
}
}

0 comments on commit c94da7f

Please sign in to comment.