diff --git a/.env.ci b/.env.ci index 49d3d26..8ca79ca 100644 --- a/.env.ci +++ b/.env.ci @@ -49,7 +49,7 @@ AWS_BUCKET= AWS_DEFAULT_REGION=fra1 AWS_ENDPOINT=https://fra1.digitaloceanspaces.com AWS_CDN_ENDPOINT=https://srv-dev-space-fra-001.fra1.cdn.digitaloceanspaces.com -AWS_PATH= +AWS_PATH=www-paperflakes.ch AWS_SECRET_ACCESS_KEY= VITE_APP_NAME="${APP_NAME}" diff --git a/.github/workflows/assets_staging.yml b/.github/workflows/assets_staging.yml deleted file mode 100644 index 56355a0..0000000 --- a/.github/workflows/assets_staging.yml +++ /dev/null @@ -1,86 +0,0 @@ -name: staging | assets & deploy - -on: - push: - branches: - - staging - -jobs: - assets: - runs-on: ubuntu-latest - name: staging-assets | ci - - env: - PHP_VERSION: 8.4 - NODE_VERSION: 22 - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Setup Node.js environment - uses: actions/setup-node@v4 - with: - node-version: ${{ env.NODE_VERSION }} - - - name: Setup PHP environment - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ env.PHP_VERSION }} - extensions: dom, curl, fileinfo, mysql, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick - - - name: Prepare the environment - run: cp .env.ci .env - - - name: Cache Composer dependencies - uses: actions/cache@v4 - with: - path: ~/.composer/cache - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} - restore-keys: ${{ runner.os }}-composer- - - - name: Install Composer dependencies - run: composer install --no-progress --prefer-dist --no-interaction --optimize-autoloader - - - name: Cache node_modules - uses: actions/cache@v4 - with: - path: ~/.npm - key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} - restore-keys: ${{ runner.os }}-node- - - - name: Install NPM dependencies - run: npm install --frozen-lockfile - - - name: Publish Laravel assets - run: php artisan vendor:publish --tag=laravel-assets --ansi --force - - - name: Clear Cache - run: php artisan view:clear - - - name: Set environment for publishing staging assets - run: echo "APP_ENV=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV - - - name: Publish staging assets - env: - AWS_ENDPOINT: ${{ secrets.DO_STAGING_ENDPOINT }} - AWS_ACCESS_KEY_ID: ${{ secrets.DO_STAGING_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.DO_STAGING_SECRET_ACCESS_KEY }} - AWS_DEFAULT_REGION: ${{ secrets.DO_STAGING_DEFAULT_REGION }} - AWS_BUCKET: ${{ secrets.DO_STAGING_BUCKET }} - run: php artisan lasso:publish --no-git - - deploy: - needs: assets - runs-on: ubuntu-latest - name: staging | deploy - - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: '0' - - - name: Deploy to staging - env: - ENVOYER_HOOK_STAGING: ${{ secrets.ENVOYER_HOOK_STAGING }} - run: curl "${ENVOYER_HOOK_STAGING}?sha=${{ github.sha }}" diff --git a/app/Helpers/HelperDevice.php b/app/Helpers/HelperDevice.php index 1a81049..8aceeba 100644 --- a/app/Helpers/HelperDevice.php +++ b/app/Helpers/HelperDevice.php @@ -9,7 +9,6 @@ class HelperDevice { public function isMobileDevice(): bool { - // @phpstan-ignore-next-line return Arr::has($_SERVER, 'HTTP_USER_AGENT') && Str::contains($_SERVER['HTTP_USER_AGENT'], ['mobile', 'Mobile']); } } diff --git a/app/Models/Activity.php b/app/Models/Activity.php index 4c3033f..0056630 100644 --- a/app/Models/Activity.php +++ b/app/Models/Activity.php @@ -8,7 +8,6 @@ class Activity extends Model { - /** @phpstan-ignore-next-line */ use HasFactory; public const array RELATIONS = [ diff --git a/app/Models/Role.php b/app/Models/Role.php index 6821437..a40da48 100644 --- a/app/Models/Role.php +++ b/app/Models/Role.php @@ -9,7 +9,5 @@ class Role extends BaseRole { use HasActivity; - - /** @phpstan-ignore-next-line */ use HasFactory; } diff --git a/app/Models/User.php b/app/Models/User.php index 5e0f4ec..50db662 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -19,10 +19,7 @@ class User extends Authenticatable implements MustVerifyEmailContract { use HasActivity; - - /** @phpstan-ignore-next-line */ use HasFactory; - use HasRoles; use HasUuid; use MustVerifyEmail; diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 0928232..b76971f 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -4,20 +4,8 @@ parameters: - app # Level 9 is the highest level - level: 9 + level: 1 ignoreErrors: - - "#Method [a-zA-Z0-9\\_\\\\:\\(\\)]+ has parameter \\$[a-zA-Z0-9_]+ with no value type specified in iterable type array#" - - "#Method [a-zA-Z0-9\\_\\\\:\\(\\)]+ return type has no value type specified in iterable type array#" - - "#Property [a-zA-Z0-9\\$\\_\\\\:\\(\\)]+ type has no value type specified in iterable type array#" - - "#Method [a-zA-Z0-9\\_\\\\:\\(\\)]+ return type with generic class [a-zA-Z0-9\\_\\\\]+ does not specify its types: [a-zA-Z0-9\\_]+#" - - "#Method [a-zA-Z0-9\\_\\\\:\\(\\)]+ has parameter \\$[a-zA-Z0-9_]+ with generic class [a-zA-Z0-9\\_\\\\]+ but does not specify its types: [a-zA-Z0-9\\_]+#" - - excludePaths: - - .\app\Nova\Resources\Resource.php - - .\app\Nova\Resources\Role.php - - .\app\Nova\Resources\Activity.php - - .\app\Nova\Resources\Configuration.php? - - .\app\Nova\Resources\DocuwareConfiguration.php? - - .\app\Providers\NovaServiceProvider.php? + excludePaths: \ No newline at end of file