Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to Laravel 11. #1047

Open
wants to merge 2 commits into
base: 5.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@
"php": "^8.0",
"doctrine/dbal": "~2.5|~3.0",
"ramsey/uuid": "^4.0",
"laravel/framework": "^9.0|^10.0"
"laravel/framework": "^9.0|^10.0|^11.0"
},
"require-dev": {
"fakerphp/faker": "^1.12",
"laravel/laravel": "^9.0|^10.0",
"laravel/laravel": "^9.0|^10.0|^11.0",
"mockery/mockery": "^1.0",
"phpunit/phpunit": "^9.0",
"symfony/dom-crawler": "~3.1"
Expand Down
16 changes: 13 additions & 3 deletions src/Website/Directory.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
namespace Hyn\Tenancy\Website;

use Hyn\Tenancy\Contracts\Tenant;
use Hyn\Tenancy\Environment;
use Hyn\Tenancy\Contracts\Website;
use Hyn\Tenancy\Environment;
use Illuminate\Contracts\Config\Repository;
use Illuminate\Contracts\Filesystem\Filesystem;
use Illuminate\Filesystem\Filesystem as LocalSystem;
Expand Down Expand Up @@ -78,7 +78,7 @@ public function setWebsite(Website $website): Directory
* @param bool $local
* @return string
*/
public function path(string $path = null, $local = false): string
public function path($path): string
{
$prefix = "{$this->getWebsite()->uuid}/";

Expand All @@ -90,7 +90,7 @@ public function path(string $path = null, $local = false): string
$path = "$prefix$path";
}

if ($local && $this->isLocal()) {
if ($this->isLocal()) {
$config = $this->filesystem->getConfig();
$path = sprintf(
"%s/%s",
Expand All @@ -102,6 +102,16 @@ public function path(string $path = null, $local = false): string
return $path;
}

public function putFile($path, $file = null, $options = [])
{
// tba
}

public function putFileAs($path, $file, $name = null, $options = [])
{
// tba
}
Comment on lines +105 to +113
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mikebronner Maybe the only thing that still needs to be added are these methods to make sure nobody's application actually fails. Other than that: I'm fine with merging this


/**
* Get the contents of a file.
*
Expand Down