Skip to content

Commit

Permalink
Merge pull request #76 from grueneschweiz/laravel-10
Browse files Browse the repository at this point in the history
Laravel 10
  • Loading branch information
sandrotanner authored Mar 19, 2024
2 parents 2d8da14 + fa26d42 commit fca77b8
Show file tree
Hide file tree
Showing 11 changed files with 1,359 additions and 1,347 deletions.
4 changes: 2 additions & 2 deletions .docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM php:8.1-apache
FROM php:8.2-apache

# update the repository sources list
# and install basic dependencies
Expand Down Expand Up @@ -44,4 +44,4 @@ WORKDIR $APP_HOME
RUN chown -R www-data:www-data $APP_HOME

# run as www-data
USER www-data:www-data
USER www-data:www-data
2 changes: 1 addition & 1 deletion .env.ci
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ APP_URL=http://localhost
ADMIN_EMAIL=asdf@asdf.asdf
CONFIG_BASE_PATH=config

LOG_CHANNEL=null
LOG_CHANNEL=single

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,28 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: pull docker containers
run: docker-compose pull mysql
run: docker compose pull mysql

- uses: satackey/action-docker-layer-caching@v0.0.11
continue-on-error: true

- name: build docker container
run: docker-compose build
run: docker compose build

- name: PHP dependencies
run: docker-compose run -u root:root app composer install
run: docker compose run -u root:root app composer install

- name: env
run: cp .env.ci .env

- name: laravel key
run: docker-compose run -u root:root app php artisan key:generate
run: docker compose run -u root:root app php artisan key:generate

- name: start containers
run: docker-compose up -d mysql
run: docker compose up -d mysql

- name: wait for mysql
run: |
Expand All @@ -42,13 +42,13 @@ jobs:
done
- name: run migrations
run: docker-compose run -u root:root app php artisan migrate
run: docker compose run -u root:root app php artisan migrate

- name: run tests
env:
MAILCHIMP_APIKEY: ${{ secrets.MAILCHIMP_APIKEY }}
run: >-
docker-compose
docker compose
run
-u root:root
-e MAILCHIMP_APIKEY=${MAILCHIMP_APIKEY}
Expand All @@ -61,14 +61,14 @@ jobs:
- name: Show logs if tests failed
if: ${{ failure() }}
run: cat storage/logs/laravel-*.log
run: cat storage/logs/laravel*.log

- name: publish coverage report
if: ${{ success() }}
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: >-
docker-compose
docker compose
run
-u root:root
-e GITHUB_REF=${GITHUB_REF}
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class Kernel extends HttpKernel
*
* @var array
*/
protected $routeMiddleware = [
protected $middlewareAliases = [
'auth' => \Illuminate\Auth\Middleware\Authenticate::class,
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class,
Expand Down
2 changes: 1 addition & 1 deletion app/Http/MailChimpClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public function getSubscriber(string $email)
{
$id = self::calculateSubscriberId($email);

$get = $this->client->get("lists/{$this->listId}/members/$id");
$get = $this->client->get("lists/{$this->listId}/members/$id", [], 30);
$this->validateResponseStatus('GET subscriber', $get);
$this->validateResponseContent('GET subscriber', $get);

Expand Down
2 changes: 0 additions & 2 deletions app/Providers/AuthServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ class AuthServiceProvider extends ServiceProvider
*/
public function boot()
{
$this->registerPolicies();

//
}
}
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
"ext-json": "*",
"drewm/mailchimp-api": "^2.5",
"guzzlehttp/guzzle": "^7.0.1",
"laravel/framework": "^9.0",
"laravel/framework": "^10.0",
"symfony/yaml": "^5.2"
},
"require-dev": {
"filp/whoops": "^2.5",
"mockery/mockery": "^1.2",
"nunomaduro/collision": "^6.1",
"phpunit/phpunit": "^9.0"
"nunomaduro/collision": "^7.0",
"phpunit/phpunit": "^10.0"
},
"autoload": {
"psr-4": {
Expand Down Expand Up @@ -57,6 +57,6 @@
"sort-packages": true,
"optimize-autoloader": true
},
"minimum-stability": "dev",
"minimum-stability": "stable",
"prefer-stable": true
}
Loading

0 comments on commit fca77b8

Please sign in to comment.