https://github.com/tolik518/blog.returnnull.de
Source code of blog.returnnull.de
https://github.com/tolik518/blog.returnnull.de
blog hacktoberfest hacktoberfest-accepted hacktoberfest2023
Last synced: 5 months ago
JSON representation
Source code of blog.returnnull.de
- Host: GitHub
- URL: https://github.com/tolik518/blog.returnnull.de
- Owner: tolik518
- Created: 2022-05-22T14:01:29.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2025-11-09T23:42:25.000Z (7 months ago)
- Last Synced: 2025-12-07T22:21:25.789Z (6 months ago)
- Topics: blog, hacktoberfest, hacktoberfest-accepted, hacktoberfest2023
- Language: PHP
- Homepage: https://blog.returnnull.de/
- Size: 836 KB
- Stars: 2
- Watchers: 1
- Forks: 2
- Open Issues: 10
-
Metadata Files:
- Readme: README.MD
Awesome Lists containing this project
README
# blog.returnnull.de
This is the source code behind [blog.returnnull.de](https://blog.returnnull.de).
#### Tech Stack
[](https://www.php.net/manual/de/intro-whatis.php)
[](https://phpunit.de/)
[](https://getcomposer.org/)
[](https://dev.mysql.com/doc/refman/8.0/en/what-is-mysql.html)
[](https://developer.mozilla.org/de/docs/Learn/Getting_started_with_the_web/HTML_basics)
[](https://sass-lang.com/)
[](https://docs.docker.com/get-started/overview/)
[](https://docs.docker.com/compose/)
[](https://www.nginx.com/)
[](https://www.jetbrains.com/de-de/phpstorm/)
[](https://git-scm.com/)
#### How to Start Development
* clone repository
* build images with `make build` or with `docker compose build`
* use `make run` or `docker-compose up -d` to start the containers
* to install the dependencies and to update the autoloader (do this everyime you add a new class) `make install` or `docker-compose -f docker/compose/docker-compose-cli.yml run --rm --no-deps php_cli php -d memory_limit=-1 /usr/local/bin/composer install`
* use `make stop` or `docker-compose down --remove-orphans` to stop the containers
### Access Admin Panel
* go to http://localhost/admin
* login with username `tolik518` and password `tolik518`
#### How to execute PHPUnit-Tests
* `make unit_test`
* if you want to see the coverage in PHPStorm then follow these steps:
* Go to the menu bar in PHPStorm at the top
* Go to `Run` -> `Show Coverage Data` or press `Strg + Alt + 6` -> `+`
* then choose `(projectfolder)/code/tests/reports/phpunit.coverage.xml` and press `OK` and `show selected`
### Defining new page in the app
#### Add a new page class
Inside src/Page define a new class that implements Page interface, here minimal example:
```php
getPageNameFromClass($pageClassName);
switch ($pageName) {
case 'HelloPageWithDeps':
return $this->createHelloPageWithDeps();
default:
return $this->tryToGetFallbackPage($pageName);
}
}
...
private function createHelloPageWithDeps(): HelloPageWithDeps
{
return new HelloPageWithDeps(
$this->sessionManager,
);
}
}
```