diff --git a/.cs.php b/.cs.php index 8e594c6..5723baf 100644 --- a/.cs.php +++ b/.cs.php @@ -5,7 +5,7 @@ /** * The PHP-CS-Fixer configuration. * - * Documentation: https://github.com/samuelgfeller/slim-example-project/wiki/Coding-Standards-Fixer + * Documentation: https://samuel-gfeller.ch/docs/Coding-Standards-Fixer */ return (new Config()) // Disable the use of cache diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ad9b1bc..9fc7a7c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,5 +1,5 @@ -# Documentation: https://github.com/samuelgfeller/slim-example-project/wiki/GitHub-Actions#build-testing -# How to deploy: https://github.com/samuelgfeller/slim-example-project/wiki/GitHub-Actions#deploying-to-server +# Documentation: https://samuel-gfeller.ch/docs/GitHub-Actions#build-testing +# How to deploy: https://samuel-gfeller.ch/docs/GitHub-Actions#deploying-to-server name: 🧪 Build test on: push: diff --git a/README.md b/README.md index 09295bc..f740aac 100644 --- a/README.md +++ b/README.md @@ -9,18 +9,17 @@ [![Code Coverage](https://scrutinizer-ci.com/g/samuelgfeller/slim-starter/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/samuelgfeller/slim-starter/?branch=master) [![Build Status](https://scrutinizer-ci.com/g/samuelgfeller/slim-starter/badges/build.png?b=master)](https://scrutinizer-ci.com/g/samuelgfeller/slim-starter/build-status/master) [![Quality Score](https://img.shields.io/scrutinizer/quality/g/samuelgfeller/slim-starter.svg)](https://scrutinizer-ci.com/g/samuelgfeller/slim-starter/?branch=master) -[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg)](LICENSE) +[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg)](https://github.com/samuelgfeller/slim-starter/blob/master/LICENSE) -[Slim 4](https://www.slimframework.com/) full stack starter template to -quickly get started with a scalable PHP web application following 2024 best practices and -[SOLID](https://en.wikipedia.org/wiki/SOLID) principles. +[Slim 4](https://www.slimframework.com/) full stack starter template following 2024 best practices and +[SOLID](https://en.wikipedia.org/wiki/SOLID) principles to quickly get started with a scalable PHP web application. -An extensive [**documentation**](https://github.com/samuelgfeller/slim-example-project/wiki) explains -the [architecture](https://github.com/samuelgfeller/slim-example-project/wiki/Architecture), components, +An extensive [**documentation**](https://samuel-gfeller/docs) explains +the [architecture](https://samuel-gfeller.ch/docs/Architecture), components, design choices (i.e. -[SRP](https://github.com/samuelgfeller/slim-example-project/wiki/Single-Responsibility-Principle-(SRP))) +[SRP](https://samuel-gfeller.ch/docs/Single-Responsibility-Principle-(SRP))) and features. -[Libraries](https://github.com/samuelgfeller/slim-example-project/wiki/Libraries-and-Framework) +[Libraries](https://samuel-gfeller.ch/docs/Libraries-and-Framework) are kept to a minimum and to allow for most flexibility and long-term viability. @@ -33,7 +32,7 @@ Odan's [slim4-skeleton](https://github.com/odan/slim4-skeleton) but with a lot of additional opinionated features and examples such as: -* Pages rendered by a [template renderer](https://github.com/samuelgfeller/slim-example-project/wiki/Template-rendering) +* Pages rendered by a [template renderer](https://samuel-gfeller.ch/docs/Template-Rendering) with layout and versioned assets * The loading of elements from the database (users) via Ajax * The creation, modification, and deletion of users with validation @@ -48,22 +47,22 @@ a lot more features and examples. ### Technologies * [Slim 4 micro-framework](https://github.com/slimphp/Slim) -* [Dependency Injection](https://github.com/samuelgfeller/slim-example-project/wiki/Dependency-Injection) - [PHP-DI](https://php-di.org/) -* [Template rendering](https://github.com/samuelgfeller/slim-example-project/wiki/Template-rendering) - [PHP-View](https://github.com/slimphp/PHP-View) +* [Dependency Injection](https://samuel-gfeller.ch/docs/Dependency-Injection) - [PHP-DI](https://php-di.org/) +* [Template rendering](https://samuel-gfeller.ch/docs/Template-Rendering) - [PHP-View](https://github.com/slimphp/PHP-View) (can be replaced by [Twig](https://twig.symfony.com/)) -* [Logging](https://github.com/samuelgfeller/slim-example-project/wiki/Logging) - [Monolog](https://github.com/Seldaek/monolog) -* [Database migrations](https://github.com/samuelgfeller/slim-example-project/wiki/Database-Migrations) - [Phinx](https://phinx.org/) -* [Validation](https://github.com/samuelgfeller/slim-example-project/wiki/Validation) - [cakephp/validation](https://book.cakephp.org/4/en/core-libraries/validation.html) -* [Query Builder](https://github.com/samuelgfeller/slim-example-project/wiki/Repository-and-Query-Builder) - [cakephp/database](https://book.cakephp.org/5/en/orm/query-builder.html) -* [Integration testing](https://github.com/samuelgfeller/slim-example-project/wiki/Writing-Tests) - [PHPUnit](https://github.com/sebastianbergmann/phpunit/) -* [Error handling](https://github.com/samuelgfeller/slim-example-project/wiki/Error-Handling) - [slim-error-renderer](https://github.com/samuelgfeller/slim-error-renderer) -* [GitHub Actions](https://github.com/samuelgfeller/slim-example-project/wiki/GitHub-Actions) and [Scrutinizer](https://github.com/samuelgfeller/slim-example-project/wiki/How-to-set-up-Scrutinizer) -* [Coding standards fixer](https://github.com/samuelgfeller/slim-example-project/wiki/Coding-Standards-Fixer) - [PHP-CS-Fixer](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer) -* [Static code analysis](https://github.com/samuelgfeller/slim-example-project/wiki/PHPStan-Static-Code-Analysis) - [PHPStan](https://github.com/phpstan/phpstan) +* [Logging](https://samuel-gfeller.ch/docs/Logging) - [Monolog](https://github.com/Seldaek/monolog) +* [Database migrations](https://samuel-gfeller.ch/docs/Database-Migrations) - [Phinx](https://phinx.org/) +* [Validation](https://samuel-gfeller.ch/docs/Validation) - [cakephp/validation](https://book.cakephp.org/4/en/core-libraries/validation.html) +* [Query Builder](https://samuel-gfeller.ch/docs/Repository-and-Query-Builder) - [cakephp/database](https://book.cakephp.org/5/en/orm/query-builder.html) +* [Integration testing](https://samuel-gfeller.ch/docs/Writing-Tests) - [PHPUnit](https://github.com/sebastianbergmann/phpunit/) +* [Error handling](https://samuel-gfeller.ch/docs/Error-Handling) - [slim-error-renderer](https://github.com/samuelgfeller/slim-error-renderer) +* [GitHub Actions](https://samuel-gfeller.ch/docs/GitHub-Actions) and [Scrutinizer](https://samuel-gfeller.ch/docs/How-to-set-up-Scrutinizer) +* [Coding standards fixer](https://samuel-gfeller.ch/docs/Coding-Standards-Fixer) - [PHP-CS-Fixer](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer) +* [Static code analysis](https://samuel-gfeller.ch/docs/PHPStan-Static-Code-Analysis) - [PHPStan](https://github.com/phpstan/phpstan) ## Requirements * PHP 8.2+ -* [Composer](https://github.com/samuelgfeller/slim-example-project/wiki/Composer) +* [Composer](https://samuel-gfeller.ch/docs/Composer) * MariaDB or MySQL database ## Installation @@ -93,7 +92,7 @@ accidentally truncating the development database while testing. $settings['db']['database'] = 'my_dev_database_name_test'; ``` -The [Configuration](https://github.com/samuelgfeller/slim-example-project/wiki/Configuration) +The [Configuration](https://samuel-gfeller.ch/docs/Configuration) documentation details the different configuration files and how they are used and loaded. #### 3. Run migrations @@ -120,7 +119,7 @@ your test database as specified in `config/env/env.test.php`. If you don't plan on using Scrutinizer, remove the `.scrutinizer` file at the root of the project, otherwise you can follow this -[guide](https://github.com/samuelgfeller/slim-example-project/wiki/How-to-set-up-Scrutinizer) +[guide](https://samuel-gfeller.ch/docs/How-to-set-up-Scrutinizer) on how to set it up. #### Done! @@ -132,7 +131,7 @@ directory. ## Support -Please read the [Support❤️](https://github.com/samuelgfeller/slim-example-project/wiki/Support❤️) page +Please read the [Support❤️](https://samuel-gfeller.ch/docs/Support❤️) page if you value this project and its documentation and want to support it. ## License diff --git a/bin/console.php b/bin/console.php index 2b85934..1f3744a 100644 --- a/bin/console.php +++ b/bin/console.php @@ -3,7 +3,7 @@ * Execute a class function instantiated by the container with the command line. * The first argument is the container key and the second the function name that should be called. * Example: php bin/console.php SqlSchemaGenerator generateSqlSchema - * Documentation: https://github.com/samuelgfeller/slim-example-project/wiki/Console-Commands + * Documentation: https://samuel-gfeller.ch/docs/Console-Commands */ // Boot the application diff --git a/config/bootstrap.php b/config/bootstrap.php index d7341fc..b544b4f 100644 --- a/config/bootstrap.php +++ b/config/bootstrap.php @@ -2,7 +2,7 @@ /** * Start up the Slim App. * - * Documentation: https://github.com/samuelgfeller/slim-example-project/wiki/Web-Server-Config-and-Bootstrapping + * Documentation: https://samuel-gfeller.ch/docs/Web-Server-config-and-Slim-Bootstrapping#slim-bootstrapping */ use DI\ContainerBuilder; diff --git a/config/container.php b/config/container.php index ea907f0..14433c8 100644 --- a/config/container.php +++ b/config/container.php @@ -2,7 +2,7 @@ /** * Dependency Injection container configuration. * - * Documentation: https://github.com/samuelgfeller/slim-example-project/wiki/Dependency-Injection. + * Documentation: https://samuel-gfeller.ch/docs/Dependency-Injection. */ use App\Infrastructure\Utility\Settings; @@ -58,7 +58,7 @@ return new BasePathMiddleware($container->get(App::class)); }, - // Logging: https://github.com/samuelgfeller/slim-example-project/wiki/Logging + // Logging: https://samuel-gfeller.ch/docs/Logging LoggerInterface::class => function (ContainerInterface $container) { $loggerSettings = $container->get('settings')['logger']; @@ -80,7 +80,7 @@ return $logger->pushHandler($rotatingFileHandler); }, - // Error handling: https://github.com/samuelgfeller/slim-example-project/wiki/Error-Handling + // Error handling: https://samuel-gfeller.ch/docs/Error-Handling ExceptionHandlingMiddleware::class => function (ContainerInterface $container) { $settings = $container->get('settings'); @@ -119,7 +119,7 @@ return $method->invoke($driver); }, // Used by command line to generate `schema.sql` for integration testing - // Documentation: https://github.com/samuelgfeller/slim-example-project/wiki/Test-setup#generating-the-schema-file + // Documentation: https://samuel-gfeller.ch/docs/Test-Setup#generating-the-schema-file 'SqlSchemaGenerator' => function (ContainerInterface $container) { return new TestTraits\Console\SqlSchemaGenerator( $container->get(PDO::class), @@ -129,12 +129,12 @@ }, // Settings object that classes can inject to get access to the local configuration - // Documentation: https://github.com/samuelgfeller/slim-example-project/wiki/Configuration#using-the-settings-class + // Documentation: https://samuel-gfeller.ch/docs/Configuration#using-the-settings-class Settings::class => function (ContainerInterface $container) { return new Settings($container->get('settings')); }, - // Template renderer: https://github.com/samuelgfeller/slim-example-project/wiki/Template-rendering + // Template renderer: https://samuel-gfeller.ch/docs/Template-Rendering PhpRenderer::class => function (ContainerInterface $container) { $settings = $container->get('settings'); $rendererSettings = $settings['renderer']; diff --git a/config/defaults.php b/config/defaults.php index a23e5ba..57fe580 100644 --- a/config/defaults.php +++ b/config/defaults.php @@ -8,7 +8,7 @@ * without the risk of overwriting something. * The only file where the following is permitted: $settings['db'] = ['key' => 'val', 'nextKey' => 'nextVal']; * - * Documentation: https://github.com/samuelgfeller/slim-example-project/wiki/Configuration. + * Documentation: https://samuel-gfeller.ch/docs/Configuration. */ // Set default locale setlocale(LC_ALL, 'en_US.utf8', 'en_US'); @@ -25,7 +25,7 @@ 'version' => '0.0.0', // When true, JsImportCacheBuster is enabled and goes through all js files and changes the version number // from the imports. Should be disabled in env.prod.php. - // https://github.com/samuelgfeller/slim-example-project/wiki/Template-rendering#js-import-cache-busting + // https://samuel-gfeller.ch/docs/Template-Rendering#js-import-cache-busting 'update_js_imports_version' => false, // Asset path required by the JsImportCacheBuster 'asset_path' => $settings['root_dir'] . '/public/assets', @@ -46,7 +46,7 @@ // Secret values are overwritten in env.php // Query Builder: https://book.cakephp.org/5/en/orm/query-builder.html -// Documentation: https://github.com/samuelgfeller/slim-example-project/wiki/Repository-and-Query-Builder +// Documentation: https://samuel-gfeller.ch/docs/Repository-and-Query-Builder $settings['db'] = [ 'host' => '127.0.0.1', 'database' => 'slim_starter', @@ -74,14 +74,14 @@ ], ]; -// API documentation: https://github.com/samuelgfeller/slim-example-project/wiki/API-Endpoint +// API documentation: https://samuel-gfeller.ch/docs/API-Endpoint $settings['api'] = [ // Url that is allowed to make api calls to this app 'allowed_origin' => null, ]; // Phinx database migration settings -// Documentation: https://github.com/samuelgfeller/slim-example-project/wiki/Database-Migrations +// Documentation: https://samuel-gfeller.ch/docs/Database-Migrations // Libraries: https://github.com/odan/phinx-migrations-generator, https://book.cakephp.org/phinx/0/en/index.html $settings['phinx'] = [ 'paths' => [ @@ -102,13 +102,13 @@ ]; // Template renderer settings -// Documentation: https://github.com/samuelgfeller/slim-example-project/wiki/Template-rendering +// Documentation: https://samuel-gfeller.ch/docs/Template-Rendering $settings['renderer'] = [ // Template path 'path' => $settings['root_dir'] . '/templates', ]; -// Logger: https://github.com/samuelgfeller/slim-example-project/wiki/Logging +// Logger: https://samuel-gfeller.ch/docs/Logging $settings['logger'] = [ // Log file location 'path' => $settings['root_dir'] . '/logs', diff --git a/config/env/env.example.php b/config/env/env.example.php index 88089da..3cddbb7 100644 --- a/config/env/env.example.php +++ b/config/env/env.example.php @@ -1,7 +1,7 @@ addBodyParsingMiddleware(); diff --git a/config/settings.php b/config/settings.php index 32985a1..d5397be 100644 --- a/config/settings.php +++ b/config/settings.php @@ -1,7 +1,7 @@ { - // }).catch(errorMsg => { - // displayFlashMessage('error', 'Failed to change the theme in the database.') - // }); } - +function getCurrentTheme() { + // Check if the user has set a theme in the local storage + if (localStorage.getItem("theme") !== null) { + return localStorage.getItem("theme"); + } + // Check if the user has set a global system preference for dark mode + if (window.matchMedia("(prefers-color-scheme: dark)").matches) { + // Set the theme to dark mode in localstorage for faster loading in layout + localStorage.setItem("theme", "dark"); + return "dark"; + } + // Default to light mode + return "light"; +} \ No newline at end of file diff --git a/public/assets/user/read/user-read-update-main.js b/public/assets/user/read/user-read-update-main.js index 5a48e4a..9a82725 100644 --- a/public/assets/user/read/user-read-update-main.js +++ b/public/assets/user/read/user-read-update-main.js @@ -5,7 +5,7 @@ import {createAlertModal} from "../../general/page-component/modal/alert-modal.j const userId = document.getElementById('user-id').value; -// Documentation: https://github.com/samuelgfeller/slim-example-project/wiki/JavaScript-Frontend#contenteditable-fields +// Documentation: https://samuel-gfeller.ch/docs/JavaScript-Frontend#contenteditable-fields // Null safe operator as edit icon doesn't exist if not privileged document.querySelector('#edit-first-name-btn')?.addEventListener('click', makeUserFieldEditable); document.querySelector('h1[data-name="first_name"]')?.addEventListener('dblclick', makeUserFieldEditable); diff --git a/public/index.php b/public/index.php index 3cf0f10..467ee0a 100644 --- a/public/index.php +++ b/public/index.php @@ -2,7 +2,7 @@ /** * Bootstrap the application * - * Documentation: https://github.com/samuelgfeller/slim-example-project/wiki/Web-Server-Config-and-Bootstrapping + * Documentation: https://samuel-gfeller.ch/docs/Web-Server-config-and-Slim-Bootstrapping#slim-bootstrapping */ $app = require __DIR__ . '/../config/bootstrap.php'; diff --git a/resources/schema/schema.sql b/resources/schema/schema.sql index b7b98c1..9b1313e 100644 --- a/resources/schema/schema.sql +++ b/resources/schema/schema.sql @@ -16,4 +16,4 @@ CREATE TABLE `user` ( `created_at` datetime DEFAULT current_timestamp(), `deleted_at` datetime DEFAULT NULL, PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; \ No newline at end of file +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; \ No newline at end of file diff --git a/resources/seeds/UserSeeder.php b/resources/seeds/UserSeeder.php index ba5d905..b38be31 100644 --- a/resources/seeds/UserSeeder.php +++ b/resources/seeds/UserSeeder.php @@ -3,7 +3,7 @@ use Phinx\Seed\AbstractSeed; /** - * Documentation: https://github.com/samuelgfeller/slim-example-project/wiki/Database-Migrations#seeding + * Documentation: https://samuel-gfeller.ch/docs/Database-Migrations#seeding */ class UserSeeder extends AbstractSeed { diff --git a/resources/translations/doc.md b/resources/translations/doc.md index 82ea193..327b0f5 100644 --- a/resources/translations/doc.md +++ b/resources/translations/doc.md @@ -1 +1 @@ -[Set up localization](https://github.com/samuelgfeller/slim-example-project/wiki/Translations) \ No newline at end of file +[Set up localization](https://samuel-gfeller.ch/docs/Translations) \ No newline at end of file diff --git a/src/Application/Middleware/CorsMiddleware.php b/src/Application/Middleware/CorsMiddleware.php index ae0f5b2..b844929 100644 --- a/src/Application/Middleware/CorsMiddleware.php +++ b/src/Application/Middleware/CorsMiddleware.php @@ -11,7 +11,7 @@ /** * Adds Access-Control headers to the response. - * Documentation: https://github.com/samuelgfeller/slim-example-project/wiki/API-Endpoint. + * Documentation: https://samuel-gfeller.ch/docs/API-Endpoint. */ final class CorsMiddleware implements MiddlewareInterface { @@ -34,7 +34,7 @@ public function process(ServerRequestInterface $request, RequestHandlerInterface $response = $handler->handle($request); } // Add response headers in post-processing before the response is sent - // https://github.com/samuelgfeller/slim-example-project/wiki/Middleware#order-of-execution + // https://samuel-gfeller.ch/docs/Slim-Middleware#order-of-execution $response = $response ->withHeader('Access-Control-Allow-Credentials', 'true') ->withHeader('Access-Control-Allow-Origin', $this->allowedOrigin ?? '') diff --git a/src/Application/Middleware/PhpViewMiddleware.php b/src/Application/Middleware/PhpViewMiddleware.php index 62afd41..dcaea51 100644 --- a/src/Application/Middleware/PhpViewMiddleware.php +++ b/src/Application/Middleware/PhpViewMiddleware.php @@ -15,7 +15,7 @@ /** * Adds attributes to the PhpRenderer and updates js imports with version number. - * Documentation: https://github.com/samuelgfeller/slim-example-project/wiki/Template-rendering. + * Documentation: https://samuel-gfeller.ch/docs/Template-Rendering. */ final class PhpViewMiddleware implements MiddlewareInterface { @@ -49,7 +49,7 @@ public function process(ServerRequestInterface $request, RequestHandlerInterface ]); // Add version number to js imports in development mode - // https://github.com/samuelgfeller/slim-example-project/wiki/Template-rendering#js-import-cache-busting + // https://samuel-gfeller.ch/docs/Template-Rendering#js-import-cache-busting if ($this->deploymentSettings['update_js_imports_version'] === true) { $this->jsImportCacheBuster->addVersionToJsImports(); } diff --git a/src/Application/Middleware/ValidationExceptionMiddleware.php b/src/Application/Middleware/ValidationExceptionMiddleware.php index 645bbb9..a6f14f0 100644 --- a/src/Application/Middleware/ValidationExceptionMiddleware.php +++ b/src/Application/Middleware/ValidationExceptionMiddleware.php @@ -12,7 +12,7 @@ /** * Middleware for handling validation exceptions. - * Documentation: https://github.com/samuelgfeller/slim-example-project/wiki/Validation. + * Documentation: https://samuel-gfeller.ch/docs/Validation. */ final readonly class ValidationExceptionMiddleware implements MiddlewareInterface { diff --git a/src/Application/Responder/TemplateRenderer.php b/src/Application/Responder/TemplateRenderer.php index a4faab9..6e33dc9 100644 --- a/src/Application/Responder/TemplateRenderer.php +++ b/src/Application/Responder/TemplateRenderer.php @@ -7,7 +7,7 @@ /** * Template renderer. - * Documentation: https://github.com/samuelgfeller/slim-example-project/wiki/Template-rendering. + * Documentation: https://samuel-gfeller.ch/docs/Template-Rendering. */ final readonly class TemplateRenderer { diff --git a/src/Domain/User/Data/UserData.php b/src/Domain/User/Data/UserData.php index c9e1aa1..1673760 100644 --- a/src/Domain/User/Data/UserData.php +++ b/src/Domain/User/Data/UserData.php @@ -6,7 +6,7 @@ * User DTO (Data Transfer Object) class. * This class is used to transfer data between the different layers of the application * and serialize it for the frontend or database. - * Documentation: https://github.com/samuelgfeller/slim-example-project/wiki/Domain#data-transfer-object-dto. + * Documentation: https://samuel-gfeller.ch/docs/Domain#data-transfer-object-dto. */ class UserData implements \JsonSerializable { diff --git a/src/Domain/User/Repository/UserCreatorRepository.php b/src/Domain/User/Repository/UserCreatorRepository.php index 85bf99c..15bb7c7 100644 --- a/src/Domain/User/Repository/UserCreatorRepository.php +++ b/src/Domain/User/Repository/UserCreatorRepository.php @@ -11,7 +11,7 @@ * The vertical slice architecture allows having one module folder in the Domain layer * and separating the layers inside the module folder to have the services, repositories, * and data classes together and have a better overview. - * Documentation: https://github.com/samuelgfeller/slim-example-project/wiki/Architecture#vertical-slice-architecture + * Documentation: https://samuel-gfeller.ch/docs/Architecture#vertical-slice-architecture */ final readonly class UserCreatorRepository { diff --git a/src/Infrastructure/Factory/QueryFactory.php b/src/Infrastructure/Factory/QueryFactory.php index 4c8347c..075deef 100644 --- a/src/Infrastructure/Factory/QueryFactory.php +++ b/src/Infrastructure/Factory/QueryFactory.php @@ -12,7 +12,7 @@ * The Query factory provides methods to create queries. * * CakePHP documentation: https://book.cakephp.org/5/en/orm/query-builder.html. - * Repository and QueryBuilder: https://github.com/samuelgfeller/slim-example-project/wiki/Repository-and-Query-Builder + * Repository and QueryBuilder: https://samuel-gfeller.ch/docs/Repository-and-Query-Builder */ final readonly class QueryFactory { diff --git a/templates/home/home.html.php b/templates/home/home.html.php index eef55b3..85257cf 100644 --- a/templates/home/home.html.php +++ b/templates/home/home.html.php @@ -1,13 +1,13 @@ setLayout('layout/layout.html.php'); -// Asset handling https://github.com/samuelgfeller/slim-example-project/wiki/Template-rendering#asset-handling +// Asset handling https://samuel-gfeller.ch/docs/Template-Rendering#asset-handling $this->addAttribute('css', [ 'assets/home/home.css', ]); @@ -49,43 +49,43 @@ Slim 4 micro-framework
  • Dependency + href="https://samuel-gfeller.ch/docs/Dependency-Injection">Dependency Injection - PHP-DI
  • Template + href="https://samuel-gfeller.ch/docs/Template-Rendering">Template rendering - PHP-View
  • Database + href="https://samuel-gfeller.ch/docs/Database-Migrations">Database migrations - Phinx
  • -
  • +
  • Validation - cakephp/validation
  • -
  • Logging +
  • Logging - Monolog
  • -
  • Integration +
  • Integration testing - PHPUnit
  • Query + href="https://samuel-gfeller.ch/docs/Repository-and-Query-Builder">Query Builder - cakephp/database
  • -
  • Error +
  • Error handling - slim-error-renderer
  • -
  • GitHub +
  • GitHub Actions - Scrutinizer
  • Coding + href="https://samuel-gfeller.ch/docs/Coding-Standards-Fixer">Coding standards fixer - PHP CS Fixer
  • + href="https://samuel-gfeller.ch/docs/PHPStan-Static-Code-Analysis"> Static code analysis - PHPStan
  • @@ -98,64 +98,64 @@

    diff --git a/templates/layout/layout.html.php b/templates/layout/layout.html.php index 202ed66..1858291 100644 --- a/templates/layout/layout.html.php +++ b/templates/layout/layout.html.php @@ -1,7 +1,7 @@ @@ -66,7 +66,7 @@ fetch('layout/navbar.html.php', []); ?> diff --git a/templates/user/user-list.html.php b/templates/user/user-list.html.php index 0eeecba..c0586b7 100644 --- a/templates/user/user-list.html.php +++ b/templates/user/user-list.html.php @@ -5,7 +5,7 @@ $this->setLayout('layout/layout.html.php'); // Define assets that should be included -// https://github.com/samuelgfeller/slim-example-project/wiki/Template-rendering#asset-handling +// https://samuel-gfeller.ch/docs/Template-Rendering#asset-handling $this->addAttribute('css', [ 'assets/general/page-component/form/form.css', 'assets/general/page-component/button/plus-button.css', diff --git a/templates/user/user-read.html.php b/templates/user/user-read.html.php index 35dc484..f615781 100644 --- a/templates/user/user-read.html.php +++ b/templates/user/user-read.html.php @@ -9,7 +9,7 @@ addAttribute('css', [ 'assets/general/page-component/form/form.css', 'assets/general/page-component/modal/alert-modal.css', diff --git a/tests/Fixture/UserFixture.php b/tests/Fixture/UserFixture.php index 4b0cf11..ffd6b59 100644 --- a/tests/Fixture/UserFixture.php +++ b/tests/Fixture/UserFixture.php @@ -4,7 +4,7 @@ /** * User values inserted into the database for testing. - * Documentation: https://github.com/samuelgfeller/slim-example-project/wiki/Writing-Tests#fixtures. + * Documentation: https://samuel-gfeller.ch/docs/Writing-Tests#fixtures. */ class UserFixture { diff --git a/tests/Provider/User/UserCreateProvider.php b/tests/Provider/User/UserCreateProvider.php index 45b8727..49e5f21 100644 --- a/tests/Provider/User/UserCreateProvider.php +++ b/tests/Provider/User/UserCreateProvider.php @@ -3,7 +3,7 @@ namespace App\Test\Provider\User; /** - * Provider documentation: https://github.com/samuelgfeller/slim-example-project/wiki/Writing-Tests#data-providers. + * Provider documentation: https://samuel-gfeller.ch/docs/Writing-Tests#data-providers. */ class UserCreateProvider { diff --git a/tests/Trait/AppTestTrait.php b/tests/Trait/AppTestTrait.php index b45c997..c7879f9 100644 --- a/tests/Trait/AppTestTrait.php +++ b/tests/Trait/AppTestTrait.php @@ -10,7 +10,7 @@ /** * Initialize slim app for testing. - * Test setup documentation: https://github.com/samuelgfeller/slim-example-project/wiki/Writing-Tests#setup + * Test setup documentation: https://samuel-gfeller.ch/docs/Writing-Tests#setup * Traits "extend" the class that include them with their content (via "use TraitName;"). */ trait AppTestTrait diff --git a/tests/Unit/doc.md b/tests/Unit/doc.md index 8e7d0ed..478f331 100644 --- a/tests/Unit/doc.md +++ b/tests/Unit/doc.md @@ -1 +1 @@ -[Unit test example](https://github.com/samuelgfeller/slim-example-project/wiki/Writing-Tests#unit-tests) \ No newline at end of file +[Unit test example](https://samuel-gfeller.ch/docs/Writing-Tests#unit-tests) \ No newline at end of file