Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
ec85d60
readd zip on prod
Dec 6, 2024
5d684d9
IDP-256 improve validation
vpasquino Feb 7, 2025
312704f
Merge pull request #237 from ZanichelliEditore/IDP-256
vpasquino Feb 11, 2025
2e134e6
fix validation
vpasquino Feb 21, 2025
36a074a
Merge pull request #238 from ZanichelliEditore/IDP-256
vpasquino Feb 24, 2025
6b5c152
wip upgrade to laravel 10
AliGamb Mar 7, 2025
bff846f
SND-24 update phpunit config and feature tests
AliGamb Mar 7, 2025
53d6866
SND-24 fix swagger unit test
AliGamb Mar 7, 2025
e3552fb
SND-24 update gitignore
AliGamb Mar 7, 2025
694ecd3
SND-24 upgrade to laravel 11
AliGamb Mar 11, 2025
5028ca3
SND-24 add : at the end of cache key
AliGamb Mar 11, 2025
cea0245
SND-24 publish telescope migration
AliGamb Mar 19, 2025
59add6e
SND-24 upgrade to laravel 12
AliGamb Mar 21, 2025
454d1ae
SND-24 update idp-extension version
AliGamb Mar 21, 2025
df95c2d
SND-24 update php and nginx versions
AliGamb Mar 21, 2025
c778c6f
SND-24 remove critical vulnerabilities
AliGamb Mar 21, 2025
a03ecfd
SND-24 update nginx and php versions in production dockerfiles
AliGamb Mar 21, 2025
4bb7069
SND-24 update node image to node:23-alpine
AliGamb Mar 21, 2025
4083a22
SND-24 move composer
valentinavirga Mar 24, 2025
b89f45f
SND-24 move composer
valentinavirga Mar 24, 2025
8dd7b6d
SND-24 update node for prod
valentinavirga Mar 24, 2025
8072e0f
SND-24 fix nullable params position
AliGamb Mar 25, 2025
750da95
Merge branch 'SND-24' of github.com:ZanichelliEditore/sendy into SND-24
AliGamb Mar 25, 2025
dd7ad8c
SND-24 update readme with telescope install instructions
AliGamb Mar 25, 2025
e8a6602
SND-24 fix param
AliGamb Mar 25, 2025
ff25d5d
SND-24 update idp-extension version
AliGamb Mar 25, 2025
fb906a5
SND-24: fix some warning and remove unused import
Mar 25, 2025
a8847b1
SND-24: fix tests
valentinavirga Mar 26, 2025
5a46cf9
SND-24 update idp-extension version
AliGamb Apr 4, 2025
c238540
Merge pull request #239 from ZanichelliEditore/SND-24
AliGamb Apr 4, 2025
50a9cad
SND-24 fox readme
AliGamb Apr 4, 2025
ba23115
Merge pull request #240 from ZanichelliEditore/SND-24
mikelina Apr 4, 2025
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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ public/css/app.css
supervisord.log
supervisord.pid
**/.terraform/**/
*.tfstate
*.tfstate
.phpunit.cache
2 changes: 1 addition & 1 deletion app-dev.dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM php:8.1-fpm
FROM php:8.4-fpm

ARG USER
ARG UID
Expand Down
4 changes: 2 additions & 2 deletions app-prod.dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM php:8.1-fpm
FROM php:8.4-fpm

RUN apt-get update && apt-get install -y procps libmcrypt-dev openssl libfreetype6-dev mariadb-client libjpeg62-turbo-dev libgd-dev libpng-dev apt-utils libcurl4-openssl-dev pkg-config libssl-dev vim \
RUN apt-get update && apt-get install -y procps libmcrypt-dev openssl libfreetype6-dev zip unzip git mariadb-client libjpeg62-turbo-dev libgd-dev libpng-dev apt-utils libcurl4-openssl-dev pkg-config libssl-dev vim \
&& docker-php-ext-configure gd --with-freetype=/usr/include/ --with-jpeg=/usr/include/ \
&& docker-php-ext-install gd \
&& docker-php-ext-install pdo_mysql opcache
Expand Down
1 change: 0 additions & 1 deletion app/Console/Commands/ClearAccessToken.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace App\Console\Commands;

