Skip to content

Commit

Permalink
Merge pull request #9 from dotkernel/composer
Browse files Browse the repository at this point in the history
updated composer, reqs page
  • Loading branch information
arhimede authored Nov 12, 2024
2 parents 2a6e4e1 + 4dc99e9 commit b34f6ac
Show file tree
Hide file tree
Showing 13 changed files with 27 additions and 61 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2024 DotKernel
Copyright (c) 2024 Dotkernel

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "dotkernel/frontend-documentation",
"description": "DotKernel Frontend documentation markdown files.",
"description": "Dotkernel Frontend documentation markdown files.",
"type": "metapackage",
"license": "MIT",
"authors": [
{
"name": "DotKernel Team",
"name": "Dotkernel Team",
"email": "[email protected]"
}
],
Expand Down
6 changes: 3 additions & 3 deletions docs/book/v5/how-to/dependency-injection.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ In simpler terms, it's the act of providing dependencies for an object during in

In PHP, dependency injection can be implemented in various ways, including through constructor injection, setter injection and property injection.

DotKernel Frontend, through its [dot-dependency-injection](https://github.com/dotkernel/dot-dependency-injection) package focuses only on constructor injection.
Dotkernel Frontend, through its [dot-dependency-injection](https://github.com/dotkernel/dot-dependency-injection) package focuses only on constructor injection.

## Usage

**DotKernel Frontend** comes out of the box with the [dot-dependency-injection](https://github.com/dotkernel/dot-dependency-injection) package, which provides all the functionality injecting dependencies into any object you want.
**Dotkernel Frontend** comes out of the box with the [dot-dependency-injection](https://github.com/dotkernel/dot-dependency-injection) package, which provides all the functionality injecting dependencies into any object you want.

`dot-dependency-injection` determines the dependencies by looking at the `#[Inject]` attribute, added to the constructor of a class.
Each dependency is specified as a separate parameter of the `#[Inject]` attribute.
Expand Down Expand Up @@ -52,5 +52,5 @@ public function getDependencies(): array
That's it.
When your object is instantiated from the container, it will automatically have its dependencies resolved.

> Dependencies injection is available to any object within DotKernel Frontend.
> Dependencies injection is available to any object within Dotkernel Frontend.
> For example, you can inject dependencies in a service, a handler and so on, simply by registering them in the `ConfigProvider`.
18 changes: 0 additions & 18 deletions docs/book/v5/how-to/languages.md

This file was deleted.

16 changes: 9 additions & 7 deletions docs/book/v5/installation/composer.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
# Composer Installation of Packages

Composer is required to install DotKernel `frontend`. You can install Composer on the [official site](https://getcomposer.org/).
Composer is required to install Dotkernel `frontend`. You can install Composer from the [official site](https://getcomposer.org/).

> First make sure that you have navigated your command prompt in the folder where you copied the files in the previous step.
> First make sure that you have navigated your command prompt to the folder where you copied the files in the previous step.
## Install dependencies

Run this command in the command prompt.

> Use the **CLI** in order to ensure interactivity for proper configuration.
```shell
composer install
```

You should see this text below, along with a long list of packages to be installed instead of the `[...]`.
In this example there are 158 packages, though the number can change in future `Frontend` updates.
In this example there are 158 packages, though the number can change in future updates.
You will find the packages in the `vendor` folder.

```shell
Expand All @@ -37,16 +39,16 @@ Please select which config file you wish to inject 'Laminas\Diactoros\ConfigProv
Make your selection (default is 1):
```
Simply select `[0] Do not inject`, because DotKernel includes its own configProvider which already contains the prompted configurations.
Type `0` to select `[0] Do not inject`.
> If you choose `[1] config/config.php` Laminas's `ConfigProvider` from `session` will be injected.
> This is not required for the default installation, so make sure to select `[0] Do not inject`
> We choose `0` because Dotkernel includes its own ConfigProvider which already contains the prompted configurations.
> If you choose `[1] config/config.php`, an extra `ConfigProvider` will be injected.
The next question is:
`Remember this option for other packages of the same type? (y/N)`
Type `y` here, and hit `enter`.
Type `y` here, and hit `enter` to complete this stage.
## Development mode
Expand Down
2 changes: 1 addition & 1 deletion docs/book/v5/installation/configuration-files.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Also feel free to add as many CCs as you require under the `contact` => `message
## reCAPTCHA

reCAPTCHA is used to prevent abusive activities on your website.
DotKernel frontend uses the Google reCAPTCHA for its `contact us` form.
Dotkernel frontend uses the Google reCAPTCHA for its `contact us` form.

- Generate a `siteKey` and `secretKey` in your Google account: [Google reCAPTCHA](https://www.google.com/recaptcha/admin)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,4 @@ You should see this in the command prompt:
You are now in development mode.
```

- If not already done, remove the `.dist` extension from `config/autoload/development.global.php.dist`.

## Using DebugBar

DotKernel comes with its own DebugBar already installed and configured. It is enabled when you clone the config file `config/autoload/debugbar.local.php.dist` as `config/autoload/debugbar.local.php`. You can disable the tool by going into its config file `config/autoload/debugbar.local.php` and changing

```php
'enabled' => true
```

to

```php
'enabled' => false
```
- If not already done, remove the `.dist` extension from `config/autoload/development.local.php.dist`.
2 changes: 1 addition & 1 deletion docs/book/v5/installation/running-application.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ We recommend running your applications in WSL:
- Set `$baseUrl` in **config/autoload/local.php** to the address of the virtualhost.
- Run the application by opening the virtualhost address in your browser.

You should see the `DotKernel Frontend` welcome page.
You should see the `Dotkernel Frontend` welcome page.

> If you are getting exceptions or errors regarding some missing services, try running the following command:
Expand Down
4 changes: 2 additions & 2 deletions docs/book/v5/introduction/file-structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Dotkernel Frontend follows the [PSR-4](https://www.php-fig.org/psr/psr-4/) stand

It is a good practice to standardize the file structure of projects.

When using DotKernel Frontend the following structure is installed by default:
When using Dotkernel Frontend the following structure is installed by default:

![Dotkernel Frontend File Structure!](https://docs.dotkernel.org/img/frontend/file-structure-dk-frontend.png)

Expand Down Expand Up @@ -48,7 +48,7 @@ The `src` directory should also contain 2 files:

This directory contains the template files, used for example to help render e-mail templates.

> DotKernel Frontend uses `twig` as Templating Engine.
> Dotkernel Frontend uses `twig` as Templating Engine.
> All template files have the extension `.html.twig`.
## `data` directory
Expand Down
2 changes: 0 additions & 2 deletions docs/book/v5/introduction/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,3 @@ Dotkernel web starter package suitable for frontend applications.
[![Continuous Integration](https://github.com/dotkernel/frontend/actions/workflows/continuous-integration.yml/badge.svg?branch=5.0)](https://github.com/dotkernel/frontend/actions/workflows/continuous-integration.yml)
[![codecov](https://codecov.io/gh/dotkernel/frontend/graph/badge.svg?token=BQS43UWAM4)](https://codecov.io/gh/dotkernel/frontend)
[![Qodana](https://github.com/dotkernel/frontend/actions/workflows/qodana_code_quality.yml/badge.svg)](https://github.com/dotkernel/frontend/actions/workflows/qodana_code_quality.yml)

[![SymfonyInsight](https://insight.symfony.com/projects/a28dac55-3366-4020-9a49-53f6fcbeda4e/big.svg)](https://insight.symfony.com/projects/a28dac55-3366-4020-9a49-53f6fcbeda4e)
9 changes: 4 additions & 5 deletions docs/book/v5/introduction/packages.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
# Packages

* `dotkernel/dot-dependency-injection` - Dependency injection component using class attributes.
* `dotkernel/dot-authorization` - Authorization base package defining interfaces for authorization services to be used with DotKernel applications
* `dotkernel/dot-authorization` - Authorization base package defining interfaces for authorization services to be used with Dotkernel applications
* `dotkernel/dot-controller` - Provides base classes for action based controllers similar to Laminas controller component
* `dotkernel/dot-data-fixtures` - Provides a CLI interface for listing & executing doctrine data fixtures
* `dotkernel/dot-debugbar` - Wrapper on top of maximebf/php-debugbar
* `dotkernel/dot-dependency-injection` - Dependency injection component using class attributes
* `dotkernel/dot-errorhandler` - Logging Error Handler for Middleware Applications
* `dotkernel/dot-flashmessenger` - Provides session messages between redirects
* `dotkernel/dot-mail` - Mail component based on laminas-mail
* `dotkernel/dot-navigation` - Allows you to easily define and parse menus inside templates, configuration based approach
* `dotkernel/dot-rbac-guard` - Defines authorization guards that authorize users for accessing certain parts of an application based on various criteria
* `dotkernel/dot-response-header` - Middleware for setting custom response headers
* `dotkernel/dot-session` - DotKernel session component extending and customizing laminas-session
* `dotkernel/dot-twigrenderer` - DotKernel component providing twig extensions and customizations
* `dotkernel/dot-session` - Dotkernel session component extending and customizing laminas-session
* `dotkernel/dot-twigrenderer` - Dotkernel component providing twig extensions and customizations
* `friendsofphp/proxy-manager-lts` - Fork of ocramius/proxy-manager
* `laminas/laminas-component-installer` - Composer plugin for injecting modules and configuration providers into application configuration
* `laminas/laminas-config-aggregator` - Lightweight library for collecting and merging configuration from different sources
Expand Down
2 changes: 1 addition & 1 deletion docs/book/v5/introduction/server-requirements.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Both mod_php and FCGI (FPM) are supported.

## RDBMS

* MariaDB >= 10.11 LTS
* Tested with MariaDB 10.11 LTS and MariaDB 11.4 LTS

## Recommended extensions

Expand Down
5 changes: 2 additions & 3 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ nav:
- "Composer": v5/installation/composer.md
- "Configuration Files": v5/installation/configuration-files.md
- "Doctrine ORM": v5/installation/doctrine-orm.md
- "Development Mode and the Debugbar": v5/installation/development-mode-debugbar.md
- "Development Mode and the Debugbar": v5/installation/development-mode.md
- "Running the Application": v5/installation/running-application.md
- "FAQ": v5/installation/faq.md
- How to:
Expand All @@ -28,11 +28,10 @@ nav:
- "Configure Authorizations": v5/how-to/authorization.md
- "Use NPM Commands": v5/how-to/npm_commands.md
- "Inject Dependencies": v5/how-to/dependency-injection.md
- "Configure Languages": v5/how-to/languages.md
- "Set Up CSRF": v5/how-to/csrf.md
- "Anonymize Accounts": v5/how-to/account-anonymization.md
site_name: frontend
site_description: "DotKernel Frontend"
site_description: "Dotkernel Frontend"
repo_url: "https://github.com/dotkernel/frontend"
plugins:
- search

0 comments on commit b34f6ac

Please sign in to comment.