Skip to content

Commit

Permalink
renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
markvaneijk committed Feb 26, 2025
1 parent 9ebf2da commit 9183ef6
Show file tree
Hide file tree
Showing 19 changed files with 61 additions and 58 deletions.
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github: vormkracht10
github: backstagephp
8 changes: 4 additions & 4 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
blank_issues_enabled: false
contact_links:
- name: Ask a question
url: https://github.com/vormkracht10/laravel-static/discussions/new?category=q-a
url: https://github.com/backstagephp/laravel-static/discussions/new?category=q-a
about: Ask the community for help
- name: Request a feature
url: https://github.com/vormkracht10/laravel-static/discussions/new?category=ideas
url: https://github.com/backstagephp/laravel-static/discussions/new?category=ideas
about: Share ideas for new features
- name: Report a security issue
url: https://github.com/vormkracht10/laravel-static/security/policy
url: https://github.com/backstagephp/laravel-static/security/policy
about: Learn how to notify us for sensitive bugs
- name: Report a bug
url: https://github.com/vormkracht10/laravel-static/issues/new
url: https://github.com/backstagephp/laravel-static/issues/new
about: Report a reproducible bug
4 changes: 4 additions & 0 deletions .phpactor.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"$schema": "/phpactor.schema.json",
"language_server_phpstan.enabled": false
}
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) vormkracht10 <mark@vormkracht10.nl>
Copyright (c) Backstage <mark@backstagephp.com>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
19 changes: 9 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Build a static website with Laravel on the backend