use Carbon\Carbon;
use Illuminate\Console\Command;
use App\Http\Repositories\OAuthAccessTokenRepository;

Expand Down
2 changes: 1 addition & 1 deletion app/Exceptions/Handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function render($request, Throwable $exception)
protected function unauthenticated($request, AuthenticationException $exception)
{
return !$request->expectsJson() && !collect($request->route()->middleware())->contains('api')
? redirect()->guest($exception->redirectTo() ?? redirect('/'))
? redirect()->guest($exception->redirectTo($request) ?? redirect('/'))
: response()->json(['message' => $exception->getMessage()], 401);
}
}
2 changes: 1 addition & 1 deletion app/Http/Controllers/EmailController.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public function send(EmailRequest $request)
}


$email = new Email($from, $sender, $to, $cc, $bcc, $replyTo, $subject, $body, $attachmentsDirectory);
$email = new Email($from, $to, $cc, $bcc, $sender, $replyTo, $subject, $body, $attachmentsDirectory);

$mailable = new CustomEmail($email);

Expand Down
2 changes: 0 additions & 2 deletions app/Http/Controllers/FailedJobController.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

use Exception;
use Illuminate\Http\Request;
use Illuminate\Validation\Rule;
use Illuminate\Support\Facades\Schema;
use Illuminate\Support\Facades\Artisan;
use App\Http\Resources\FailedJobResource;
use Illuminate\Support\Facades\Validator;
Expand Down
2 changes: 0 additions & 2 deletions app/Http/Controllers/LoginController.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
namespace App\Http\Controllers;

use Illuminate\Support\Facades\Auth;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;

