Skip to content
Merged
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
14 changes: 8 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,6 @@ jobs:
- name: Execute front-end tests
run: npx nx affected -t lint test || true

# Build the front-end assets so the Vite manifest
# (public/build/.vite/manifest.json) exists for the back-end tests below.
# This is why the manifest is no longer committed to Git.
- name: Build front-end assets
run: npm run build

# Cache composer dependencies
- name: Cache composer dependencies
uses: actions/cache@v3
Expand All @@ -64,6 +58,14 @@ jobs:
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- name: Audit PHP dependencies security
run: composer audit

# Build the front-end assets so the Vite manifest
# (public/build/.vite/manifest.json) exists for the back-end tests below.
# Runs after composer install because the build resolves the `ziggy-js`
# tsconfig alias from vendor/tightenco/ziggy. The manifest is no longer
# committed to Git; it is generated here (and on deploy via Forge).
- name: Build front-end assets
run: npm run build
- name: Generate Laravel key
run: php artisan key:generate
- name: Configure FS permissions
Expand Down
13 changes: 7 additions & 6 deletions app/Models/Community.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Database\Eloquent\Relations\Pivot;
use Illuminate\Support\Collection;
use Parables\Cuid\GeneratesCuid;

Expand All @@ -31,11 +32,11 @@
* @property-read Collection<int, CommunityResourceCollection> $communityResourceCollections
* @property-read Collection<int, User> $users
* @property int $owner_id
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CommunityInvitation> $communityInvitations
* @property-read \Illuminate\Database\Eloquent\Collection<int, CommunityInvitation> $communityInvitations
* @property-read int|null $community_invitations_count
* @property-read int|null $community_resource_collections_count
* @property-read \App\Models\User $owner
* @property-read \App\Models\CommunityMember|null $communityMember
* @property-read User $owner
* @property-read CommunityMember|null $communityMember
* @property-read int|null $users_count
*
* @method static \Database\Factories\CommunityFactory factory($count = null, $state = [])
Expand Down Expand Up @@ -142,7 +143,7 @@ final public function allUsers(): Collection
/**
* Get all of the users that belong to the community.
*
* @return BelongsToMany<User, covariant $this>
* @return BelongsToMany<User, covariant $this, Pivot, 'communityMember'>
*/
final public function users(): BelongsToMany
{
Expand Down Expand Up @@ -194,11 +195,11 @@ final public function communityResourceCollections(): HasMany
/**
* Get the 10 most recent resources across all communityResourceCollections.
*
* @return \Illuminate\Support\Collection<int, \App\Models\CommunityResource>
* @return Collection<int, CommunityResource>
*/
final public function recentResources(): Collection
{
/** @var \Illuminate\Support\Collection<int, \App\Models\CommunityResource> */
/** @var Collection<int, CommunityResource> */
$resources = $this->communityResourceCollections()
->with(['communityResources', 'communityResources.resource', 'communityResources.curator', 'communityResources.collection'])
->get()
Expand Down
6 changes: 4 additions & 2 deletions app/Models/UserProfile.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\DatabaseNotification;
use Illuminate\Notifications\DatabaseNotificationCollection;
use Illuminate\Notifications\Notifiable;
use Laravel\Jetstream\HasProfilePhoto;
use Parables\Cuid\GeneratesCuid;
Expand Down Expand Up @@ -51,7 +53,7 @@
* @property string|null $social_link_gitlab
* @property Carbon $created_at
* @property Carbon $updated_at
* @property-read \Illuminate\Notifications\DatabaseNotificationCollection<int, \Illuminate\Notifications\DatabaseNotification> $notifications
* @property-read DatabaseNotificationCollection<int, DatabaseNotification> $notifications
* @property-read int|null $notifications_count
* @property-read string $profile_photo_url
*
Expand Down Expand Up @@ -111,7 +113,7 @@ class UserProfile extends Authenticatable implements MustVerifyEmail
use Notifiable;

/**
* @param list<string> $attributes
* @param array<string, mixed> $attributes
*/
public function __construct(array $attributes = [])
{
Expand Down
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
"php": "^8.2",
"ext-curl": "*",
"bepsvpt/secure-headers": "^9.1",
"cviebrock/eloquent-sluggable": "^11.0",
"cviebrock/eloquent-sluggable": "^12.0",
"fivefilters/readability.php": "^3.2",
"guzzlehttp/guzzle": "^7.9",
"inertiajs/inertia-laravel": "^1.0",
"laravel/framework": "^11.9",
"inertiajs/inertia-laravel": "^2.0",
"laravel/framework": "^12.0",
"laravel/jetstream": "^5.1",
"laravel/reverb": "^1.0",
"laravel/sanctum": "^4.0",
Expand All @@ -36,9 +36,9 @@
"laravel/pint": "^1.13",
"laravel/sail": "^1.31",
"mockery/mockery": "^1.6",
"nunomaduro/collision": "v8.4.0",
"pestphp/pest": "v3.0.6",
"pestphp/pest-plugin-laravel": "v3.0.0",
"nunomaduro/collision": "^8.6",
"pestphp/pest": "^3.8",
"pestphp/pest-plugin-laravel": "^3.0",
"roave/security-advisories": "dev-latest"
},
"autoload": {
Expand Down
Loading
Loading