mirror of
https://github.com/Karaka-Management/Developer-Guide.git
synced 2026-01-14 21:48:41 +00:00
Fix outdated info
This commit is contained in:
parent
f29a94d5e2
commit
7e69fed919
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
## Setup
|
||||
* [Installation](setup/installation.md)
|
||||
* [Dev Environment](setup/dev_environment.md)
|
||||
* [Dev Environment](setup/developer_environment.md)
|
||||
|
||||
## Standards
|
||||
* [General](standards/general.md)
|
||||
|
|
@ -13,7 +13,6 @@
|
|||
* [Php](standards/php.md)
|
||||
|
||||
## Basics
|
||||
|
||||
* [Routing](basics/routing.md)
|
||||
* [Dispatching](basics/dispatching.md)
|
||||
* [Views](basics/views.md)
|
||||
|
|
@ -59,4 +58,5 @@
|
|||
* [Styles and Layout](frontend/styles_and_layout.md)
|
||||
|
||||
## Components
|
||||
* [Modules](components/datamapper.md)
|
||||
* [Modules](components/modules.md)
|
||||
* [Modules](components/packages.md)
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ Example usage:
|
|||
</form>
|
||||
```
|
||||
|
||||
Now the application will receive the automatically generated CSRF token as query parameter for further use. If the CSRF token is not the same as the one assoziated with the client on the server side the client will receive a 403 HTTP response. The CSRF however doesn't have be specified, if that's the case **every module itself must make sure wheter a valid CSRF token is required** or not. The reason for this is that third party requests are a possibility as well, and sharing the private CSRF token would render it useless.
|
||||
Now the application will receive the automatically generated CSRF token as query parameter for further use. If the CSRF token is not the same as the one assoziated with the client on the server side the client will receive a 403 HTTP response. The CSRF however doesn't have be specified, if that's the case **every module itself must make sure whether a valid CSRF token is required** or not. The reason for this is that third party requests are a possibility as well, and sharing the private CSRF token would render it useless.
|
||||
|
||||
Since the validation of the CSRF token is performed automatically it is only necessary to check the existence, since if it exists it has to be valid.
|
||||
|
||||
|
|
|
|||
31
setup/developer_environment.md
Normal file
31
setup/developer_environment.md
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
# Developer Environment
|
||||
|
||||
The following points are only recommendations to help with the development process. Support for other settings or tools cannot be guaranteed.
|
||||
|
||||
## IDE/Editor
|
||||
|
||||
The following IDEs and editors are recommended
|
||||
|
||||
1. PHPStorm
|
||||
2. Visual Studio Code
|
||||
1. Markdown All in One
|
||||
2. PHP Debug
|
||||
3. PHP IntelliSense
|
||||
4. PHP Server
|
||||
5. PHPUnit
|
||||
6. SVG Viewer
|
||||
|
||||
## Tools
|
||||
|
||||
The following tools are important to test the application and to ensure the code quality. The configurations and sample shell executions can be found in the `Build` directory. These tools are also downloaded during the setup process of the `buildProject.sh` script (see installation documentation).
|
||||
|
||||
* composer
|
||||
* phploc
|
||||
* phpunit
|
||||
* phpcs
|
||||
* phpmd
|
||||
* phpmetrics
|
||||
* pdepend
|
||||
* documentor
|
||||
* phpstan
|
||||
* phan
|
||||
|
|
@ -4,7 +4,7 @@ Installing the application as a developer can be achived by following one of the
|
|||
|
||||
## Server Requirements
|
||||
|
||||
* PHP >= 7.1
|
||||
* PHP >= 7.2
|
||||
* PDO PHP Extension
|
||||
|
||||
### Recommended Extensions
|
||||
|
|
@ -24,35 +24,20 @@ This is the prefered way to install the application since this also installs all
|
|||
|
||||
### Steps
|
||||
|
||||
The following steps will setup the application and perform extensive code quality checks and documentation tasks:
|
||||
|
||||
1. Go somewhere where you want to install the build script
|
||||
2. Enter `git clone -b develop https://github.com/Orange-Management/Build.git`
|
||||
3. Modify `var.sh`
|
||||
4. Run `chmod 777 setup.sh`
|
||||
5. Run `./setup.sh`
|
||||
6. Modify `config.php`
|
||||
7. Run `php phpunit.phar --configuration Tests/PHPUnit/phpunit_default.xml` inside `Orange-Management` or open `http://your_url.com/Install`
|
||||
3. Modify `config.sh`
|
||||
4. Run `chmod 777 buildProject.sh`
|
||||
5. Run `./buildProject.sh`
|
||||
|
||||
Alternatively after cloning the git repository:
|
||||
|
||||
1. Run `php phpunit.phar --configuration tests/phpunit_no_coverage.xml` inside `Orange-Management` or open `http://your_url.com/Install`
|
||||
|
||||
This wil only setup the application instead of also performing additional code quality checks.
|
||||
|
||||
### Annotation
|
||||
|
||||
During this process the database automatically gets dropped (if existing) and re-created. The database user and password can't be changed right now since the install config relies on the same data. Future releases will make use of a new user that will get set up by the install script as well. If you don't have `xdebug` installed but `phpdbg` you can replace `php phpunit.phar ...` with `phpdbg -qrr phpunit.phar ...`.
|
||||
|
||||
## FTP Web Install
|
||||
|
||||
This only installs an application without any dev tools that may be required by other scripts in order to test your implementations.
|
||||
|
||||
### Requirements
|
||||
|
||||
1. PHP 7.0
|
||||
2. xdebug or phpdbg
|
||||
3. phpunit
|
||||
|
||||
### Steps
|
||||
|
||||
1. Download all Orange-Management repositories
|
||||
2. Put all repositories inside the Orange-Management repository
|
||||
3. Modify `config.php`
|
||||
4. Run `php phpunit.phar --configuration Tests/PHPUnit/phpunit_default.xml` inside `Orange-Management` or open `http://your_url.com/Install`
|
||||
|
||||
### Annotation
|
||||
|
||||
During this process the database automatically gets dropped (if existing) and re-created.
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ if (...) {
|
|||
$result = condition ? expr1 : expr2;
|
||||
```
|
||||
|
||||
Multiline `if` statements must begin with a logical opperator `or`/`and`.
|
||||
Multiline `if` conditions should begin with a logical opperator `or`/`and`.
|
||||
|
||||
```php
|
||||
if (isTrue == true
|
||||
|
|
@ -147,9 +147,13 @@ Variables must be written in camel case.
|
|||
|
||||
Boolean variable names should start with a boolean expression (e.g. is, has)
|
||||
|
||||
#### Boolean return value
|
||||
|
||||
Functions which return a boolean value should start with expressions such as is*, has* or similar expressions to indicate that the function returns a boolean value.
|
||||
|
||||
## Quotation
|
||||
|
||||
All string representations should use single quotes `''`.
|
||||
All string representations should use single quotes `''` unless `""` provides significant benefits in a specific use case.
|
||||
|
||||
```js
|
||||
'This is a string'
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user