class LoginController extends Controller
{
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class Kernel extends HttpKernel
*
* @var array
*/
protected $routeMiddleware = [
protected $middlewareAliases = [
'auth' => \App\Http\Middleware\Authenticate::class,
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class,
Expand Down
25 changes: 10 additions & 15 deletions app/Http/Repositories/FailedJobRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ class FailedJobRepository
/**
* Find all the failed jobs
*
* @param String $orderBy
* @param String $order
* @param string $orderBy
* @param string $order
* @return \Illuminate\Database\Eloquent\Collection
*
*/
Expand All @@ -22,14 +22,13 @@ public function all($orderBy = "id", $order = "ASC")
/**
* Find all the failed jobs paginated
*
* @param String $query
* @param String $orderBy
* @param String $order
* @param string $query
* @param string $orderBy
* @param string $order
* @param int $limit
* @return App\Models\FailedJob
*
*/
public function allPaginated($query, $orderBy, $order, $limit)
public function allPaginated($query, $orderBy, $order, $limit): \Illuminate\Pagination\LengthAwarePaginator
{
if (!$query) {
return FailedJob::orderBy($orderBy, $order)
Expand All @@ -45,7 +44,7 @@ public function allPaginated($query, $orderBy, $order, $limit)
* Find a failed job by id
*
* @param int $id
* @return App\Models\FailedJob
* @return \App\Models\FailedJob
*
*/
public function find($id)
Expand All @@ -56,22 +55,18 @@ public function find($id)
/**
* Delete a failed job from the database
*
* @param App\Models\FailedJob $failedJob
* @return Response
* @param \App\Models\FailedJob $failedJob
*
*/
public function delete($failedJob)
public function delete($failedJob): bool|null
{
return $failedJob->delete();
}

/**
* Count all failed job from the database
*
* @return int
*
*/
public function count()
public function count(): int
{
return FailedJob::count();
}
Expand Down
9 changes: 3 additions & 6 deletions app/Http/Repositories/OAuthAccessTokenRepository.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace App\Http\Repositories;

use App\Models\OAuthAccessToken;
Expand All @@ -7,13 +8,9 @@ class OAuthAccessTokenRepository
{
/**
* Delete a access tokens from the database
*
* @param DateTime $dateTime
* @return Response
*
*/
public function deleteOlder($dateTime)
{
public function deleteOlder(string $dateTime): bool|null
{
return OAuthAccessToken::where('created_at', '<', $dateTime)->delete();
}
}
2 changes: 1 addition & 1 deletion app/Http/Requests/EmailRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public function authorize()
*/
public function rules()
{
$formatEmail = 'regex:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/';
$formatEmail = 'regex:/^((?!-)([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/';
return [
'to' => 'required|array|min:1',
'to.*' => ['required', 'email', $formatEmail, 'max:320'],
Expand Down
1 change: 0 additions & 1 deletion app/Jobs/EmailSender.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

use App\Mail\BaseEmail;
use Illuminate\Bus\Queueable;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Mail;
use Illuminate\Queue\SerializesModels;
use Illuminate\Support\Facades\Storage;
Expand Down
10 changes: 5 additions & 5 deletions app/Models/Email.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ class Email

public function __construct(
string $from,
string $sender = null,
array $to,
array $cc = [],
array $bcc = [],
string $replyTo = null,
string $subject = null,
string $body = null,
string $attachmentsDirectory = null
?string $sender = null,
?string $replyTo = null,
?string $subject = null,
?string $body = null,
?string $attachmentsDirectory = null
) {
$this->from = $from;
$this->sender = $sender;
Expand Down
2 changes: 0 additions & 2 deletions app/Providers/AuthServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ class AuthServiceProvider extends ServiceProvider
*/
public function boot()
{
$this->registerPolicies();

Gate::define('canUseAdmin', function ($user, $permission) {
return in_array($permission, $user->permissions);
});
Expand Down
132 changes: 65 additions & 67 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,69 +1,67 @@
{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": [
"framework",
"laravel"
],
"license": "MIT",
"require": {
"php": "^8.0.2",
"darkaonline/l5-swagger": "8.*",
"doctrine/dbal": "^3.3",
"fideloper/proxy": "^4.0",
"guzzlehttp/guzzle": "^7.0.1",
"laravel/framework": "^9.0",
"laravel/helpers": "^1.4",
"laravel/passport": "^11.2.1",
"laravel/telescope": "^4.0",
"lcobucci/jwt": "^4.2.1",
"predis/predis": "^2.0",
"zanichelli/idp-extensions": "^3.1",
"zircote/swagger-php": "4.*"
},
"require-dev": {
"beyondcode/laravel-dump-server": "^1.0",
"filp/whoops": "^2.0",
"fzaninotto/faker": "^1.4",
"mockery/mockery": "^1.0",
"nunomaduro/collision": "^6.1",
"phpunit/phpunit": "^9.5"
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
},
"extra": {
"laravel": {
"dont-discover": []
}
},
"autoload": {
"psr-4": {
"App\\": "app/",
"Database\\Factories\\": "database/factories/",
"Database\\Seeders\\": "database/seeders/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"minimum-stability": "dev",
"prefer-stable": true,
"scripts": {
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"@php artisan package:discover --ansi"
],
"post-root-package-install": [
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"@php artisan key:generate --ansi"
]
}
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": [
"framework",
"laravel"
],
"license": "MIT",
"require": {
"php": "^8.2.0",
"darkaonline/l5-swagger": "^9.0",
"guzzlehttp/guzzle": "^7.9.2",
"laravel/framework": "^12.0",
"laravel/helpers": "^1.7",
"laravel/passport": "^12.0",
"laravel/telescope": "^5.5",
"lcobucci/jwt": "^4.2.1",
"predis/predis": "^2.0",
"zanichelli/idp-extensions": "^3.7",
"zircote/swagger-php": "^5.0"
},
"require-dev": {
"beyondcode/laravel-dump-server": "^2.0",
"filp/whoops": "^2.0",
"mockery/mockery": "^1.0",
"nunomaduro/collision": "^8.1",
"phpunit/phpunit": "^11.0",
"fakerphp/faker": "^1.23"
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
},
"extra": {
"laravel": {
"dont-discover": []
}
},
"autoload": {
"psr-4": {
"App\\": "app/",
"Database\\Factories\\": "database/factories/",
"Database\\Seeders\\": "database/seeders/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"minimum-stability": "stable",
"prefer-stable": true,
"scripts": {
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"@php artisan package:discover --ansi"
],
"post-root-package-install": [
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"@php artisan key:generate --ansi"
]
}
}
Loading
Loading