Skip to content

Commit

Permalink
[6.x] Rad Pack (#394)
Browse files Browse the repository at this point in the history
* Update composer.json references

* Change namespace in classes

* Update package name

* Update links
  • Loading branch information
duncanmcclean authored Jan 12, 2024
1 parent 3f3ff18 commit b8697d3
Show file tree
Hide file tree
Showing 92 changed files with 317 additions and 310 deletions.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ blank_issues_enabled: false

contact_links:
- name: '🙏 Help'
url: https://github.com/duncanmcclean/runway/discussions/new
url: https://github.com/statamic-rad-pack/runway/discussions/new
about: 'Have a question? Need help troubleshooting? Open a discussion.'
- name: '💡 Feature Requests'
url: https://github.com/duncanmcclean/runway/discussions/new
url: https://github.com/statamic-rad-pack/runway/discussions/new
about: 'Have any idea for a new feature or enhancements to an existing one? Open a discussion.'
3 changes: 1 addition & 2 deletions .github/workflows/pint-fix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,13 @@ permissions:
jobs:
fix-php-code-styling:
runs-on: ubuntu-latest
if: github.repository_owner == 'duncanmcclean'
if: github.repository_owner == 'statamic-rad-pack'

steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
# token: ${{ secrets.PINT }}

- name: Fix PHP code style issues
uses: aglipanci/laravel-pint-action@1.0.0
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2023 Duncan McClean
Copyright (c) 2024 Statamic Rad Pack

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
28 changes: 18 additions & 10 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,31 +1,39 @@
{
"name": "doublethreedigital/runway",
"description": "Use Eloquent in Statamic like never before.",
"license": "proprietary",
"name": "statamic-rad-pack/runway",
"description": "Eloquently manage your database models in Statamic.",
"license": "mit",
"authors": [
{
"name": "Duncan McClean",
"email": "duncan@doublethree.digital",
"homepage": "https://duncanmcclean.com",
"role": "Developer"
}
],
"autoload": {
"psr-4": {
"DoubleThreeDigital\\Runway\\": "src"
"StatamicRadPack\\Runway\\": "src"
}
},
"autoload-dev": {
"psr-4": {
"DoubleThreeDigital\\Runway\\Tests\\": "tests",
"DoubleThreeDigital\\Runway\\Tests\\Fixtures\\": "tests/__fixtures__/app",
"DoubleThreeDigital\\Runway\\Tests\\Fixtures\\Database\\Factories\\": "tests/__fixtures__/database/factories"
"StatamicRadPack\\Runway\\Tests\\": "tests",
"StatamicRadPack\\Runway\\Tests\\Fixtures\\": "tests/__fixtures__/app",
"StatamicRadPack\\Runway\\Tests\\Fixtures\\Database\\Factories\\": "tests/__fixtures__/database/factories"
}
},
"extra": {
"statamic": {
"name": "Runway",
"description": "Use Eloquent in Statamic like never before."
"description": "Eloquently manage your database models in Statamic."
},
"laravel": {
"providers": [
"DoubleThreeDigital\\Runway\\ServiceProvider"
"StatamicRadPack\\Runway\\ServiceProvider"
]
},
"download-dist": {
"url": "https://github.com/duncanmcclean/runway/releases/download/{$version}/dist.tar.gz",
"url": "https://github.com/statamic-rad-pack/runway/releases/download/{$version}/dist.tar.gz",
"path": "dist"
}
},
Expand Down
4 changes: 2 additions & 2 deletions docs/control-panel.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ If you need to, you can change how resource actions are authorized by extending

namespace App\Policies;

use DoubleThreeDigital\Runway\Policies\ResourcePolicy as RunwayResourcePolicy;
use StatamicRadPack\Runway\Policies\ResourcePolicy as RunwayResourcePolicy;
use Illuminate\Auth\Access\HandlesAuthorization;

class ResourcePolicy extends RunwayResourcePolicy
Expand All @@ -123,7 +123,7 @@ class ResourcePolicy extends RunwayResourcePolicy
namespace App\Providers;

use App\Policies\ResourcePolicy;
use DoubleThreeDigital\Runway\Policies\ResourcePolicy as RunwayResourcePolicy;
use StatamicRadPack\Runway\Policies\ResourcePolicy as RunwayResourcePolicy;

public function boot()
{
Expand Down
2 changes: 1 addition & 1 deletion docs/frontend-routing.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Next, add the `RunwayRoutes` trait to your Eloquent model.
```php
// app/Models/Product.php

use DoubleThreeDigital\Runway\Routing\Traits\RunwayRoutes;
use StatamicRadPack\Runway\Routing\Traits\RunwayRoutes;

class Product extends Model
{
Expand Down
2 changes: 1 addition & 1 deletion docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ title: 'Installation'
First, you need to install Runway as a Composer dependency:

```
composer require doublethreedigital/runway
composer require statamic-rad-pack/runway
```

Next, publish the configuration file:
Expand Down
2 changes: 1 addition & 1 deletion docs/resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Second, you need to add the `HasRunwayResource` trait to your Eloquent model.
```php
// app/Models/Order.php

use DoubleThreeDigital\Runway\Traits\HasRunwayResource; // [tl! add]
use StatamicRadPack\Runway\Traits\HasRunwayResource; // [tl! add]

class Order extends Model
{
Expand Down
2 changes: 1 addition & 1 deletion docs/templating.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ You may also provide multiple scopes, if that's something you need...
Just like with the collection tag, you may filter your results like so:

```antlers
{{ runway:post where="author_id:duncan" }}
{{ runway:post where="author_name:duncan" }}
<h2>{{ title }}</h2>
<p>{{ intro_text }}</p>
{{ /runway:post }}
Expand Down
2 changes: 1 addition & 1 deletion docs/upgrade-guides/v3-x-to-v4-0.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,4 @@ If you're using **any other** user repository, you will need to update the permi

---

[You may also view a diff of changes between v3.x and v4.0](https://github.com/duncanmcclean/runway/compare/3.x...4.x)
[You may also view a diff of changes between v3.x and v4.0](https://github.com/statamic-rad-pack/runway/compare/3.x...4.x)
2 changes: 1 addition & 1 deletion docs/upgrade-guides/v4-x-to-v5-0.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ class Order extends Model

---

[You may also view a diff of changes between v4.x and v5.0](https://github.com/duncanmcclean/runway/compare/4.x...5.x)
[You may also view a diff of changes between v4.x and v5.0](https://github.com/statamic-rad-pack/runway/compare/4.x...5.x)
6 changes: 3 additions & 3 deletions routes/cp.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

use DoubleThreeDigital\Runway\Http\Controllers\CP\ResourceActionController;
use DoubleThreeDigital\Runway\Http\Controllers\CP\ResourceController;
use DoubleThreeDigital\Runway\Http\Controllers\CP\ResourceListingController;
use Illuminate\Support\Facades\Route;
use StatamicRadPack\Runway\Http\Controllers\CP\ResourceActionController;
use StatamicRadPack\Runway\Http\Controllers\CP\ResourceController;
use StatamicRadPack\Runway\Http\Controllers\CP\ResourceListingController;

Route::name('runway.')->prefix('runway')->group(function () {
Route::get('/{resource}', [ResourceController::class, 'index'])->name('index');
Expand Down
6 changes: 3 additions & 3 deletions src/Actions/DeleteModel.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php

namespace DoubleThreeDigital\Runway\Actions;
namespace StatamicRadPack\Runway\Actions;

use DoubleThreeDigital\Runway\Exceptions\ResourceNotFound;
use DoubleThreeDigital\Runway\Runway;
use Illuminate\Database\Eloquent\Model;
use Statamic\Actions\Action;
use StatamicRadPack\Runway\Exceptions\ResourceNotFound;
use StatamicRadPack\Runway\Runway;

class DeleteModel extends Action
{
Expand Down
6 changes: 3 additions & 3 deletions src/Actions/DuplicateModel.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php

namespace DoubleThreeDigital\Runway\Actions;
namespace StatamicRadPack\Runway\Actions;

use DoubleThreeDigital\Runway\Exceptions\ResourceNotFound;
use DoubleThreeDigital\Runway\Runway;
use Illuminate\Database\Eloquent\Model;
use Statamic\Actions\Action;
use StatamicRadPack\Runway\Exceptions\ResourceNotFound;
use StatamicRadPack\Runway\Runway;

class DuplicateModel extends Action
{
Expand Down
6 changes: 3 additions & 3 deletions src/Console/Commands/GenerateBlueprint.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?php

namespace DoubleThreeDigital\Runway\Console\Commands;
namespace StatamicRadPack\Runway\Console\Commands;

use DoubleThreeDigital\Runway\Resource;
use DoubleThreeDigital\Runway\Runway;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Schema;
use Illuminate\Support\Str;
use Statamic\Console\RunsInPlease;
use StatamicRadPack\Runway\Resource;
use StatamicRadPack\Runway\Runway;

class GenerateBlueprint extends Command
{
Expand Down
6 changes: 3 additions & 3 deletions src/Console/Commands/GenerateMigration.php
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<?php

namespace DoubleThreeDigital\Runway\Console\Commands;
namespace StatamicRadPack\Runway\Console\Commands;

use DoubleThreeDigital\Runway\Resource;
use DoubleThreeDigital\Runway\Runway;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Artisan;
use Illuminate\Support\Facades\File;
use Illuminate\Support\Facades\Schema;
use Illuminate\Support\Str;
use Statamic\Console\RunsInPlease;
use Statamic\Fields\Field;
use StatamicRadPack\Runway\Resource;
use StatamicRadPack\Runway\Runway;
use Symfony\Component\Process\Process;

class GenerateMigration extends Command
Expand Down
6 changes: 3 additions & 3 deletions src/Console/Commands/ListResources.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php

namespace DoubleThreeDigital\Runway\Console\Commands;
namespace StatamicRadPack\Runway\Console\Commands;

use DoubleThreeDigital\Runway\Resource;
use DoubleThreeDigital\Runway\Runway;
use Illuminate\Console\Command;
use Statamic\Console\RunsInPlease;
use StatamicRadPack\Runway\Resource;
use StatamicRadPack\Runway\Runway;

class ListResources extends Command
{
Expand Down
6 changes: 3 additions & 3 deletions src/Console/Commands/MigrateBlueprints.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?php

namespace DoubleThreeDigital\Runway\Console\Commands;
namespace StatamicRadPack\Runway\Console\Commands;

use DoubleThreeDigital\Runway\Resource;
use DoubleThreeDigital\Runway\Runway;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\File;
use Statamic\Console\RunsInPlease;
use Statamic\Facades\Blueprint;
use Statamic\Fields\Blueprint as FieldsBlueprint;
use StatamicRadPack\Runway\Resource;
use StatamicRadPack\Runway\Runway;

class MigrateBlueprints extends Command
{
Expand Down
8 changes: 4 additions & 4 deletions src/Console/Commands/RebuildUriCache.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?php

namespace DoubleThreeDigital\Runway\Console\Commands;
namespace StatamicRadPack\Runway\Console\Commands;

use DoubleThreeDigital\Runway\Resource;
use DoubleThreeDigital\Runway\Routing\RunwayUri;
use DoubleThreeDigital\Runway\Runway;
use Illuminate\Console\Command;
use Illuminate\Support\Str;
use Statamic\Console\RunsInPlease;
use Statamic\View\Antlers\Parser;
use StatamicRadPack\Runway\Resource;
use StatamicRadPack\Runway\Routing\RunwayUri;
use StatamicRadPack\Runway\Runway;

class RebuildUriCache extends Command
{
Expand Down
4 changes: 2 additions & 2 deletions src/Data/AugmentedModel.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?php

namespace DoubleThreeDigital\Runway\Data;
namespace StatamicRadPack\Runway\Data;

use DoubleThreeDigital\Runway\Runway;
use Illuminate\Support\Collection;
use Illuminate\Support\Str;
use Statamic\Data\AbstractAugmented;
use Statamic\Fields\Field;
use Statamic\Fields\Value;
use Statamic\Statamic;
use StatamicRadPack\Runway\Runway;

class AugmentedModel extends AbstractAugmented
{
Expand Down
2 changes: 1 addition & 1 deletion src/Data/HasAugmentedInstance.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace DoubleThreeDigital\Runway\Data;
namespace StatamicRadPack\Runway\Data;

use Statamic\Contracts\Data\Augmented;

Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/ResourceNotFound.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace DoubleThreeDigital\Runway\Exceptions;
namespace StatamicRadPack\Runway\Exceptions;

class ResourceNotFound extends \Exception
{
Expand Down
6 changes: 3 additions & 3 deletions src/Fieldtypes/BaseFieldtype.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
<?php

namespace DoubleThreeDigital\Runway\Fieldtypes;
namespace StatamicRadPack\Runway\Fieldtypes;

use DoubleThreeDigital\Runway\Query\Scopes\Filters\Fields\Models;
use DoubleThreeDigital\Runway\Runway;
use Illuminate\Database\Eloquent\Collection as EloquentCollection;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
Expand All @@ -14,6 +12,8 @@
use Statamic\Facades\Blink;
use Statamic\Facades\Parse;
use Statamic\Fieldtypes\Relationship;
use StatamicRadPack\Runway\Query\Scopes\Filters\Fields\Models;
use StatamicRadPack\Runway\Runway;

class BaseFieldtype extends Relationship
{
Expand Down
4 changes: 2 additions & 2 deletions src/Fieldtypes/BelongsToFieldtype.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

namespace DoubleThreeDigital\Runway\Fieldtypes;
namespace StatamicRadPack\Runway\Fieldtypes;

use DoubleThreeDigital\Runway\Runway;
use Statamic\Facades\GraphQL;
use StatamicRadPack\Runway\Runway;

class BelongsToFieldtype extends BaseFieldtype
{
Expand Down
4 changes: 2 additions & 2 deletions src/Fieldtypes/HasManyFieldtype.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?php

namespace DoubleThreeDigital\Runway\Fieldtypes;
namespace StatamicRadPack\Runway\Fieldtypes;

use DoubleThreeDigital\Runway\Runway;
use GraphQL\Type\Definition\ResolveInfo;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
use Statamic\Facades\Blink;
use Statamic\Facades\GraphQL;
use StatamicRadPack\Runway\Runway;

class HasManyFieldtype extends BaseFieldtype
{
Expand Down
4 changes: 2 additions & 2 deletions src/GraphQL/ResourceIndexQuery.php
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<?php

namespace DoubleThreeDigital\Runway\GraphQL;
namespace StatamicRadPack\Runway\GraphQL;

use DoubleThreeDigital\Runway\Resource;
use GraphQL\Type\Definition\Type;
use Illuminate\Support\Str;
use Statamic\Facades\GraphQL;
use Statamic\GraphQL\Queries\Query;
use Statamic\GraphQL\Types\JsonArgument;
use Statamic\Support\Arr;
use Statamic\Tags\Concerns\QueriesConditions;
use StatamicRadPack\Runway\Resource;

class ResourceIndexQuery extends Query
{
Expand Down
4 changes: 2 additions & 2 deletions src/GraphQL/ResourceShowQuery.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?php

namespace DoubleThreeDigital\Runway\GraphQL;
namespace StatamicRadPack\Runway\GraphQL;

use DoubleThreeDigital\Runway\Resource;
use GraphQL\Type\Definition\Type;
use Illuminate\Support\Str;
use Statamic\Facades\GraphQL;
use Statamic\GraphQL\Queries\Query;
use StatamicRadPack\Runway\Resource;

class ResourceShowQuery extends Query
{
Expand Down
Loading

0 comments on commit b8697d3

Please sign in to comment.