[![Total Downloads](https://img.shields.io/packagist/dt/vormkracht10/laravel-static.svg?style=flat-square)](https://packagist.org/packages/vormkracht10/laravel-static)
[![Tests](https://github.com/vormkracht10/laravel-static/actions/workflows/run-tests.yml/badge.svg?branch=main)](https://github.com/vormkracht10/laravel-static/actions/workflows/run-tests.yml)
[![PHPStan](https://github.com/vormkracht10/laravel-static/actions/workflows/phpstan.yml/badge.svg?branch=main)](https://github.com/vormkracht10/laravel-static/actions/workflows/phpstan.yml)
![GitHub release (latest by date)](https://img.shields.io/github/v/release/vormkracht10/laravel-static)
![Packagist PHP Version Support](https://img.shields.io/packagist/php-v/vormkracht10/laravel-static)
[![Latest Version on Packagist](https://img.shields.io/packagist/v/vormkracht10/laravel-static.svg?style=flat-square)](https://packagist.org/packages/vormkracht10/laravel-static)
[![Total Downloads](https://img.shields.io/packagist/dt/backstage/laravel-static.svg?style=flat-square)](https://packagist.org/packages/backstage/laravel-static)
[![Tests](https://github.com/backstagephp/laravel-static/actions/workflows/run-tests.yml/badge.svg?branch=main)](https://github.com/backstagephp/laravel-static/actions/workflows/run-tests.yml)
[![PHPStan](https://github.com/backstagephp/laravel-static/actions/workflows/phpstan.yml/badge.svg?branch=main)](https://github.com/backstagephp/laravel-static/actions/workflows/phpstan.yml)
![GitHub release (latest by date)](https://img.shields.io/github/v/release/backstagephp/laravel-static)
![Packagist PHP Version Support](https://img.shields.io/packagist/php-v/backstage/laravel-static)
[![Latest Version on Packagist](https://img.shields.io/packagist/v/backstage/laravel-static.svg?style=flat-square)](https://packagist.org/packages/backstage/laravel-static)

This is where your description should go. Limit it to a paragraph or two. Consider adding a small example.

Expand All @@ -14,7 +14,7 @@ This is where your description should go. Limit it to a paragraph or two. Consid
You can install the package via composer:

```bash
composer require vormkracht10/laravel-static
composer require backstage/laravel-static
```

You can publish and run the migrations with:
Expand Down Expand Up @@ -46,8 +46,7 @@ php artisan vendor:publish --tag="laravel-static-views"
## Usage

```php
$laravelStatic = new Vormkracht10\LaravelStatic();
echo $laravelStatic->echoPhrase('Hello, Vormkracht10!');

```

## Testing
Expand All @@ -70,7 +69,7 @@ Please review [our security policy](../../security/policy) on how to report secu

## Credits

- [Mark van Eijk](https://github.com/vormkracht10)
- [Mark van Eijk](https://github.com/backstagephp)
- [All Contributors](../../contributors)

## License
Expand Down
18 changes: 9 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "vormkracht10/laravel-static",
"name": "backstage/laravel-static",
"description": "Serving your Laravel app with speed using static caching",
"keywords": [
"vormkracht10",
"laravel",
"laravel-static"
],
"homepage": "https://github.com/vormkracht10/laravel-static",
"homepage": "https://github.com/backstagephp/laravel-static",
"license": "MIT",
"authors": [
{
Expand All @@ -17,10 +17,10 @@
],
"require": {
"php": "^8.1",
"illuminate/contracts": "^9.0|^10.0|^11.0",
"illuminate/contracts": "^11.0 || ^12.0",
"laravel/helpers": "^1.6",
"spatie/crawler": "^8.0",
"spatie/laravel-package-tools": "^1.13.0",
"spatie/laravel-package-tools": "^1.15.0",
"voku/html-min": "^4.5"
},
"require-dev": {
Expand All @@ -35,12 +35,12 @@
},
"autoload": {
"psr-4": {
"Vormkracht10\\LaravelStatic\\": "src"
"Backstage\\Laravel\\Static\\": "src"
}
},
"autoload-dev": {
"psr-4": {
"Vormkracht10\\LaravelStatic\\Tests\\": "tests"
"Backstage\\Laravel\\Static\\Tests\\": "tests"
}
},
"scripts": {
Expand All @@ -59,13 +59,13 @@
"extra": {
"laravel": {
"providers": [
"Vormkracht10\\LaravelStatic\\LaravelStaticServiceProvider"
"Backstage\\Laravel\\Static\\StaticServiceProvider"
],
"aliases": {
"LaravelStatic": "Vormkracht10\\LaravelStatic\\Facades\\LaravelStatic"
"Static": "Backstage\\Laravel\\Static\\Facades\\StaticCache"
}
}
},
"minimum-stability": "dev",
"prefer-stable": true
}
}
2 changes: 1 addition & 1 deletion config/static.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

use Spatie\Crawler\CrawlProfiles\CrawlInternalUrls;
use Vormkracht10\LaravelStatic\Crawler\StaticCrawlObserver;
use Backstage\Laravel\Static\Crawler\StaticCrawlObserver;

return [
/**
Expand Down
2 changes: 1 addition & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
verbose="true"
>
<testsuites>
<testsuite name="Vormkracht10 Test Suite">
<testsuite name="Backstage Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
Expand Down
10 changes: 5 additions & 5 deletions src/Commands/StaticBuildCommand.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Vormkracht10\LaravelStatic\Commands;
namespace Backstage\Laravel\Static\Commands;

use Exception;
use GuzzleHttp\RequestOptions;
Expand All @@ -10,8 +10,8 @@
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Route;
use Spatie\Crawler\Crawler;
use Vormkracht10\LaravelStatic\LaravelStatic;
use Vormkracht10\LaravelStatic\Middleware\StaticResponse;
use Backstage\Laravel\Static\StaticCache;
use Backstage\Laravel\Static\Middleware\StaticResponse;

class StaticBuildCommand extends Command
{
Expand All @@ -21,9 +21,9 @@ class StaticBuildCommand extends Command

protected Repository $config;

protected LaravelStatic $static;
protected Static $static;

public function __construct(Repository $config, LaravelStatic $static)
public function __construct(Repository $config, Static $static)
{
parent::__construct();

Expand Down
6 changes: 3 additions & 3 deletions src/Commands/StaticClearCommand.php
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
<?php

namespace Vormkracht10\LaravelStatic\Commands;
namespace Backstage\Laravel\Static\Commands;

use Illuminate\Config\Repository;
use Illuminate\Console\Command;
use Illuminate\Routing\Route;
use Illuminate\Support\Arr;
use Illuminate\Support\Facades\Route as Router;
use Vormkracht10\LaravelStatic\LaravelStatic;
use Backstage\Laravel\Static\StaticCache;

class StaticClearCommand extends Command
{
public $signature = 'static:clear {--u|uri=*} {--r|routes=*} {--d|domain=*}';

public $description = 'Clear static cached files';

public function __construct(protected Repository $config, protected LaravelStatic $static)
public function __construct(protected Repository $config, protected Static $static)
{
parent::__construct();
}
Expand Down
2 changes: 1 addition & 1 deletion src/Crawler/StaticCrawlObserver.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Vormkracht10\LaravelStatic\Crawler;
namespace Backstage\Laravel\Static\Crawler;

use GuzzleHttp\Exception\RequestException;
use Illuminate\Console\View\Components\Factory as ComponentFactory;
Expand Down
6 changes: 3 additions & 3 deletions src/Facades/LaravelStatic.php → src/Facades/StaticCache.php
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<?php

namespace Vormkracht10\LaravelStatic\Facades;
namespace Backstage\Laravel\Static\Facades;

use Illuminate\Support\Facades\Facade;

/**
* @see \Vormkracht10\LaravelStatic\LaravelStatic
*/
class LaravelStatic extends Facade
class StaticCache extends Facade
{
protected static function getFacadeAccessor()
{
return \Vormkracht10\LaravelStatic\LaravelStatic::class;
return \Backstage\Laravel\Static\StaticCache::class;
}
}
2 changes: 1 addition & 1 deletion src/Middleware/PreventStaticResponseMiddleware.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Vormkracht10\LaravelStatic\Middleware;
namespace Backstage\Laravel\Static\Middleware;

use Closure;
use Illuminate\Http\Request;
Expand Down
6 changes: 3 additions & 3 deletions src/Middleware/StaticResponse.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?php

namespace Vormkracht10\LaravelStatic\Middleware;
namespace Backstage\Laravel\Static\Middleware;

use Closure;
use Illuminate\Config\Repository;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use voku\helper\HtmlMin;
use Vormkracht10\LaravelStatic\Facades\LaravelStatic;
use Backstage\Laravel\Static\Facades\StaticCache;

class StaticResponse
{
Expand Down Expand Up @@ -124,7 +124,7 @@ public function createStaticFile(Request $request, $response): void
return;
}

$disk = LaravelStatic::disk();
$disk = StaticCache::disk();

if (! $disk->exists('.gitignore')) {
$disk->put('.gitignore', '*' . PHP_EOL . '!.gitignore');
Expand Down
4 changes: 2 additions & 2 deletions src/LaravelStatic.php → src/StaticCache.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?php

namespace Vormkracht10\LaravelStatic;
namespace Backstage\Laravel\Static;

use Illuminate\Config\Repository;
use Illuminate\Filesystem\Filesystem as Files;
use Illuminate\Filesystem\FilesystemManager as Storage;

class LaravelStatic
class StaticCache
{
public function __construct(
protected Repository $config,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<?php

namespace Vormkracht10\LaravelStatic;
namespace Backstage\Laravel\Static;

use Illuminate\Contracts\Http\Kernel;
use Spatie\LaravelPackageTools\Package;
use Spatie\LaravelPackageTools\PackageServiceProvider;
use Vormkracht10\LaravelStatic\Commands\StaticBuildCommand;
use Vormkracht10\LaravelStatic\Commands\StaticClearCommand;
use Vormkracht10\LaravelStatic\Middleware\PreventStaticResponseMiddleware;
use Backstage\Laravel\Static\Commands\StaticBuildCommand;
use Backstage\Laravel\Static\Commands\StaticClearCommand;
use Backstage\Laravel\Static\Middleware\PreventStaticResponseMiddleware;

class LaravelStaticServiceProvider extends PackageServiceProvider
class StaticServiceProvider extends PackageServiceProvider
{
public function configurePackage(Package $package): void
{
Expand Down
8 changes: 4 additions & 4 deletions tests/Feature/StaticCacheTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

use Illuminate\Support\Facades\Route;
use voku\helper\HtmlMin;
use Vormkracht10\LaravelStatic\Facades\LaravelStatic;
use Vormkracht10\LaravelStatic\Middleware\StaticResponse;
use Backstage\Laravel\Static\Facades\StaticCache;
use Backstage\Laravel\Static\Middleware\StaticResponse;

it('can cache a page response', function ($route) {
config([
'static.files.disk' => 'local',
]);

$disk = LaravelStatic::disk();
$disk = StaticCache::disk();

Route::get($route, fn () => $route)
->middleware(StaticResponse::class);
Expand All @@ -34,7 +34,7 @@
'static.options.minify_html' => true,
]);

$disk = LaravelStatic::disk();
$disk = StaticCache::disk();

$html = <<<'HTML'
<h1>Hello!</h1>
Expand Down
2 changes: 1 addition & 1 deletion tests/Pest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php

use Vormkracht10\LaravelStatic\Tests\TestCase;
use Backstage\Laravel\Static\Tests\TestCase;

uses(TestCase::class)->in(__DIR__);
6 changes: 3 additions & 3 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

namespace Vormkracht10\LaravelStatic\Tests;
namespace Backstage\Laravel\Static\Tests;

use Orchestra\Testbench\TestCase as Orchestra;
use Vormkracht10\LaravelStatic\LaravelStaticServiceProvider;
use Backstage\Laravel\Static\StaticServiceProvider;

class TestCase extends Orchestra
{
Expand All @@ -15,7 +15,7 @@ protected function setUp(): void
protected function getPackageProviders($app)
{
return [
LaravelStaticServiceProvider::class,
StaticServiceProvider::class,
];
}
}

0 comments on commit 9183ef6

Please sign in to comment.